Changeset 986:e997802b855c in lemon-0.x for doc/graphs.dox
- Timestamp:
- 11/13/04 13:53:28 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/graphs.dox
r959 r986 126 126 std::cout << "Edges:"; 127 127 for (EdgeIt i(g); i!=INVALID; ++i) 128 std::cout << " (" << g.id(g. tail(i)) << "," << g.id(g.head(i)) << ")";128 std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")"; 129 129 std::cout << std::endl; 130 130 \endcode … … 134 134 \endcode 135 135 136 We can also iterate through all edges of the graph very similarly. The headand137 tailmember functions can be used to access the endpoints of an edge.136 We can also iterate through all edges of the graph very similarly. The target and 137 source member functions can be used to access the endpoints of an edge. 138 138 139 139 \code … … 142 142 std::cout << "Out-edges of node " << g.id(first_node) << ":"; 143 143 for (OutEdgeIt i(g, first_node); i!=INVALID; ++i) 144 std::cout << " (" << g.id(g. tail(i)) << "," << g.id(g.head(i)) << ")";144 std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")"; 145 145 std::cout << std::endl; 146 146 147 147 std::cout << "In-edges of node " << g.id(first_node) << ":"; 148 148 for (InEdgeIt i(g, first_node); i!=INVALID; ++i) 149 std::cout << " (" << g.id(g. tail(i)) << "," << g.id(g.head(i)) << ")";149 std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")"; 150 150 std::cout << std::endl; 151 151 \endcode … … 167 167 std::cout << "Id Edge Value" << std::endl; 168 168 for (EdgeIt e(g); e!=INVALID; ++e) 169 std::cout << g.id(e) << " (" << g.id(g. tail(e)) << "," << g.id(g.head(e))169 std::cout << g.id(e) << " (" << g.id(g.source(e)) << "," << g.id(g.target(e)) 170 170 << ") " << m[e] << std::endl; 171 171 \endcode
Note: See TracChangeset
for help on using the changeset viewer.