Commit 2e5803d2 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Small doc changes.

parent 00aa9c5d
......@@ -233,3 +233,5 @@ extlinks = {'ticket': ('http://projects.skewed.de/graph-tool/ticket/%s',
'ticket '),
'doi': ('http://dx.doi.org/%s', 'DOI: ')}
autodoc_member_order='bysource'
autodoc_default_flags=['members']
......@@ -251,8 +251,9 @@ accessed by vertex or edge descriptors, or the graph itself, as such:
gprop_bool[g] = True
Property maps with scalar value types can also be accessed as a numpy
:class:`~numpy.ndarray`, with the :meth:`~graph_tool.PropertyMap.get_array`
method, i.e.,
:class:`~numpy.ndarray`, with the
:meth:`~graph_tool.PropertyMap.get_array` method, or the
:meth:`~graph_tool.PropertyMap.a` attribute, i.e.,
.. doctest::
......
......@@ -95,35 +95,35 @@ def edmonds_karp_max_flow(g, source, target, capacity, residual=None):
>>> res = gt.edmonds_karp_max_flow(g, g.vertex(0), g.vertex(1), c)
>>> res.a = c.a - res.a # the actual flow
>>> print res.a[0:g.num_edges()]
[ 0.13339096 0.24058962 0. 0. 0. 0. 0.
0. 0.31026953 0. 0. 0. 0. 0.
0.10719866 0. 0. 0. 0. 0. 0.
0. 0.13339096 0. 0. 0. 0.10719866
0. 0. 0. 0. 0.10719866 0. 0.
[ 0.13339096 0.13339096 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0.24058962 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0.10719866 0. 0. 0.
0. 0. 0. 0. 0.31026953 0. 0.
0. 0. 0.44366049 0. 0. 0. 0.
0. 0. 0. 0. 0. 0.
0.10719866 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0.10719866 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0.20608185 0. 0. 0.
0.08000038 0. 0. 0. 0. 0. 0.
0.12608147 0. 0. 0. 0. 0. 0.
0. 0. 0. 0.08000038 0. 0.
0.00730949 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0.10719866 0. 0. 0.
0. 0.10719866 0. 0.44366049 0. 0. 0.
0. 0.13339096 0. 0. 0. 0. 0.
0.08000038 0.08000038 0. 0. 0. 0. 0.
0. 0.12608147 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0.00730949
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0.10719866
0. 0. 0.31026953 0. 0.31026953 0. 0.
0.08000038 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. ]
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0.08000038 0. 0. 0. 0. 0. 0.
0.00730949 0. 0.12608147 0. 0. 0. 0. ]
References
----------
......@@ -186,38 +186,37 @@ def push_relabel_max_flow(g, source, target, capacity, residual=None):
>>> res = gt.push_relabel_max_flow(g, g.vertex(0), g.vertex(1), c)
>>> res.a = c.a - res.a # the actual flow
>>> print res.a[0:g.num_edges()]
[ 0.13339096 0.24058962 0. 0.01254176 0. 0. 0.
0. 0.31026953 0. 0.00745848 0.00335702 0.03601961
0.01254176 0.0794977 0. 0.00745848 0. 0.06036354
0.01254176 0.00335702 0. 0.14084944 0. 0.03601961
0.00745848 0.08285472 0. 0. 0.06372057 0.
0.10384163 0. 0.00335702 0. 0. 0. 0.
0. 0.02434393 0. 0. 0.02434393 0.2480481 0.
0. 0. 0. 0.0368857 0. 0.06372057
0. 0.03601961 0. 0.00335702 0.01254176 0.02434393
0. 0.10719866 0.04347809 0.01254176 0. 0.01254176
0. 0. 0.00335702 0.31026953 0.03601961 0. 0.
0. 0.45111897 0.00335702 0. 0. 0.
0.00335702 0. 0.00335702 0.06036354 0.00745848 0.01589879
0.0794977 0. 0.06372057 0. 0.00508328 0. 0.
0.06036354 0.06036354 0.03601961 0.0368857 0. 0.
0.00335702 0. 0. 0. 0.03601961 0.01589879
0.01254176 0. 0.01254176 0.03601961 0. 0.0368857
0.03601961 0.01589879 0.03601961 0. 0.03601961 0. 0.
0. 0.00335702 0.01589879 0.0368857 0.03601961 0.03601961
0.01254176 0.01254176 0. 0.00335702 0.02434393 0.00745848
0. 0.03937663 0.06036354 0. 0. 0. 0.
0. 0. 0. 0.02434393 0. 0.03601961
0. 0. 0.11974042 0. 0. 0.03601961
0.01254176 0.11465713 0.09465689 0.46800442 0.03601961 0.
0.00335702 0. 0. 0.03601961 0. 0.
0.00745848 0. 0. 0.03601961 0. 0.
0.09974018 0.00335702 0.01254176 0.00335702 0.01254176 0.
0.01254176 0.10719866 0. 0. 0. 0.31026953
0. 0.31026953 0. 0.01254176 0. 0. 0.
0.02000024 0.0108155 0.03601961 0. 0.03601961 0.03937663
0.00335702 0.01254176 0. 0. 0. 0.01688546
0. 0. 0.06036354 0.03601961 0. 0. ]
[ 0.00730949 0.0835572 0. 0. 0. 0. 0.
0.06926091 0.06926091 0. 0.07624771 0. 0.03957485
0.05028544 0.05028544 0. 0. 0. 0.07624771
0.07624771 0. 0.07624771 0. 0. 0.07624771
0. 0. 0. 0. 0. 0.20608185
0.03395359 0. 0. 0.06926091 0. 0. 0.
0. 0. 0. 0. 0.06926091 0.
0.03957485 0. 0. 0. 0. 0.
0.02596227 0.05028544 0.12983414 0. 0. 0.
0.06926091 0. 0.20608185 0. 0. 0. 0.
0.12983414 0. 0. 0. 0.04480769 0. 0.
0. 0.06926091 0. 0. 0.06926091 0.03957485
0.06926091 0.05028544 0. 0.06057324 0. 0.
0.00730949 0. 0. 0. 0. 0.02596227
0. 0.03667285 0. 0. 0. 0. 0.
0. 0. 0.0835572 0. 0. 0. 0.
0.07624771 0.12983414 0.12983414 0. 0. 0.
0.02596227 0. 0. 0. 0. 0.05028544
0. 0. 0. 0.04480769 0. 0. 0.
0. 0.00730949 0. 0. 0.06926091 0.
0.05028544 0. 0. 0.03395359 0. 0. 0.
0. 0. 0. 0.06057324 0. 0. 0.
0.03395359 0. 0. 0. 0. 0.01633184
0. 0. 0. 0. 0.02596227 0. 0.
0. 0. 0. 0. 0.03395359 0. 0.
0. 0. 0. 0.00547774 0. 0.12983414
0.03395359 0. 0. 0. 0. 0.00547774
0. 0. 0. 0. 0. 0.03957485
0.03395359 0. 0.06926091 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0.00730949 0.07624771 0.20608185 0. 0. 0. 0. ]
References
----------
......@@ -280,38 +279,37 @@ def kolmogorov_max_flow(g, source, target, capacity, residual=None):
>>> res = gt.push_relabel_max_flow(g, g.vertex(0), g.vertex(1), c)
>>> res.a = c.a - res.a # the actual flow
>>> print res.a[0:g.num_edges()]
[ 0.13339096 0.24058962 0. 0.01254176 0. 0. 0.
0. 0.31026953 0. 0.00745848 0.00335702 0.03601961
0.01254176 0.0794977 0. 0.00745848 0. 0.06036354
0.01254176 0.00335702 0. 0.14084944 0. 0.03601961
0.00745848 0.08285472 0. 0. 0.06372057 0.
0.10384163 0. 0.00335702 0. 0. 0. 0.
0. 0.02434393 0. 0. 0.02434393 0.2480481 0.
0. 0. 0. 0.0368857 0. 0.06372057
0. 0.03601961 0. 0.00335702 0.01254176 0.02434393
0. 0.10719866 0.04347809 0.01254176 0. 0.01254176
0. 0. 0.00335702 0.31026953 0.03601961 0. 0.
0. 0.45111897 0.00335702 0. 0. 0.
0.00335702 0. 0.00335702 0.06036354 0.00745848 0.01589879
0.0794977 0. 0.06372057 0. 0.00508328 0. 0.
0.06036354 0.06036354 0.03601961 0.0368857 0. 0.
0.00335702 0. 0. 0. 0.03601961 0.01589879
0.01254176 0. 0.01254176 0.03601961 0. 0.0368857
0.03601961 0.01589879 0.03601961 0. 0.03601961 0. 0.
0. 0.00335702 0.01589879 0.0368857 0.03601961 0.03601961
0.01254176 0.01254176 0. 0.00335702 0.02434393 0.00745848
0. 0.03937663 0.06036354 0. 0. 0. 0.
0. 0. 0. 0.02434393 0. 0.03601961
0. 0. 0.11974042 0. 0. 0.03601961
0.01254176 0.11465713 0.09465689 0.46800442 0.03601961 0.
0.00335702 0. 0. 0.03601961 0. 0.
0.00745848 0. 0. 0.03601961 0. 0.
0.09974018 0.00335702 0.01254176 0.00335702 0.01254176 0.
0.01254176 0.10719866 0. 0. 0. 0.31026953
0. 0.31026953 0. 0.01254176 0. 0. 0.
0.02000024 0.0108155 0.03601961 0. 0.03601961 0.03937663
0.00335702 0.01254176 0. 0. 0. 0.01688546
0. 0. 0.06036354 0.03601961 0. 0. ]
[ 0.00730949 0.0835572 0. 0. 0. 0. 0.
0.06926091 0.06926091 0. 0.07624771 0. 0.03957485
0.05028544 0.05028544 0. 0. 0. 0.07624771
0.07624771 0. 0.07624771 0. 0. 0.07624771
0. 0. 0. 0. 0. 0.20608185
0.03395359 0. 0. 0.06926091 0. 0. 0.
0. 0. 0. 0. 0.06926091 0.
0.03957485 0. 0. 0. 0. 0.
0.02596227 0.05028544 0.12983414 0. 0. 0.
0.06926091 0. 0.20608185 0. 0. 0. 0.
0.12983414 0. 0. 0. 0.04480769 0. 0.
0. 0.06926091 0. 0. 0.06926091 0.03957485
0.06926091 0.05028544 0. 0.06057324 0. 0.
0.00730949 0. 0. 0. 0. 0.02596227
0. 0.03667285 0. 0. 0. 0. 0.
0. 0. 0.0835572 0. 0. 0. 0.
0.07624771 0.12983414 0.12983414 0. 0. 0.
0.02596227 0. 0. 0. 0. 0.05028544
0. 0. 0. 0.04480769 0. 0. 0.
0. 0.00730949 0. 0. 0.06926091 0.
0.05028544 0. 0. 0.03395359 0. 0. 0.
0. 0. 0. 0.06057324 0. 0. 0.
0.03395359 0. 0. 0. 0. 0.01633184
0. 0. 0. 0. 0.02596227 0. 0.
0. 0. 0. 0. 0.03395359 0. 0.
0. 0. 0. 0.00547774 0. 0.12983414
0.03395359 0. 0. 0. 0. 0.00547774
0. 0. 0. 0. 0. 0.03957485
0.03395359 0. 0.06926091 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0.00730949 0.07624771 0.20608185 0. 0. 0. 0. ]
References
----------
......
......@@ -236,20 +236,20 @@ def min_spanning_tree(g, weights=None, root=None, tree_map=None):
>>> g = gt.random_graph(100, lambda: (5, 5))
>>> tree = gt.min_spanning_tree(g)
>>> print tree.a
[0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0
1 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1
0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1
0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0
1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0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 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0]
References
----------
......@@ -525,9 +525,9 @@ def label_biconnected_components(g, eprop=None, vprop=None):
>>> g = gt.random_graph(100, lambda: 2, directed=False)
>>> comp, art, nc = gt.label_biconnected_components(g)
>>> print comp.a
[1 0 0 0 0 0 0 0 3 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 2 0 0 3 0 0 0 1 0 0 1 0 0 0 1 0 0 3 1 1 1 0 0 0 0 0 2 2 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 3 0 1 0 2 0 0 0 0 0 0 1 0 0 2 0 2 0 0]
[1 0 0 0 2 0 1 0 0 0 0 0 1 0 0 3 0 0 0 0 0 0 0 0 2 0 0 0 0 0 1 1 0 0 0 0 0
1 0 1 3 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 3 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 1 3 1 0 2 1 0 0 0 0 0 2 0 0 0 2]
>>> print art.a
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment