Changeset 2031:080d51024ac5 in lemon0.x for lemon/graph_utils.h
 Timestamp:
 04/03/06 11:45:23 (14 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2670
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/graph_utils.h
r2029 r2031 49 49 ///This \c \#define creates convenience typedefs for the following types 50 50 ///of \c Graph: \c Node, \c NodeIt, \c Edge, \c EdgeIt, \c InEdgeIt, 51 ///\c OutEdgeIt, \c BoolNodeMap, \c IntNodeMap, \c DoubleNodeMap, 52 ///\c BoolEdgeMap, \c IntEdgeMap, \c DoubleEdgeMap. 51 ///\c OutEdgeIt 53 52 ///\note If \c G it a template parameter, it should be used in this way. 54 53 ///\code … … 65 64 typedef Graph:: InEdgeIt InEdgeIt; \ 66 65 typedef Graph::OutEdgeIt OutEdgeIt; 67 // typedef Graph::template NodeMap<bool> BoolNodeMap; 68 // typedef Graph::template NodeMap<int> IntNodeMap; 69 // typedef Graph::template NodeMap<double> DoubleNodeMap; 70 // typedef Graph::template EdgeMap<bool> BoolEdgeMap; 71 // typedef Graph::template EdgeMap<int> IntEdgeMap; 72 // typedef Graph::template EdgeMap<double> DoubleEdgeMap; 73 66 74 67 ///Creates convenience typedefs for the undirected graph types and iterators 75 68 … … 77 70 ///\ref GRAPH_TYPEDEFS(Graph) and three more, namely it creates 78 71 ///\c UEdge, \c UEdgeIt, \c IncEdgeIt, 79 ///\c BoolUEdgeMap, \c IntUEdgeMap, \c DoubleUEdgeMap.80 72 /// 81 73 ///\note If \c G it a template parameter, it should be used in this way. … … 94 86 // typedef Graph::template UEdgeMap<int> IntUEdgeMap; 95 87 // typedef Graph::template UEdgeMap<double> DoubleUEdgeMap; 96 97 88 89 ///\brief Creates convenience typedefs for the bipartite undirected graph 90 ///types and iterators 91 92 ///This \c \#define creates the same convenience typedefs as defined by 93 ///\ref UGRAPH_TYPEDEFS(Graph) and two more, namely it creates 94 ///\c ANodeIt, \c BNodeIt, 95 /// 96 ///\note If \c G it a template parameter, it should be used in this way. 97 ///\code 98 /// BPUGRAPH_TYPEDEFS(typename G) 99 ///\endcode 100 /// 101 ///\warning There are no typedefs for the graph maps because of the lack of 102 ///template typedefs in C++. 103 #define BPUGRAPH_TYPEDEFS(Graph) \ 104 UGRAPH_TYPEDEFS(Graph) \ 105 typedef Graph::ANodeIt ANodeIt; \ 106 typedef Graph::BNodeIt BNodeIt; 98 107 99 108 /// \brief Function to count the items in the graph. … … 431 440 if (u != v) { 432 441 if (e == INVALID) { 433 g.firstInc(e, u, b);442 g.firstInc(e, b, u); 434 443 } else { 435 444 b = g.source(e) == u; … … 441 450 } else { 442 451 if (e == INVALID) { 443 g.firstInc(e, u, b);452 g.firstInc(e, b, u); 444 453 } else { 445 454 b = true; … … 486 495 ///\endcode 487 496 template <typename Graph> 488 inline typename Graph::UEdge find Edge(const Graph &g,489 typename Graph::Node u,490 typename Graph::Node v,491 typename Graph::UEdge prev= INVALID) {492 return _graph_utils_bits::FindUEdgeSelector<Graph>::find(g, u, v, p rev);497 inline typename Graph::UEdge findUEdge(const Graph &g, 498 typename Graph::Node u, 499 typename Graph::Node v, 500 typename Graph::UEdge p = INVALID) { 501 return _graph_utils_bits::FindUEdgeSelector<Graph>::find(g, u, v, p); 493 502 } 494 503
Note: See TracChangeset
for help on using the changeset viewer.