0
2
0
... | ... |
@@ -339,37 +339,69 @@ |
339 | 339 |
}; |
340 | 340 |
///Gives back the target node of an arc. |
341 | 341 |
|
342 | 342 |
///Gives back the target node of an arc. |
343 | 343 |
/// |
344 | 344 |
Node target(Arc) const { return INVALID; } |
345 | 345 |
///Gives back the source node of an arc. |
346 | 346 |
|
347 | 347 |
///Gives back the source node of an arc. |
348 | 348 |
/// |
349 | 349 |
Node source(Arc) const { return INVALID; } |
350 | 350 |
|
351 |
/// \brief Returns the ID of the node. |
|
352 |
int id(Node) const { return -1; } |
|
353 |
|
|
354 |
/// \brief Returns the ID of the arc. |
|
355 |
int id(Arc) const { return -1; } |
|
356 |
|
|
357 |
/// \brief Returns the node with the given ID. |
|
358 |
/// |
|
359 |
/// \pre The argument should be a valid node ID in the graph. |
|
360 |
Node nodeFromId(int) const { return INVALID; } |
|
361 |
|
|
362 |
/// \brief Returns the arc with the given ID. |
|
363 |
/// |
|
364 |
/// \pre The argument should be a valid arc ID in the graph. |
|
365 |
Arc arcFromId(int) const { return INVALID; } |
|
366 |
|
|
367 |
/// \brief Returns an upper bound on the node IDs. |
|
368 |
int maxNodeId() const { return -1; } |
|
369 |
|
|
370 |
/// \brief Returns an upper bound on the arc IDs. |
|
371 |
int maxArcId() const { return -1; } |
|
372 |
|
|
351 | 373 |
void first(Node&) const {} |
352 | 374 |
void next(Node&) const {} |
353 | 375 |
|
354 | 376 |
void first(Arc&) const {} |
355 | 377 |
void next(Arc&) const {} |
356 | 378 |
|
357 | 379 |
|
358 | 380 |
void firstIn(Arc&, const Node&) const {} |
359 | 381 |
void nextIn(Arc&) const {} |
360 | 382 |
|
361 | 383 |
void firstOut(Arc&, const Node&) const {} |
362 | 384 |
void nextOut(Arc&) const {} |
363 | 385 |
|
386 |
// The second parameter is dummy. |
|
387 |
Node fromId(int, Node) const { return INVALID; } |
|
388 |
// The second parameter is dummy. |
|
389 |
Arc fromId(int, Arc) const { return INVALID; } |
|
390 |
|
|
391 |
// Dummy parameter. |
|
392 |
int maxId(Node) const { return -1; } |
|
393 |
// Dummy parameter. |
|
394 |
int maxId(Arc) const { return -1; } |
|
395 |
|
|
364 | 396 |
/// \brief The base node of the iterator. |
365 | 397 |
/// |
366 | 398 |
/// Gives back the base node of the iterator. |
367 | 399 |
/// It is always the target of the pointed arc. |
368 | 400 |
Node baseNode(const InArcIt&) const { return INVALID; } |
369 | 401 |
|
370 | 402 |
/// \brief The running node of the iterator. |
371 | 403 |
/// |
372 | 404 |
/// Gives back the running node of the iterator. |
373 | 405 |
/// It is always the source of the pointed arc. |
374 | 406 |
Node runningNode(const InArcIt&) const { return INVALID; } |
375 | 407 |
|
... | ... |
@@ -430,24 +462,25 @@ |
430 | 462 |
///Assignment operator |
431 | 463 |
template <typename CMap> |
432 | 464 |
ArcMap& operator=(const CMap&) { |
433 | 465 |
checkConcept<ReadMap<Arc, T>, CMap>(); |
434 | 466 |
return *this; |
435 | 467 |
} |
436 | 468 |
}; |
437 | 469 |
|
438 | 470 |
template <typename RDigraph> |
439 | 471 |
struct Constraints { |
440 | 472 |
void constraints() { |
441 | 473 |
checkConcept<IterableDigraphComponent<>, Digraph>(); |
474 |
checkConcept<IDableDigraphComponent<>, Digraph>(); |
|
442 | 475 |
checkConcept<MappableDigraphComponent<>, Digraph>(); |
443 | 476 |
} |
444 | 477 |
}; |
445 | 478 |
|
446 | 479 |
}; |
447 | 480 |
|
448 | 481 |
} //namespace concepts |
449 | 482 |
} //namespace lemon |
450 | 483 |
|
451 | 484 |
|
452 | 485 |
|
453 | 486 |
#endif // LEMON_CONCEPT_DIGRAPH_H |
... | ... |
@@ -615,43 +615,89 @@ |
615 | 615 |
/// \sa direction |
616 | 616 |
Node u(Edge) const { return INVALID; } |
617 | 617 |
|
618 | 618 |
/// \brief Second node of the edge. |
619 | 619 |
Node v(Edge) const { return INVALID; } |
620 | 620 |
|
621 | 621 |
/// \brief Source node of the directed arc. |
622 | 622 |
Node source(Arc) const { return INVALID; } |
623 | 623 |
|
624 | 624 |
/// \brief Target node of the directed arc. |
625 | 625 |
Node target(Arc) const { return INVALID; } |
626 | 626 |
|
627 |
/// \brief Returns the id of the node. |
|
628 |
int id(Node) const { return -1; } |
|
629 |
|
|
630 |
/// \brief Returns the id of the edge. |
|
631 |
int id(Edge) const { return -1; } |
|
632 |
|
|
633 |
/// \brief Returns the id of the arc. |
|
634 |
int id(Arc) const { return -1; } |
|
635 |
|
|
636 |
/// \brief Returns the node with the given id. |
|
637 |
/// |
|
638 |
/// \pre The argument should be a valid node id in the graph. |
|
639 |
Node nodeFromId(int) const { return INVALID; } |
|
640 |
|
|
641 |
/// \brief Returns the edge with the given id. |
|
642 |
/// |
|
643 |
/// \pre The argument should be a valid edge id in the graph. |
|
644 |
Edge edgeFromId(int) const { return INVALID; } |
|
645 |
|
|
646 |
/// \brief Returns the arc with the given id. |
|
647 |
/// |
|
648 |
/// \pre The argument should be a valid arc id in the graph. |
|
649 |
Arc arcFromId(int) const { return INVALID; } |
|
650 |
|
|
651 |
/// \brief Returns an upper bound on the node IDs. |
|
652 |
int maxNodeId() const { return -1; } |
|
653 |
|
|
654 |
/// \brief Returns an upper bound on the edge IDs. |
|
655 |
int maxEdgeId() const { return -1; } |
|
656 |
|
|
657 |
/// \brief Returns an upper bound on the arc IDs. |
|
658 |
int maxArcId() const { return -1; } |
|
659 |
|
|
627 | 660 |
void first(Node&) const {} |
628 | 661 |
void next(Node&) const {} |
629 | 662 |
|
630 | 663 |
void first(Edge&) const {} |
631 | 664 |
void next(Edge&) const {} |
632 | 665 |
|
633 | 666 |
void first(Arc&) const {} |
634 | 667 |
void next(Arc&) const {} |
635 | 668 |
|
636 | 669 |
void firstOut(Arc&, Node) const {} |
637 | 670 |
void nextOut(Arc&) const {} |
638 | 671 |
|
639 | 672 |
void firstIn(Arc&, Node) const {} |
640 | 673 |
void nextIn(Arc&) const {} |
641 | 674 |
|
642 |
|
|
643 | 675 |
void firstInc(Edge &, bool &, const Node &) const {} |
644 | 676 |
void nextInc(Edge &, bool &) const {} |
645 | 677 |
|
678 |
// The second parameter is dummy. |
|
679 |
Node fromId(int, Node) const { return INVALID; } |
|
680 |
// The second parameter is dummy. |
|
681 |
Edge fromId(int, Edge) const { return INVALID; } |
|
682 |
// The second parameter is dummy. |
|
683 |
Arc fromId(int, Arc) const { return INVALID; } |
|
684 |
|
|
685 |
// Dummy parameter. |
|
686 |
int maxId(Node) const { return -1; } |
|
687 |
// Dummy parameter. |
|
688 |
int maxId(Edge) const { return -1; } |
|
689 |
// Dummy parameter. |
|
690 |
int maxId(Arc) const { return -1; } |
|
691 |
|
|
646 | 692 |
/// \brief Base node of the iterator |
647 | 693 |
/// |
648 | 694 |
/// Returns the base node (the source in this case) of the iterator |
649 | 695 |
Node baseNode(OutArcIt e) const { |
650 | 696 |
return source(e); |
651 | 697 |
} |
652 | 698 |
/// \brief Running node of the iterator |
653 | 699 |
/// |
654 | 700 |
/// Returns the running node (the target in this case) of the |
655 | 701 |
/// iterator |
656 | 702 |
Node runningNode(OutArcIt e) const { |
657 | 703 |
return target(e); |
... | ... |
@@ -680,23 +726,24 @@ |
680 | 726 |
|
681 | 727 |
/// \brief Running node of the iterator |
682 | 728 |
/// |
683 | 729 |
/// Returns the running node of the iterator |
684 | 730 |
Node runningNode(IncArcIt) const { |
685 | 731 |
return INVALID; |
686 | 732 |
} |
687 | 733 |
|
688 | 734 |
template <typename Graph> |
689 | 735 |
struct Constraints { |
690 | 736 |
void constraints() { |
691 | 737 |
checkConcept<IterableGraphComponent<>, Graph>(); |
738 |
checkConcept<IDableGraphComponent<>, Graph>(); |
|
692 | 739 |
checkConcept<MappableGraphComponent<>, Graph>(); |
693 | 740 |
} |
694 | 741 |
}; |
695 | 742 |
|
696 | 743 |
}; |
697 | 744 |
|
698 | 745 |
} |
699 | 746 |
|
700 | 747 |
} |
701 | 748 |
|
702 | 749 |
#endif |
0 comments (0 inline)