Skip to content

Commit 5b83231

Browse files
committed
Merge pull request snap-stanford#43 from rcchen/master
Add Nodes() and Edges() to the reference
2 parents 356a0da + a009c0a commit 5b83231

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

doc/source/reference/graphs.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ TUNGraph
4848

4949
Saves the graph to a binary stream *SOut*.
5050

51+
.. describe:: Nodes()
52+
53+
Returns a generator for the nodes in the graph.
54+
5155
.. describe:: GetNodes()
5256

5357
Returns the number of nodes in the graph.
@@ -90,6 +94,10 @@ TUNGraph
9094

9195
Returns the maximum ID of a any node in the graph.
9296

97+
.. describe:: Edges()
98+
99+
Returns a generator for the edges in the graph.
100+
93101
.. describe:: GetEdges()
94102

95103
Returns the number of edges in the graph.
@@ -323,6 +331,10 @@ TNGraph
323331

324332
Saves the graph to a binary stream *SOut*.
325333

334+
.. describe:: Nodes()
335+
336+
Returns a generator for the nodes in the graph.
337+
326338
.. describe:: GetNodes()
327339

328340
Returns the number of nodes in the graph.
@@ -366,6 +378,10 @@ TNGraph
366378

367379
Returns the maximum ID of a any node in the graph.
368380

381+
.. describe:: Edges()
382+
383+
Returns a generator for the edges in the graph.
384+
369385
.. describe:: GetEdges()
370386

371387
Returns the number of edges in the graph.
@@ -614,6 +630,10 @@ TNEANet
614630

615631
Saves the graph to a binary stream *SOut*.
616632

633+
.. describe:: Nodes()
634+
635+
Returns a generator for the nodes in the graph.
636+
617637
.. describe:: GetNodes()
618638

619639
Returns the number of nodes in the graph.
@@ -657,6 +677,10 @@ TNEANet
657677

658678
Returns the maximum ID of a any node in the graph.
659679

680+
.. describe:: Edges()
681+
682+
Returns a generator for the edges in the graph.
683+
660684
.. describe:: GetEdges()
661685

662686
Returns the number of edges in the graph.

doc/todo.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Proposed Features
22
Apr 21, 2014
33

4-
- Add the iterator methods Nodes() and Edges() to the reference text
5-
64
- Remove AddNode(NodeI) from the reference text
75

86
- Convenience methods for graph density and for reversing a directed graph

0 commit comments

Comments
 (0)