diff -r 6ec5dbed8f18 -r d718974f1290 lemon/concepts/digraph.h --- a/lemon/concepts/digraph.h Wed Jan 23 16:26:41 2008 +0100 +++ b/lemon/concepts/digraph.h Fri Jan 25 13:39:52 2008 +0100 @@ -348,6 +348,28 @@ /// Node source(Arc) const { return INVALID; } + /// \brief Returns the ID of the node. + int id(Node) const { return -1; } + + /// \brief Returns the ID of the arc. + int id(Arc) const { return -1; } + + /// \brief Returns the node with the given ID. + /// + /// \pre The argument should be a valid node ID in the graph. + Node nodeFromId(int) const { return INVALID; } + + /// \brief Returns the arc with the given ID. + /// + /// \pre The argument should be a valid arc ID in the graph. + Arc arcFromId(int) const { return INVALID; } + + /// \brief Returns an upper bound on the node IDs. + int maxNodeId() const { return -1; } + + /// \brief Returns an upper bound on the arc IDs. + int maxArcId() const { return -1; } + void first(Node&) const {} void next(Node&) const {} @@ -361,6 +383,16 @@ void firstOut(Arc&, const Node&) const {} void nextOut(Arc&) const {} + // The second parameter is dummy. + Node fromId(int, Node) const { return INVALID; } + // The second parameter is dummy. + Arc fromId(int, Arc) const { return INVALID; } + + // Dummy parameter. + int maxId(Node) const { return -1; } + // Dummy parameter. + int maxId(Arc) const { return -1; } + /// \brief The base node of the iterator. /// /// Gives back the base node of the iterator. @@ -439,6 +471,7 @@ struct Constraints { void constraints() { checkConcept, Digraph>(); + checkConcept, Digraph>(); checkConcept, Digraph>(); } };