COIN-OR::LEMON - Graph Library

Changeset 61:d718974f1290 in lemon-1.0 for lemon/concepts/digraph.h


Ignore:
Timestamp:
01/25/08 13:39:52 (17 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Digraph and Graph concept should be conform to the IDable... concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/digraph.h

    r57 r61  
    349349      Node source(Arc) const { return INVALID; }
    350350
     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
    351373      void first(Node&) const {}
    352374      void next(Node&) const {}
     
    361383      void firstOut(Arc&, const Node&) const {}
    362384      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; }
    363395
    364396      /// \brief The base node of the iterator.
     
    440472        void constraints() {
    441473          checkConcept<IterableDigraphComponent<>, Digraph>();
     474          checkConcept<IDableDigraphComponent<>, Digraph>();
    442475          checkConcept<MappableDigraphComponent<>, Digraph>();
    443476        }
Note: See TracChangeset for help on using the changeset viewer.