__init__.py 3 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`` - a general graph manipulation python module
===========================================================
22

23
24
25
26
Provides
   1. A Graph object for graph representation and manipulation
   2. Property maps for Vertex, Edge or Graph.
   3. Fast algorithms implemented in C++.
27

28
29
How to use the documentation
----------------------------
30

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Documentation is available in two forms: docstrings provided
with the code, and the full documentation available in
`the graph-tool homepage <http://graph-tool.forked.de>`_.

We recommend exploring the docstrings using `IPython
<http://ipython.scipy.org>`_, an advanced Python shell with TAB-completion and
introspection capabilities.

The docstring examples assume that ``graph_tool.all`` has been imported as
``gt``::

   >>> import graph_tool.all as gt

Code snippets are indicated by three greater-than signs::

   >>> x = x + 1

Use the built-in ``help`` function to view a function's docstring::

   >>> help(gt.Graph)

Available subpackages
---------------------
clustering
   clustering (aka. transitivity)
community
   community detection
correlations
   vertex and edge correlations
draw
   Graph drawing using graphviz
generation
   random graph generation
misc
   miscenalenous algorithms
stats
   vertex and edge statistics
util
69
   assorted utilities
70
71
72
73
74
75
76

Utilities
---------
show_config
   Show ``graph_tool`` build configuration
__version__
   ``graph_tool`` version string
77

78
79
80
Classes
-------

81
"""
82

83
84
85
86
__author__="Tiago de Paula Peixoto <tiago@forked.de>"
__copyright__="Copyright 2008 Tiago de Paula Peixoto"
__license__="GPL version 3 or above"
__URL__="http://graph-tool.forked.de"
87

88
89
90
91
92
93
94
# import numpy and scipy before everything to avoid weird segmentation faults
# depending on the order things are imported.

import numpy
import scipy
import scipy.stats

95
from . core import  __version__, Graph, GraphError, Vector_bool, \
96
     Vector_int32_t, Vector_int64_t, Vector_double, Vector_long_double,\
Tiago Peixoto's avatar
Tiago Peixoto committed
97
98
     Vector_string, value_types, load_graph, PropertyMap, Vertex, Edge,\
     show_config
99

100
101
102
__all__ = ["Graph", "Vertex", "Edge", "GraphError", "Vector_bool",
           "Vector_int32_t", "Vector_int64_t", "Vector_double",
           "Vector_long_double", "Vector_string", "value_types", "load_graph",
Tiago Peixoto's avatar
Tiago Peixoto committed
103
           "PropertyMap", "show_config"]