__init__.py 1.29 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/env python
# graph_tool.py -- a general graph manipulation python module
#
# Copyright (C) 2007 Tiago de Paula Peixoto <tiago@forked.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

19
"""
20
21
``graph_tool.topology`` - Topology related functions
----------------------------------------------------
22
23
"""

Tiago Peixoto's avatar
Tiago Peixoto committed
24
from .. dl_import import dl_import
25
dl_import("import libgraph_tool_topology")
26

27
from .. core import _prop
28
import random, sys
29
__all__ = ["isomorphism"]
30
31
32
33

def isomorphism(g1, g2, isomap=None):
    if isomap == None:
        isomap = g1.new_vertex_property("int32_t")
34
    return libgraph_tool_topology.\
35
36
           check_isomorphism(g1._Graph__graph,g2._Graph__graph,
                             _prop("v", g1, isomap))