477 void nextOut(Edge&) const {} |
477 void nextOut(Edge&) const {} |
478 |
478 |
479 /// \brief The base node of the iterator. |
479 /// \brief The base node of the iterator. |
480 /// |
480 /// |
481 /// Gives back the base node of the iterator. |
481 /// Gives back the base node of the iterator. |
|
482 /// It is always the target of the pointed edge. |
482 Node baseNode(const InEdgeIt&) const { return INVALID; } |
483 Node baseNode(const InEdgeIt&) const { return INVALID; } |
483 |
484 |
484 /// \brief The running node of the iterator. |
485 /// \brief The running node of the iterator. |
485 /// |
486 /// |
486 /// Gives back the running node of the iterator. |
487 /// Gives back the running node of the iterator. |
|
488 /// It is always the source of the pointed edge. |
487 Node runningNode(const InEdgeIt&) const { return INVALID; } |
489 Node runningNode(const InEdgeIt&) const { return INVALID; } |
488 |
490 |
489 /// \brief The base node of the iterator. |
491 /// \brief The base node of the iterator. |
490 /// |
492 /// |
491 /// Gives back the base node of the iterator. |
493 /// Gives back the base node of the iterator. |
|
494 /// It is always the source of the pointed edge. |
492 Node baseNode(const OutEdgeIt&) const { return INVALID; } |
495 Node baseNode(const OutEdgeIt&) const { return INVALID; } |
493 |
496 |
494 /// \brief The running node of the iterator. |
497 /// \brief The running node of the iterator. |
495 /// |
498 /// |
496 /// Gives back the running node of the iterator. |
499 /// Gives back the running node of the iterator. |
|
500 /// It is always the target of the pointed edge. |
497 Node runningNode(const OutEdgeIt&) const { return INVALID; } |
501 Node runningNode(const OutEdgeIt&) const { return INVALID; } |
498 /// Read write map of the nodes to type \c T. |
502 |
499 |
503 /// \brief The opposite node on the given edge. |
500 /// \ingroup concept |
504 /// |
|
505 /// Gives back the opposite node on the given edge. |
|
506 Node oppositeNode(const Node&, const Edge&) const { return INVALID; } |
|
507 |
|
508 /// \brief Read write map of the nodes to type \c T. |
|
509 /// |
501 /// ReadWrite map of the nodes to type \c T. |
510 /// ReadWrite map of the nodes to type \c T. |
502 /// \sa Reference |
511 /// \sa Reference |
503 /// \warning Making maps that can handle bool type (NodeMap<bool>) |
512 /// \warning Making maps that can handle bool type (NodeMap<bool>) |
504 /// needs some extra attention! |
513 /// needs some extra attention! |
505 template<class T> |
514 template<class T> |
517 ///Assignment operator |
526 ///Assignment operator |
518 NodeMap& operator=(const NodeMap&) { return *this; } |
527 NodeMap& operator=(const NodeMap&) { return *this; } |
519 // \todo fix this concept |
528 // \todo fix this concept |
520 }; |
529 }; |
521 |
530 |
522 /// Read write map of the edges to type \c T. |
531 /// \brief Read write map of the edges to type \c T. |
523 |
532 /// |
524 /// \ingroup concept |
533 /// Reference map of the edges to type \c T. |
525 ///Reference map of the edges to type \c T. |
|
526 /// \sa Reference |
534 /// \sa Reference |
527 /// \warning Making maps that can handle bool type (EdgeMap<bool>) |
535 /// \warning Making maps that can handle bool type (EdgeMap<bool>) |
528 /// needs some extra attention! |
536 /// needs some extra attention! |
529 template<class T> |
537 template<class T> |
530 class EdgeMap : public ReadWriteMap<Edge,T> |
538 class EdgeMap : public ReadWriteMap<Edge,T> |
608 |
616 |
609 template <typename _Graph> |
617 template <typename _Graph> |
610 struct Constraints : public _ErasableGraph::Constraints<_Graph> {}; |
618 struct Constraints : public _ErasableGraph::Constraints<_Graph> {}; |
611 |
619 |
612 }; |
620 }; |
613 |
621 |
614 |
|
615 /************* New GraphBase stuff **************/ |
|
616 |
|
617 |
|
618 // /// A minimal GraphBase concept |
|
619 |
|
620 // /// This class describes a minimal concept which can be extended to a |
|
621 // /// full-featured graph with \ref GraphFactory. |
|
622 // class GraphBase { |
|
623 // public: |
|
624 |
|
625 // GraphBase() {} |
|
626 |
|
627 // /// \bug Should we demand that Node and Edge be subclasses of the |
|
628 // /// Graph class??? |
|
629 |
|
630 // typedef GraphItem<'n'> Node; |
|
631 // typedef GraphItem<'e'> Edge; |
|
632 |
|
633 // // class Node : public BaseGraphItem<'n'> {}; |
|
634 // // class Edge : public BaseGraphItem<'e'> {}; |
|
635 |
|
636 // // Graph operation |
|
637 // void firstNode(Node &n) const { } |
|
638 // void firstEdge(Edge &e) const { } |
|
639 |
|
640 // void firstOutEdge(Edge &e, Node) const { } |
|
641 // void firstInEdge(Edge &e, Node) const { } |
|
642 |
|
643 // void nextNode(Node &n) const { } |
|
644 // void nextEdge(Edge &e) const { } |
|
645 |
|
646 |
|
647 // // Question: isn't it reasonable if this methods have a Node |
|
648 // // parameter? Like this: |
|
649 // // Edge& nextOut(Edge &e, Node) const { return e; } |
|
650 // void nextOutEdge(Edge &e) const { } |
|
651 // void nextInEdge(Edge &e) const { } |
|
652 |
|
653 // Node target(Edge) const { return Node(); } |
|
654 // Node source(Edge) const { return Node(); } |
|
655 |
|
656 |
|
657 // // Do we need id, nodeNum, edgeNum and co. in this basic graphbase |
|
658 // // concept? |
|
659 |
|
660 |
|
661 // // Maps. |
|
662 // // |
|
663 // // We need a special slimer concept which does not provide maps (it |
|
664 // // wouldn't be strictly slimer, cause for map-factory id() & friends |
|
665 // // a required...) |
|
666 |
|
667 // template<typename T> |
|
668 // class NodeMap : public GraphMap<GraphBase, Node, T> {}; |
|
669 |
|
670 // template<typename T> |
|
671 // class EdgeMap : public GraphMap<GraphBase, Node, T> {}; |
|
672 // }; |
|
673 |
|
674 // @} |
622 // @} |
675 } //namespace concept |
623 } //namespace concept |
676 } //namespace lemon |
624 } //namespace lemon |
677 |
625 |
678 |
626 |