Commit 47aebb54 authored by Tiago Peixoto's avatar Tiago Peixoto

Simple documentation fixes.

parent 931abc91
......@@ -201,23 +201,23 @@ type*, which must be chosen from the predefined set:
.. table::
======================= ======================
Type name Alias
======================= ======================
``bool`` ``uint8_t``
``int32_t`` ``int``
``int64_t`` ``long``, ``long long``
``double`` ``float``
======================== ======================
Type name Alias
======================== ======================
``bool`` ``uint8_t``
``int32_t`` ``int``
``int64_t`` ``long``, ``long long``
``double`` ``float``
``long double``
``string``
``vector<bool>`` ``vector<uint8_t>``
``vector<int32_t>`` ``vector<int>``
``vector<int64_t>`` ``vector<long>``, ``vector<long long>``
``vector<double>`` ``vector<float>``
``vector<bool>`` ``vector<uint8_t>``
``vector<int32_t>`` ``vector<int>``
``vector<int64_t>`` ``vector<long>``, ``vector<long long>``
``vector<double>`` ``vector<float>``
``vector<long double>``
``vector<string>``
``python::object`` ``object``
======================= ======================
``python::object`` ``object``
======================== ======================
New property maps can be created for a given graph by calling the
:meth:`~graph_tool.Graph.new_vertex_property`, :meth:`~graph_tool.Graph.new_edge_property`, or
......
......@@ -232,22 +232,24 @@ def min_spanning_tree(g, weights=None, root=None, tree_map=None):
Examples
--------
>>> from numpy.random import seed
>>> from numpy.random import seed, random
>>> seed(42)
>>> g, pos = gt.triangulation(random((400, 2)) * 10, type="delaunay")
>>> weight = g.new_edge_property("double")
>>> for e in g.edges():
... weight[e] = norm(pos[e.target()].a - pos[e.source()].a)
... weight[e] = linalg.norm(pos[e.target()].a - pos[e.source()].a)
>>> tree = gt.min_spanning_tree(g, weights=weight)
>>> graph_draw(g, pos=pos, pin=True, output="triang_orig.png")
>>> gt.graph_draw(g, pos=pos, pin=True, output="triang_orig.png")
<...>
>>> g.set_edge_filter(tree)
>>> graph_draw(g, pos=pos, pin=True, output="triang_min_span_tree.png")
>>> gt.graph_draw(g, pos=pos, pin=True, output="triang_min_span_tree.png")
<...>
.. image:: triang_orig.png
.. image:: triang_orig_span_tree.png
:width: 400px
.. image:: triang_min_span_tree.png
:width: 400px
*Left:* Original graph, *Right:* The minimum spanning tree.
......@@ -875,8 +877,8 @@ def is_planar(g, embedding=False, kuratowski=False):
References
----------
.. [boyer-myrvold] John M. Boyer and Wendy J. Myrvold, "On the Cutting Edge:
Simplified O(n) Planarity by Edge Addition Journal of Graph Algorithms
and Applications", 8(2): 241-273, 2004.
Simplified O(n) Planarity by Edge Addition" Journal of Graph Algorithms
and Applications, 8(2): 241-273, 2004. http://www.emis.ams.org/journals/JGAA/accepted/2004/BoyerMyrvold2004.8.3.pdf
.. [boost-planarity] http://www.boost.org/libs/graph/doc/boyer_myrvold.html
"""
......
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