COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/graph.h

    r78 r57  
    6464    /// the EdgeMap to map values for the edges. The InArcIt and
    6565    /// OutArcIt iterates on the same edges but with opposite
    66     /// direction. The IncEdgeIt iterates also on the same edges
     66    /// direction. The IncArcIt iterates also on the same edges
    6767    /// as the OutArcIt and InArcIt but it is not convertible to Arc just
    6868    /// to Edge. 
     
    271271      ///\code
    272272      /// int count=0;
    273       /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
     273      /// for(Graph::IncArcIt e(g, n); e!=INVALID; ++e) ++count;
    274274      ///\endcode
    275       class IncEdgeIt : public Edge {
    276       public:
    277         /// Default constructor
    278 
    279         /// @warning The default constructor sets the iterator
    280         /// to an undefined value.
    281         IncEdgeIt() { }
    282         /// Copy constructor.
    283 
    284         /// Copy constructor.
    285         ///
    286         IncEdgeIt(const IncEdgeIt& e) : Edge(e) { }
    287         /// Initialize the iterator to be invalid.
    288 
    289         /// Initialize the iterator to be invalid.
    290         ///
    291         IncEdgeIt(Invalid) { }
     275      class IncArcIt : public Edge {
     276      public:
     277        /// Default constructor
     278
     279        /// @warning The default constructor sets the iterator
     280        /// to an undefined value.
     281        IncArcIt() { }
     282        /// Copy constructor.
     283
     284        /// Copy constructor.
     285        ///
     286        IncArcIt(const IncArcIt& e) : Edge(e) { }
     287        /// Initialize the iterator to be invalid.
     288
     289        /// Initialize the iterator to be invalid.
     290        ///
     291        IncArcIt(Invalid) { }
    292292        /// This constructor sets the iterator to first incident arc.
    293293   
    294294        /// This constructor set the iterator to the first incident arc of
    295295        /// the node.
    296         IncEdgeIt(const Graph&, const Node&) { }
    297         /// Edge -> IncEdgeIt conversion
     296        IncArcIt(const Graph&, const Node&) { }
     297        /// Edge -> IncArcIt conversion
    298298
    299299        /// Sets the iterator to the value of the trivial iterator \c e.
    300300        /// This feature necessitates that each time we
    301301        /// iterate the arc-set, the iteration order is the same.
    302         IncEdgeIt(const Graph&, const Edge&) { }
     302        IncArcIt(const Graph&, const Edge&) { }
    303303        /// Next incident arc
    304304
    305305        /// Assign the iterator to the next incident arc
    306306        /// of the corresponding node.
    307         IncEdgeIt& operator++() { return *this; }
     307        IncArcIt& operator++() { return *this; }
    308308      };
    309309
     
    625625      Node target(Arc) const { return INVALID; }
    626626
    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 
    660627      void first(Node&) const {}
    661628      void next(Node&) const {}
     
    673640      void nextIn(Arc&) const {}
    674641
     642
    675643      void firstInc(Edge &, bool &, const Node &) const {}
    676644      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; }
    691645
    692646      /// \brief Base node of the iterator
     
    721675      ///
    722676      /// Returns the base node of the iterator
    723       Node baseNode(IncEdgeIt) const {
     677      Node baseNode(IncArcIt) const {
    724678        return INVALID;
    725679      }
     
    728682      ///
    729683      /// Returns the running node of the iterator
    730       Node runningNode(IncEdgeIt) const {
     684      Node runningNode(IncArcIt) const {
    731685        return INVALID;
    732686      }
     
    736690        void constraints() {
    737691          checkConcept<IterableGraphComponent<>, Graph>();
    738           checkConcept<IDableGraphComponent<>, Graph>();
    739692          checkConcept<MappableGraphComponent<>, Graph>();
    740693        }
Note: See TracChangeset for help on using the changeset viewer.