lemon/concepts/graph.h
changeset 103 b68a7e348e00
parent 57 c1acf0018c0a
child 78 c46b3453455f
equal deleted inserted replaced
0:1692f534aaea 1:29a4c031fd00
   622       Node source(Arc) const { return INVALID; }
   622       Node source(Arc) const { return INVALID; }
   623 
   623 
   624       /// \brief Target node of the directed arc.
   624       /// \brief Target node of the directed arc.
   625       Node target(Arc) const { return INVALID; }
   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       void first(Node&) const {}
   660       void first(Node&) const {}
   628       void next(Node&) const {}
   661       void next(Node&) const {}
   629 
   662 
   630       void first(Edge&) const {}
   663       void first(Edge&) const {}
   631       void next(Edge&) const {}
   664       void next(Edge&) const {}
   637       void nextOut(Arc&) const {}
   670       void nextOut(Arc&) const {}
   638 
   671 
   639       void firstIn(Arc&, Node) const {}
   672       void firstIn(Arc&, Node) const {}
   640       void nextIn(Arc&) const {}
   673       void nextIn(Arc&) const {}
   641 
   674 
   642 
       
   643       void firstInc(Edge &, bool &, const Node &) const {}
   675       void firstInc(Edge &, bool &, const Node &) const {}
   644       void nextInc(Edge &, bool &) const {}
   676       void nextInc(Edge &, bool &) const {}
       
   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; } 
   645 
   691 
   646       /// \brief Base node of the iterator
   692       /// \brief Base node of the iterator
   647       ///
   693       ///
   648       /// Returns the base node (the source in this case) of the iterator
   694       /// Returns the base node (the source in this case) of the iterator
   649       Node baseNode(OutArcIt e) const {
   695       Node baseNode(OutArcIt e) const {
   687 
   733 
   688       template <typename Graph>
   734       template <typename Graph>
   689       struct Constraints {
   735       struct Constraints {
   690 	void constraints() {
   736 	void constraints() {
   691 	  checkConcept<IterableGraphComponent<>, Graph>();
   737 	  checkConcept<IterableGraphComponent<>, Graph>();
       
   738 	  checkConcept<IDableGraphComponent<>, Graph>();
   692 	  checkConcept<MappableGraphComponent<>, Graph>();
   739 	  checkConcept<MappableGraphComponent<>, Graph>();
   693 	}
   740 	}
   694       };
   741       };
   695 
   742 
   696     };
   743     };