lemon/concepts/digraph.h
changeset 99 dbaa96cc1013
parent 57 c1acf0018c0a
child 107 31a2e6d28f61
     1.1 --- a/lemon/concepts/digraph.h	Thu Jan 24 17:36:45 2008 +0000
     1.2 +++ b/lemon/concepts/digraph.h	Thu Feb 07 21:28:39 2008 +0000
     1.3 @@ -348,6 +348,28 @@
     1.4        ///
     1.5        Node source(Arc) const { return INVALID; }
     1.6  
     1.7 +      /// \brief Returns the ID of the node.
     1.8 +      int id(Node) const { return -1; } 
     1.9 +
    1.10 +      /// \brief Returns the ID of the arc.
    1.11 +      int id(Arc) const { return -1; } 
    1.12 +
    1.13 +      /// \brief Returns the node with the given ID.
    1.14 +      ///
    1.15 +      /// \pre The argument should be a valid node ID in the graph.
    1.16 +      Node nodeFromId(int) const { return INVALID; } 
    1.17 +
    1.18 +      /// \brief Returns the arc with the given ID.
    1.19 +      ///
    1.20 +      /// \pre The argument should be a valid arc ID in the graph.
    1.21 +      Arc arcFromId(int) const { return INVALID; } 
    1.22 +
    1.23 +      /// \brief Returns an upper bound on the node IDs.
    1.24 +      int maxNodeId() const { return -1; } 
    1.25 +
    1.26 +      /// \brief Returns an upper bound on the arc IDs.
    1.27 +      int maxArcId() const { return -1; } 
    1.28 +
    1.29        void first(Node&) const {}
    1.30        void next(Node&) const {}
    1.31  
    1.32 @@ -361,6 +383,16 @@
    1.33        void firstOut(Arc&, const Node&) const {}
    1.34        void nextOut(Arc&) const {}
    1.35  
    1.36 +      // The second parameter is dummy.
    1.37 +      Node fromId(int, Node) const { return INVALID; }
    1.38 +      // The second parameter is dummy.
    1.39 +      Arc fromId(int, Arc) const { return INVALID; }
    1.40 +
    1.41 +      // Dummy parameter.
    1.42 +      int maxId(Node) const { return -1; } 
    1.43 +      // Dummy parameter.
    1.44 +      int maxId(Arc) const { return -1; } 
    1.45 +
    1.46        /// \brief The base node of the iterator.
    1.47        ///
    1.48        /// Gives back the base node of the iterator.
    1.49 @@ -439,6 +471,7 @@
    1.50        struct Constraints {
    1.51          void constraints() {
    1.52            checkConcept<IterableDigraphComponent<>, Digraph>();
    1.53 +	  checkConcept<IDableDigraphComponent<>, Digraph>();
    1.54            checkConcept<MappableDigraphComponent<>, Digraph>();
    1.55          }
    1.56        };