diff --git a/doc/quickstart.rst b/doc/quickstart.rst index 2fa9543fe089968cb5d3c3935b58d0933ccc3d2d..fe413d0d6def74137bf1988874308961d0a5bf94 100644 --- a/doc/quickstart.rst +++ b/doc/quickstart.rst @@ -348,8 +348,8 @@ vertices in the graph. is being used. Removal during iteration will cause bad things to happen. -Faster iteration over vertices and edges without descriptor -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +Faster iteration over vertices and edges without descriptors +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" The mode of iteration considered above is convenient, but requires the creation of vertex and edge descriptor objects, which incurs a @@ -389,8 +389,8 @@ The equivalent of the above examples can be obtained as: 9 10 11 - (0, 1) - (2, 3) + [0, 1] + [2, 3] and likewise for the iteration over the neighborhood of a vertex: @@ -405,9 +405,9 @@ and likewise for the iteration over the neighborhood of a vertex: .. testoutput:: :hide: - (0, 1) + [0, 1] 1 - (2, 3) + [2, 3] 3 diff --git a/src/graph_tool/__init__.py b/src/graph_tool/__init__.py index 52f549d22c8a1fe5e50b492637293824eb676b57..4100ef7add5970740788e22ceb11b63c3721b515 100644 --- a/src/graph_tool/__init__.py +++ b/src/graph_tool/__init__.py @@ -1813,8 +1813,6 @@ class Graph(object): 2 3 4 - 5 - """ viter = libcore.get_vertex_iter(self.__graph, 0, [vp._get_any() for vp in vprops]) @@ -1927,9 +1925,14 @@ class Graph(object): ... print(s, t, i) ... if s == 5: ... break + 1 0 0 + 2 0 1 2 1 2 - 3 4 0 - 5 0 1 + 3 0 3 + 3 1 4 + 3 2 5 + 4 0 6 + 5 0 7 """ eiter = libcore.get_edge_iter(self.__graph, 0, [ep._get_any() for ep in eprops])