Changeset 1910:f95eea8c34b0 in lemon-0.x for lemon/bits/iterable_graph_extender.h
- Timestamp:
- 01/26/06 17:24:40 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2485
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/iterable_graph_extender.h
r1909 r1910 271 271 272 272 template <typename _Base> 273 class Iterable UBipartiteGraphExtender : public _Base {273 class IterableBpUGraphExtender : public _Base { 274 274 public: 275 275 typedef _Base Parent; 276 typedef Iterable UBipartiteGraphExtender Graph;276 typedef IterableBpUGraphExtender Graph; 277 277 278 278 typedef typename Parent::Node Node; 279 typedef typename Parent:: UpperNode UpperNode;280 typedef typename Parent:: LowerNode LowerNode;279 typedef typename Parent::ANode ANode; 280 typedef typename Parent::BNode BNode; 281 281 typedef typename Parent::Edge Edge; 282 282 typedef typename Parent::UEdge UEdge; … … 304 304 }; 305 305 306 class UpperNodeIt : public Node {307 friend class Iterable UBipartiteGraphExtender;308 const Graph* graph; 309 public: 310 311 UpperNodeIt() { }312 313 UpperNodeIt(Invalid i) : Node(INVALID) { }314 315 explicit UpperNodeIt(const Graph& _graph) : graph(&_graph) {316 graph->first Upper(static_cast<Node&>(*this));317 } 318 319 UpperNodeIt(const Graph& _graph, const Node& node)306 class ANodeIt : public Node { 307 friend class IterableBpUGraphExtender; 308 const Graph* graph; 309 public: 310 311 ANodeIt() { } 312 313 ANodeIt(Invalid i) : Node(INVALID) { } 314 315 explicit ANodeIt(const Graph& _graph) : graph(&_graph) { 316 graph->firstANode(static_cast<Node&>(*this)); 317 } 318 319 ANodeIt(const Graph& _graph, const Node& node) 320 320 : Node(node), graph(&_graph) {} 321 321 322 UpperNodeIt& operator++() {323 graph->next Upper(*this);324 return *this; 325 } 326 }; 327 328 class LowerNodeIt : public Node {329 friend class Iterable UBipartiteGraphExtender;330 const Graph* graph; 331 public: 332 333 LowerNodeIt() { }334 335 LowerNodeIt(Invalid i) : Node(INVALID) { }336 337 explicit LowerNodeIt(const Graph& _graph) : graph(&_graph) {338 graph->first Lower(static_cast<Node&>(*this));339 } 340 341 LowerNodeIt(const Graph& _graph, const Node& node)322 ANodeIt& operator++() { 323 graph->nextANode(*this); 324 return *this; 325 } 326 }; 327 328 class BNodeIt : public Node { 329 friend class IterableBpUGraphExtender; 330 const Graph* graph; 331 public: 332 333 BNodeIt() { } 334 335 BNodeIt(Invalid i) : Node(INVALID) { } 336 337 explicit BNodeIt(const Graph& _graph) : graph(&_graph) { 338 graph->firstBNode(static_cast<Node&>(*this)); 339 } 340 341 BNodeIt(const Graph& _graph, const Node& node) 342 342 : Node(node), graph(&_graph) {} 343 343 344 LowerNodeIt& operator++() {345 graph->next Lower(*this);344 BNodeIt& operator++() { 345 graph->nextBNode(*this); 346 346 return *this; 347 347 } … … 349 349 350 350 class EdgeIt : public Edge { 351 friend class Iterable UBipartiteGraphExtender;351 friend class IterableBpUGraphExtender; 352 352 const Graph* graph; 353 353 public: … … 372 372 373 373 class UEdgeIt : public UEdge { 374 friend class Iterable UBipartiteGraphExtender;374 friend class IterableBpUGraphExtender; 375 375 const Graph* graph; 376 376 public: … … 394 394 395 395 class OutEdgeIt : public Edge { 396 friend class Iterable UBipartiteGraphExtender;396 friend class IterableBpUGraphExtender; 397 397 const Graph* graph; 398 398 public: … … 419 419 420 420 class InEdgeIt : public Edge { 421 friend class Iterable UBipartiteGraphExtender;421 friend class IterableBpUGraphExtender; 422 422 const Graph* graph; 423 423 public: … … 471 471 472 472 class IncEdgeIt : public Parent::UEdge { 473 friend class Iterable UBipartiteGraphExtender;473 friend class IterableBpUGraphExtender; 474 474 const Graph* graph; 475 475 bool direction;
Note: See TracChangeset
for help on using the changeset viewer.