__init__.py 2.99 KB
Newer Older
1
#! /usr/bin/env python
2
# -*- coding: utf-8 -*-
3
#
4
5
# graph_tool -- a general graph manipulation python module
#
Tiago Peixoto's avatar
Tiago Peixoto committed
6
# Copyright (C) 2007-2010 Tiago de Paula Peixoto <tiago@skewed.de>
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# 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/>.

21
"""
Tiago Peixoto's avatar
Tiago Peixoto committed
22
23
``graph_tool`` - efficient graph analysis and manipulation
===========================================================
Tiago Peixoto's avatar
Tiago Peixoto committed
24
25

This module provides:
26

27
28
29
   1. A Graph object for graph representation and manipulation
   2. Property maps for Vertex, Edge or Graph.
   3. Fast algorithms implemented in C++.
30

31
32
How to use the documentation
----------------------------
33

34
35
Documentation is available in two forms: docstrings provided
with the code, and the full documentation available in
Tiago Peixoto's avatar
Tiago Peixoto committed
36
`the graph-tool homepage <http://graph-tool.skewed.de>`_.
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

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)

55
Summary
56
57
-------

58
59
60
61
62
63
64
.. autosummary::
   :nosignatures:

   Graph
   Vertex
   Edge
   PropertyMap
65
   PropertyArray
66
67
68
69
70
71
   load_graph
   group_vector_property
   ungroup_vector_property
   value_types
   show_config

72
73
Classes
-------
74
"""
75

Tiago Peixoto's avatar
Tiago Peixoto committed
76
__author__ = "Tiago de Paula Peixoto <tiago@skewed.de>"
Tiago Peixoto's avatar
Tiago Peixoto committed
77
78
__copyright__ = "Copyright 2007-2010 Tiago de Paula Peixoto"
__license__ = "GPL version 3 or above"
Tiago Peixoto's avatar
Tiago Peixoto committed
79
__URL__ = "http://graph-tool.skewed.de"
80

81
82
83
84
85
86
87
# 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

Tiago Peixoto's avatar
Tiago Peixoto committed
88
89
from . core import  __version__, Graph, Vector_bool, Vector_int32_t, \
     Vector_int64_t, Vector_double, Vector_long_double, Vector_string, \
90
     value_types, load_graph, PropertyArray, PropertyMap, Vertex, Edge, \
91
     group_vector_property, ungroup_vector_property, show_config
Tiago Peixoto's avatar
Tiago Peixoto committed
92
93
94

__all__ = ["Graph", "Vertex", "Edge", "Vector_bool", "Vector_int32_t",
           "Vector_int64_t", "Vector_double", "Vector_long_double",
95
96
97
98
           "Vector_string", "value_types", "load_graph", "PropertyArray",
           "PropertyMap", "group_vector_property", "ungroup_vector_property",
           "show_config", "__author__", "__copyright__", "__URL__",
           "__version__"]