COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
01/11/12 22:21:07 (12 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Renamings in BpGraphs? (#69)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/bpgraph.h

    r1193 r1194  
    4949    /// "undirected graphs". Bipartite graphs provide a bipartition of
    5050    /// the node set, namely a red and blue set of the nodes. The
    51     /// nodes can be iterated with the RedIt and BlueIt in the two
    52     /// node sets. With RedMap and BlueMap values can be assigned to
    53     /// the nodes in the two sets.
     51    /// nodes can be iterated with the RedNodeIt and BlueNodeIt in the
     52    /// two node sets. With RedNodeMap and BlueNodeMap values can be
     53    /// assigned to the nodes in the two sets.
    5454    ///
    5555    /// The edges of the graph cannot connect two nodes of the same
     
    188188      /// for (BpGraph::RedNodeIt n(g); n!=INVALID; ++n) ++count;
    189189      ///\endcode
    190       class RedIt : public RedNode {
     190      class RedNodeIt : public RedNode {
    191191      public:
    192192        /// Default constructor
     
    194194        /// Default constructor.
    195195        /// \warning It sets the iterator to an undefined value.
    196         RedIt() { }
    197         /// Copy constructor.
    198 
    199         /// Copy constructor.
    200         ///
    201         RedIt(const RedIt& n) : RedNode(n) { }
     196        RedNodeIt() { }
     197        /// Copy constructor.
     198
     199        /// Copy constructor.
     200        ///
     201        RedNodeIt(const RedNodeIt& n) : RedNode(n) { }
    202202        /// %Invalid constructor \& conversion.
    203203
    204204        /// Initializes the iterator to be invalid.
    205205        /// \sa Invalid for more details.
    206         RedIt(Invalid) { }
     206        RedNodeIt(Invalid) { }
    207207        /// Sets the iterator to the first red node.
    208208
    209209        /// Sets the iterator to the first red node of the given
    210210        /// digraph.
    211         explicit RedIt(const BpGraph&) { }
     211        explicit RedNodeIt(const BpGraph&) { }
    212212        /// Sets the iterator to the given red node.
    213213
    214214        /// Sets the iterator to the given red node of the given
    215215        /// digraph.
    216         RedIt(const BpGraph&, const RedNode&) { }
     216        RedNodeIt(const BpGraph&, const RedNode&) { }
    217217        /// Next node.
    218218
    219219        /// Assign the iterator to the next red node.
    220220        ///
    221         RedIt& operator++() { return *this; }
     221        RedNodeIt& operator++() { return *this; }
    222222      };
    223223
     
    231231      /// for (BpGraph::BlueNodeIt n(g); n!=INVALID; ++n) ++count;
    232232      ///\endcode
    233       class BlueIt : public BlueNode {
     233      class BlueNodeIt : public BlueNode {
    234234      public:
    235235        /// Default constructor
     
    237237        /// Default constructor.
    238238        /// \warning It sets the iterator to an undefined value.
    239         BlueIt() { }
    240         /// Copy constructor.
    241 
    242         /// Copy constructor.
    243         ///
    244         BlueIt(const BlueIt& n) : BlueNode(n) { }
     239        BlueNodeIt() { }
     240        /// Copy constructor.
     241
     242        /// Copy constructor.
     243        ///
     244        BlueNodeIt(const BlueNodeIt& n) : BlueNode(n) { }
    245245        /// %Invalid constructor \& conversion.
    246246
    247247        /// Initializes the iterator to be invalid.
    248248        /// \sa Invalid for more details.
    249         BlueIt(Invalid) { }
     249        BlueNodeIt(Invalid) { }
    250250        /// Sets the iterator to the first blue node.
    251251
    252252        /// Sets the iterator to the first blue node of the given
    253253        /// digraph.
    254         explicit BlueIt(const BpGraph&) { }
     254        explicit BlueNodeIt(const BpGraph&) { }
    255255        /// Sets the iterator to the given blue node.
    256256
    257257        /// Sets the iterator to the given blue node of the given
    258258        /// digraph.
    259         BlueIt(const BpGraph&, const BlueNode&) { }
     259        BlueNodeIt(const BpGraph&, const BlueNode&) { }
    260260        /// Next node.
    261261
    262262        /// Assign the iterator to the next blue node.
    263263        ///
    264         BlueIt& operator++() { return *this; }
     264        BlueNodeIt& operator++() { return *this; }
    265265      };
    266266
     
    664664      /// It conforms to the ReferenceMap concept.
    665665      template<class T>
    666       class RedMap : public ReferenceMap<Node, T, T&, const T&>
     666      class RedNodeMap : public ReferenceMap<Node, T, T&, const T&>
    667667      {
    668668      public:
    669669
    670670        /// Constructor
    671         explicit RedMap(const BpGraph&) { }
     671        explicit RedNodeMap(const BpGraph&) { }
    672672        /// Constructor with given initial value
    673         RedMap(const BpGraph&, T) { }
     673        RedNodeMap(const BpGraph&, T) { }
    674674
    675675      private:
    676676        ///Copy constructor
    677         RedMap(const RedMap& nm) :
     677        RedNodeMap(const RedNodeMap& nm) :
    678678          ReferenceMap<Node, T, T&, const T&>(nm) { }
    679679        ///Assignment operator
    680680        template <typename CMap>
    681         RedMap& operator=(const CMap&) {
     681        RedNodeMap& operator=(const CMap&) {
    682682          checkConcept<ReadMap<Node, T>, CMap>();
    683683          return *this;
     
    690690      /// It conforms to the ReferenceMap concept.
    691691      template<class T>
    692       class BlueMap : public ReferenceMap<Node, T, T&, const T&>
     692      class BlueNodeMap : public ReferenceMap<Node, T, T&, const T&>
    693693      {
    694694      public:
    695695
    696696        /// Constructor
    697         explicit BlueMap(const BpGraph&) { }
     697        explicit BlueNodeMap(const BpGraph&) { }
    698698        /// Constructor with given initial value
    699         BlueMap(const BpGraph&, T) { }
     699        BlueNodeMap(const BpGraph&, T) { }
    700700
    701701      private:
    702702        ///Copy constructor
    703         BlueMap(const BlueMap& nm) :
     703        BlueNodeMap(const BlueNodeMap& nm) :
    704704          ReferenceMap<Node, T, T&, const T&>(nm) { }
    705705        ///Assignment operator
    706706        template <typename CMap>
    707         BlueMap& operator=(const CMap&) {
     707        BlueNodeMap& operator=(const CMap&) {
    708708          checkConcept<ReadMap<Node, T>, CMap>();
    709709          return *this;
Note: See TracChangeset for help on using the changeset viewer.