Changeset 1130:0759d974de81 in lemon-main for lemon/bits
- Timestamp:
- 01/05/14 22:24:56 (10 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- lemon/bits
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/graph_adaptor_extender.h
r1092 r1130 86 86 }; 87 87 88 LemonRangeWrapper1<NodeIt, Adaptor> nodes() { 89 return LemonRangeWrapper1<NodeIt, Adaptor>(*this); 90 } 88 91 89 92 class ArcIt : public Arc { … … 108 111 109 112 }; 113 114 LemonRangeWrapper1<ArcIt, Adaptor> arcs() { 115 return LemonRangeWrapper1<ArcIt, Adaptor>(*this); 116 } 110 117 111 118 … … 133 140 }; 134 141 142 LemonRangeWrapper2<OutArcIt, Adaptor, Node> outArcs(const Node& u) const { 143 return LemonRangeWrapper2<OutArcIt, Adaptor, Node>(*this, u); 144 } 145 135 146 136 147 class InArcIt : public Arc { … … 156 167 157 168 }; 169 170 LemonRangeWrapper2<InArcIt, Adaptor, Node> inArcs(const Node& u) const { 171 return LemonRangeWrapper2<InArcIt, Adaptor, Node>(*this, u); 172 } 158 173 159 174 Node baseNode(const OutArcIt &e) const { … … 255 270 }; 256 271 272 LemonRangeWrapper1<NodeIt, Adaptor> nodes() { 273 return LemonRangeWrapper1<NodeIt, Adaptor>(*this); 274 } 275 257 276 258 277 class ArcIt : public Arc { … … 277 296 278 297 }; 298 299 LemonRangeWrapper1<ArcIt, Adaptor> arcs() { 300 return LemonRangeWrapper1<ArcIt, Adaptor>(*this); 301 } 279 302 280 303 … … 302 325 }; 303 326 327 LemonRangeWrapper2<OutArcIt, Adaptor, Node> outArcs(const Node& u) const { 328 return LemonRangeWrapper2<OutArcIt, Adaptor, Node>(*this, u); 329 } 330 304 331 305 332 class InArcIt : public Arc { … … 326 353 }; 327 354 355 LemonRangeWrapper2<InArcIt, Adaptor, Node> inArcs(const Node& u) const { 356 return LemonRangeWrapper2<InArcIt, Adaptor, Node>(*this, u); 357 } 358 328 359 class EdgeIt : public Parent::Edge { 329 360 const Adaptor* _adaptor; … … 347 378 348 379 }; 380 381 LemonRangeWrapper1<EdgeIt, Adaptor> edges() { 382 return LemonRangeWrapper1<EdgeIt, Adaptor>(*this); 383 } 384 349 385 350 386 class IncEdgeIt : public Edge { … … 373 409 }; 374 410 411 LemonRangeWrapper2<IncEdgeIt, Adaptor, Node> incEdges(const Node& u) const { 412 return LemonRangeWrapper2<IncEdgeIt, Adaptor, Node>(*this, u); 413 } 414 415 375 416 Node baseNode(const OutArcIt &a) const { 376 417 return Parent::source(a); -
lemon/bits/graph_extender.h
r1092 r1130 28 28 #include <lemon/concepts/maps.h> 29 29 30 #include <lemon/bits/stl_iterators.h> 31 30 32 //\ingroup graphbits 31 33 //\file … … 117 119 }; 118 120 121 LemonRangeWrapper1<NodeIt, Digraph> nodes() const { 122 return LemonRangeWrapper1<NodeIt, Digraph>(*this); 123 } 124 119 125 120 126 class ArcIt : public Arc { … … 139 145 140 146 }; 147 148 LemonRangeWrapper1<ArcIt, Digraph> arcs() const { 149 return LemonRangeWrapper1<ArcIt, Digraph>(*this); 150 } 141 151 142 152 … … 164 174 }; 165 175 176 LemonRangeWrapper2<OutArcIt, Digraph, Node> outArcs(const Node& u) const { 177 return LemonRangeWrapper2<OutArcIt, Digraph, Node>(*this, u); 178 } 179 166 180 167 181 class InArcIt : public Arc { … … 187 201 188 202 }; 203 204 LemonRangeWrapper2<InArcIt, Digraph, Node> inArcs(const Node& u) const { 205 return LemonRangeWrapper2<InArcIt, Digraph, Node>(*this, u); 206 } 189 207 190 208 // \brief Base node of the iterator … … 437 455 }; 438 456 457 LemonRangeWrapper1<NodeIt, Graph> nodes() const { 458 return LemonRangeWrapper1<NodeIt, Graph>(*this); 459 } 460 439 461 440 462 class ArcIt : public Arc { … … 459 481 460 482 }; 483 484 LemonRangeWrapper1<ArcIt, Graph> arcs() const { 485 return LemonRangeWrapper1<ArcIt, Graph>(*this); 486 } 461 487 462 488 … … 484 510 }; 485 511 512 LemonRangeWrapper2<OutArcIt, Graph, Node> outArcs(const Node& u) const { 513 return LemonRangeWrapper2<OutArcIt, Graph, Node>(*this, u); 514 } 515 486 516 487 517 class InArcIt : public Arc { … … 508 538 }; 509 539 540 LemonRangeWrapper2<InArcIt, Graph, Node> inArcs(const Node& u) const { 541 return LemonRangeWrapper2<InArcIt, Graph, Node>(*this, u); 542 } 543 510 544 511 545 class EdgeIt : public Parent::Edge { … … 530 564 531 565 }; 566 567 LemonRangeWrapper1<EdgeIt, Graph> edges() const { 568 return LemonRangeWrapper1<EdgeIt, Graph>(*this); 569 } 570 532 571 533 572 class IncEdgeIt : public Parent::Edge { … … 555 594 } 556 595 }; 596 597 LemonRangeWrapper2<IncEdgeIt, Graph, Node> incEdges(const Node& u) const { 598 return LemonRangeWrapper2<IncEdgeIt, Graph, Node>(*this, u); 599 } 600 557 601 558 602 // \brief Base node of the iterator … … 904 948 }; 905 949 950 LemonRangeWrapper1<NodeIt, BpGraph> nodes() const { 951 return LemonRangeWrapper1<NodeIt, BpGraph>(*this); 952 } 953 954 906 955 class RedNodeIt : public RedNode { 907 956 const BpGraph* _graph; … … 926 975 }; 927 976 977 LemonRangeWrapper1<RedNodeIt, BpGraph> redNodes() const { 978 return LemonRangeWrapper1<RedNodeIt, BpGraph>(*this); 979 } 980 981 928 982 class BlueNodeIt : public BlueNode { 929 983 const BpGraph* _graph; … … 948 1002 }; 949 1003 1004 LemonRangeWrapper1<BlueNodeIt, BpGraph> blueNodes() const { 1005 return LemonRangeWrapper1<BlueNodeIt, BpGraph>(*this); 1006 } 1007 1008 950 1009 951 1010 class ArcIt : public Arc { … … 970 1029 971 1030 }; 1031 1032 LemonRangeWrapper1<ArcIt, BpGraph> arcs() const { 1033 return LemonRangeWrapper1<ArcIt, BpGraph>(*this); 1034 } 972 1035 973 1036 … … 995 1058 }; 996 1059 1060 LemonRangeWrapper2<OutArcIt, BpGraph, Node> outArcs(const Node& u) const { 1061 return LemonRangeWrapper2<OutArcIt, BpGraph, Node>(*this, u); 1062 } 1063 997 1064 998 1065 class InArcIt : public Arc { … … 1019 1086 }; 1020 1087 1088 LemonRangeWrapper2<InArcIt, BpGraph, Node> inArcs(const Node& u) const { 1089 return LemonRangeWrapper2<InArcIt, BpGraph, Node>(*this, u); 1090 } 1091 1021 1092 1022 1093 class EdgeIt : public Parent::Edge { … … 1041 1112 1042 1113 }; 1114 1115 LemonRangeWrapper1<EdgeIt, BpGraph> edges() const { 1116 return LemonRangeWrapper1<EdgeIt, BpGraph>(*this); 1117 } 1118 1043 1119 1044 1120 class IncEdgeIt : public Parent::Edge { … … 1066 1142 } 1067 1143 }; 1144 1145 LemonRangeWrapper2<IncEdgeIt, BpGraph, Node> incEdges(const Node& u) const { 1146 return LemonRangeWrapper2<IncEdgeIt, BpGraph, Node>(*this, u); 1147 } 1148 1068 1149 1069 1150 // \brief Base node of the iterator
Note: See TracChangeset
for help on using the changeset viewer.