lemon/concepts/digraph.h
changeset 103 b68a7e348e00
parent 57 c1acf0018c0a
child 107 31a2e6d28f61
equal deleted inserted replaced
0:f9807abb7643 1:e4c39a899d1b
   346 
   346 
   347       ///Gives back the source node of an arc.
   347       ///Gives back the source node of an arc.
   348       ///
   348       ///
   349       Node source(Arc) const { return INVALID; }
   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       void first(Node&) const {}
   373       void first(Node&) const {}
   352       void next(Node&) const {}
   374       void next(Node&) const {}
   353 
   375 
   354       void first(Arc&) const {}
   376       void first(Arc&) const {}
   355       void next(Arc&) const {}
   377       void next(Arc&) const {}
   358       void firstIn(Arc&, const Node&) const {}
   380       void firstIn(Arc&, const Node&) const {}
   359       void nextIn(Arc&) const {}
   381       void nextIn(Arc&) const {}
   360 
   382 
   361       void firstOut(Arc&, const Node&) const {}
   383       void firstOut(Arc&, const Node&) const {}
   362       void nextOut(Arc&) const {}
   384       void nextOut(Arc&) const {}
       
   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; } 
   363 
   395 
   364       /// \brief The base node of the iterator.
   396       /// \brief The base node of the iterator.
   365       ///
   397       ///
   366       /// Gives back the base node of the iterator.
   398       /// Gives back the base node of the iterator.
   367       /// It is always the target of the pointed arc.
   399       /// It is always the target of the pointed arc.
   437 
   469 
   438       template <typename RDigraph>
   470       template <typename RDigraph>
   439       struct Constraints {
   471       struct Constraints {
   440         void constraints() {
   472         void constraints() {
   441           checkConcept<IterableDigraphComponent<>, Digraph>();
   473           checkConcept<IterableDigraphComponent<>, Digraph>();
       
   474 	  checkConcept<IDableDigraphComponent<>, Digraph>();
   442           checkConcept<MappableDigraphComponent<>, Digraph>();
   475           checkConcept<MappableDigraphComponent<>, Digraph>();
   443         }
   476         }
   444       };
   477       };
   445 
   478 
   446     };
   479     };