COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/graph.h

    r576 r627  
    498498      };
    499499
    500       /// \brief Read write map of the nodes to type \c T.
    501       ///
    502       /// ReadWrite map of the nodes to type \c T.
    503       /// \sa Reference
     500      /// \brief Reference map of the nodes to type \c T.
     501      ///
     502      /// Reference map of the nodes to type \c T.
    504503      template<class T>
    505       class NodeMap : public ReadWriteMap< Node, T >
     504      class NodeMap : public ReferenceMap<Node, T, T&, const T&>
    506505      {
    507506      public:
     
    514513      private:
    515514        ///Copy constructor
    516         NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
     515        NodeMap(const NodeMap& nm) :
     516          ReferenceMap<Node, T, T&, const T&>(nm) { }
    517517        ///Assignment operator
    518518        template <typename CMap>
     
    523523      };
    524524
    525       /// \brief Read write map of the directed arcs to type \c T.
    526       ///
    527       /// Reference map of the directed arcs to type \c T.
    528       /// \sa Reference
     525      /// \brief Reference map of the arcs to type \c T.
     526      ///
     527      /// Reference map of the arcs to type \c T.
    529528      template<class T>
    530       class ArcMap : public ReadWriteMap<Arc,T>
     529      class ArcMap : public ReferenceMap<Arc, T, T&, const T&>
    531530      {
    532531      public:
     
    538537      private:
    539538        ///Copy constructor
    540         ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
     539        ArcMap(const ArcMap& em) :
     540          ReferenceMap<Arc, T, T&, const T&>(em) { }
    541541        ///Assignment operator
    542542        template <typename CMap>
     
    547547      };
    548548
    549       /// Read write map of the edges to type \c T.
    550 
    551       /// Reference map of the arcs to type \c T.
    552       /// \sa Reference
     549      /// Reference map of the edges to type \c T.
     550
     551      /// Reference map of the edges to type \c T.
    553552      template<class T>
    554       class EdgeMap : public ReadWriteMap<Edge,T>
     553      class EdgeMap : public ReferenceMap<Edge, T, T&, const T&>
    555554      {
    556555      public:
     
    562561      private:
    563562        ///Copy constructor
    564         EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) {}
     563        EdgeMap(const EdgeMap& em) :
     564          ReferenceMap<Edge, T, T&, const T&>(em) {}
    565565        ///Assignment operator
    566566        template <typename CMap>
     
    602602      /// \brief Opposite node on an arc
    603603      ///
    604       /// \return the opposite of the given Node on the given Edge
     604      /// \return The opposite of the given node on the given edge.
    605605      Node oppositeNode(Node, Edge) const { return INVALID; }
    606606
    607607      /// \brief First node of the edge.
    608608      ///
    609       /// \return the first node of the given Edge.
     609      /// \return The first node of the given edge.
    610610      ///
    611611      /// Naturally edges don't have direction and thus
    612       /// don't have source and target node. But we use these two methods
    613       /// to query the two nodes of the arc. The direction of the arc
    614       /// which arises this way is called the inherent direction of the
     612      /// don't have source and target node. However we use \c u() and \c v()
     613      /// methods to query the two nodes of the arc. The direction of the
     614      /// arc which arises this way is called the inherent direction of the
    615615      /// edge, and is used to define the "default" direction
    616616      /// of the directed versions of the arcs.
    617       /// \sa direction
     617      /// \sa v()
     618      /// \sa direction()
    618619      Node u(Edge) const { return INVALID; }
    619620
    620621      /// \brief Second node of the edge.
     622      ///
     623      /// \return The second node of the given edge.
     624      ///
     625      /// Naturally edges don't have direction and thus
     626      /// don't have source and target node. However we use \c u() and \c v()
     627      /// methods to query the two nodes of the arc. The direction of the
     628      /// arc which arises this way is called the inherent direction of the
     629      /// edge, and is used to define the "default" direction
     630      /// of the directed versions of the arcs.
     631      /// \sa u()
     632      /// \sa direction()
    621633      Node v(Edge) const { return INVALID; }
    622634
     
    737749      struct Constraints {
    738750        void constraints() {
     751          checkConcept<BaseGraphComponent, _Graph>();
    739752          checkConcept<IterableGraphComponent<>, _Graph>();
    740753          checkConcept<IDableGraphComponent<>, _Graph>();
Note: See TracChangeset for help on using the changeset viewer.