COIN-OR::LEMON - Graph Library

Ticket #69: d248eca9ca25.patch

File d248eca9ca25.patch, 41.5 KB (added by Balazs Dezso, 13 years ago)

Renamings

  • lemon/bits/graph_extender.h

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1326316867 -3600
    # Node ID d248eca9ca25b2dc0a185c45ea9a3934dedca484
    # Parent  434a20e7458562409f15f552583d9ca64f7f8c6c
    Renamings:
     - RedIt->RedNodeIt
     - BlueIt->BlueNodeIt
     - RedMap->RedNodeMap
     - BlueMap->BlueNodeMap
    
    diff -r 434a20e74585 -r d248eca9ca25 lemon/bits/graph_extender.h
    a b  
    913913
    914914    };
    915915
    916     class RedIt : public RedNode {
     916    class RedNodeIt : public RedNode {
    917917      const BpGraph* _graph;
    918918    public:
    919919
    920       RedIt() {}
     920      RedNodeIt() {}
    921921
    922       RedIt(Invalid i) : RedNode(i) { }
     922      RedNodeIt(Invalid i) : RedNode(i) { }
    923923
    924       explicit RedIt(const BpGraph& graph) : _graph(&graph) {
     924      explicit RedNodeIt(const BpGraph& graph) : _graph(&graph) {
    925925        _graph->first(static_cast<RedNode&>(*this));
    926926      }
    927927
    928       RedIt(const BpGraph& graph, const RedNode& node)
     928      RedNodeIt(const BpGraph& graph, const RedNode& node)
    929929        : RedNode(node), _graph(&graph) {}
    930930
    931       RedIt& operator++() {
     931      RedNodeIt& operator++() {
    932932        _graph->next(static_cast<RedNode&>(*this));
    933933        return *this;
    934934      }
    935935
    936936    };
    937937
    938     class BlueIt : public BlueNode {
     938    class BlueNodeIt : public BlueNode {
    939939      const BpGraph* _graph;
    940940    public:
    941941
    942       BlueIt() {}
     942      BlueNodeIt() {}
    943943
    944       BlueIt(Invalid i) : BlueNode(i) { }
     944      BlueNodeIt(Invalid i) : BlueNode(i) { }
    945945
    946       explicit BlueIt(const BpGraph& graph) : _graph(&graph) {
     946      explicit BlueNodeIt(const BpGraph& graph) : _graph(&graph) {
    947947        _graph->first(static_cast<BlueNode&>(*this));
    948948      }
    949949
    950       BlueIt(const BpGraph& graph, const BlueNode& node)
     950      BlueNodeIt(const BpGraph& graph, const BlueNode& node)
    951951        : BlueNode(node), _graph(&graph) {}
    952952
    953       BlueIt& operator++() {
     953      BlueNodeIt& operator++() {
    954954        _graph->next(static_cast<BlueNode&>(*this));
    955955        return *this;
    956956      }
     
    11441144    };
    11451145
    11461146    template <typename _Value>
    1147     class RedMap
     1147    class RedNodeMap
    11481148      : public MapExtender<DefaultMap<BpGraph, RedNode, _Value> > {
    11491149      typedef MapExtender<DefaultMap<BpGraph, RedNode, _Value> > Parent;
    11501150
    11511151    public:
    1152       explicit RedMap(const BpGraph& bpgraph)
     1152      explicit RedNodeMap(const BpGraph& bpgraph)
    11531153        : Parent(bpgraph) {}
    1154       RedMap(const BpGraph& bpgraph, const _Value& value)
     1154      RedNodeMap(const BpGraph& bpgraph, const _Value& value)
    11551155        : Parent(bpgraph, value) {}
    11561156
    11571157    private:
    1158       RedMap& operator=(const RedMap& cmap) {
    1159         return operator=<RedMap>(cmap);
     1158      RedNodeMap& operator=(const RedNodeMap& cmap) {
     1159        return operator=<RedNodeMap>(cmap);
    11601160      }
    11611161
    11621162      template <typename CMap>
    1163       RedMap& operator=(const CMap& cmap) {
     1163      RedNodeMap& operator=(const CMap& cmap) {
    11641164        Parent::operator=(cmap);
    11651165        return *this;
    11661166      }
     
    11681168    };
    11691169
    11701170    template <typename _Value>
    1171     class BlueMap
     1171    class BlueNodeMap
    11721172      : public MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > {
    11731173      typedef MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > Parent;
    11741174
    11751175    public:
    1176       explicit BlueMap(const BpGraph& bpgraph)
     1176      explicit BlueNodeMap(const BpGraph& bpgraph)
    11771177        : Parent(bpgraph) {}
    1178       BlueMap(const BpGraph& bpgraph, const _Value& value)
     1178      BlueNodeMap(const BpGraph& bpgraph, const _Value& value)
    11791179        : Parent(bpgraph, value) {}
    11801180
    11811181    private:
    1182       BlueMap& operator=(const BlueMap& cmap) {
    1183         return operator=<BlueMap>(cmap);
     1182      BlueNodeMap& operator=(const BlueNodeMap& cmap) {
     1183        return operator=<BlueNodeMap>(cmap);
    11841184      }
    11851185
    11861186      template <typename CMap>
    1187       BlueMap& operator=(const CMap& cmap) {
     1187      BlueNodeMap& operator=(const CMap& cmap) {
    11881188        Parent::operator=(cmap);
    11891189        return *this;
    11901190      }
  • lemon/bits/traits.h

    diff -r 434a20e74585 -r d248eca9ca25 lemon/bits/traits.h
    a b  
    172172    typedef GR Digraph;
    173173
    174174    typedef typename GR::RedNode Item;
    175     typedef typename GR::RedIt ItemIt;
     175    typedef typename GR::RedNodeIt ItemIt;
    176176
    177177    typedef typename RedNodeNotifierIndicator<GR>::Type ItemNotifier;
    178178
    179179    template <typename V>
    180     class Map : public GR::template RedMap<V> {
    181       typedef typename GR::template RedMap<V> Parent;
     180    class Map : public GR::template RedNodeMap<V> {
     181      typedef typename GR::template RedNodeMap<V> Parent;
    182182
    183183    public:
    184       typedef typename GR::template RedMap<V> Type;
     184      typedef typename GR::template RedNodeMap<V> Type;
    185185      typedef typename Parent::Value Value;
    186186
    187187      Map(const GR& _bpgraph) : Parent(_bpgraph) {}
     
    213213    typedef GR Digraph;
    214214
    215215    typedef typename GR::BlueNode Item;
    216     typedef typename GR::BlueIt ItemIt;
     216    typedef typename GR::BlueNodeIt ItemIt;
    217217
    218218    typedef typename BlueNodeNotifierIndicator<GR>::Type ItemNotifier;
    219219
    220220    template <typename V>
    221     class Map : public GR::template BlueMap<V> {
    222       typedef typename GR::template BlueMap<V> Parent;
     221    class Map : public GR::template BlueNodeMap<V> {
     222      typedef typename GR::template BlueNodeMap<V> Parent;
    223223
    224224    public:
    225       typedef typename GR::template BlueMap<V> Type;
     225      typedef typename GR::template BlueNodeMap<V> Type;
    226226      typedef typename Parent::Value Value;
    227227
    228228      Map(const GR& _bpgraph) : Parent(_bpgraph) {}
  • lemon/concepts/bpgraph.h

    diff -r 434a20e74585 -r d248eca9ca25 lemon/concepts/bpgraph.h
    a b  
    4848    /// The bipartite graphs also fulfill the concept of \ref Graph
    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
    5656    /// set. The edges inherent orientation is from the red nodes to
     
    187187      /// int count=0;
    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
    193193
    194194        /// Default constructor.
    195195        /// \warning It sets the iterator to an undefined value.
    196         RedIt() { }
     196        RedNodeIt() { }
    197197        /// Copy constructor.
    198198
    199199        /// Copy constructor.
    200200        ///
    201         RedIt(const RedIt& n) : RedNode(n) { }
     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
    224224      /// Iterator class for the blue nodes.
     
    230230      /// int count=0;
    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
    236236
    237237        /// Default constructor.
    238238        /// \warning It sets the iterator to an undefined value.
    239         BlueIt() { }
     239        BlueNodeIt() { }
    240240        /// Copy constructor.
    241241
    242242        /// Copy constructor.
    243243        ///
    244         BlueIt(const BlueIt& n) : BlueNode(n) { }
     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
    267267      /// Iterator class for the nodes.
     
    663663      /// Standard graph map type for the red nodes.
    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;
    684684        }
     
    689689      /// Standard graph map type for the blue nodes.
    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;
    710710        }
  • lemon/concepts/graph_components.h

    diff -r 434a20e74585 -r d248eca9ca25 lemon/concepts/graph_components.h
    a b  
    11911191      /// \brief This iterator goes through each red node.
    11921192      ///
    11931193      /// This iterator goes through each red node.
    1194       typedef GraphItemIt<BpGraph, RedNode> RedIt;
     1194      typedef GraphItemIt<BpGraph, RedNode> RedNodeIt;
    11951195
    11961196      /// \brief This iterator goes through each blue node.
    11971197      ///
    11981198      /// This iterator goes through each blue node.
    1199       typedef GraphItemIt<BpGraph, BlueNode> BlueIt;
     1199      typedef GraphItemIt<BpGraph, BlueNode> BlueNodeIt;
    12001200
    12011201      /// @}
    12021202
     
    12131213          bpgraph.next(bn);
    12141214
    12151215          checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::RedNode>,
    1216             typename _BpGraph::RedIt>();
     1216            typename _BpGraph::RedNodeIt>();
    12171217          checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::BlueNode>,
    1218             typename _BpGraph::BlueIt>();
     1218            typename _BpGraph::BlueNodeIt>();
    12191219        }
    12201220
    12211221        const _BpGraph& bpgraph;
     
    16951695    /// This class describes the interface of mappable undirected
    16961696    /// bipartite graphs.  It extends \ref MappableGraphComponent with
    16971697    /// the standard graph map class for red and blue nodes (\c
    1698     /// RedMap and BlueMap). This concept is part of the BpGraph concept.
     1698    /// RedNodeMap and BlueNodeMap). This concept is part of the
     1699    /// BpGraph concept.
    16991700    template <typename BAS = BaseBpGraphComponent>
    17001701    class MappableBpGraphComponent : public MappableGraphComponent<BAS>  {
    17011702    public:
     
    17101711      /// Standard graph map for the red nodes.
    17111712      /// It conforms to the ReferenceMap concept.
    17121713      template <typename V>
    1713       class RedMap : public GraphMap<MappableBpGraphComponent, Node, V> {
     1714      class RedNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> {
    17141715        typedef GraphMap<MappableBpGraphComponent, Node, V> Parent;
    17151716
    17161717      public:
    17171718        /// \brief Construct a new map.
    17181719        ///
    17191720        /// Construct a new map for the graph.
    1720         explicit RedMap(const MappableBpGraphComponent& graph)
     1721        explicit RedNodeMap(const MappableBpGraphComponent& graph)
    17211722          : Parent(graph) {}
    17221723
    17231724        /// \brief Construct a new map with default value.
    17241725        ///
    17251726        /// Construct a new map for the graph and initalize the values.
    1726         RedMap(const MappableBpGraphComponent& graph, const V& value)
     1727        RedNodeMap(const MappableBpGraphComponent& graph, const V& value)
    17271728          : Parent(graph, value) {}
    17281729
    17291730      private:
    17301731        /// \brief Copy constructor.
    17311732        ///
    17321733        /// Copy Constructor.
    1733         RedMap(const RedMap& nm) : Parent(nm) {}
     1734        RedNodeMap(const RedNodeMap& nm) : Parent(nm) {}
    17341735
    17351736        /// \brief Assignment operator.
    17361737        ///
    17371738        /// Assignment operator.
    17381739        template <typename CMap>
    1739         RedMap& operator=(const CMap&) {
     1740        RedNodeMap& operator=(const CMap&) {
    17401741          checkConcept<ReadMap<Node, V>, CMap>();
    17411742          return *this;
    17421743        }
     
    17481749      /// Standard graph map for the blue nodes.
    17491750      /// It conforms to the ReferenceMap concept.
    17501751      template <typename V>
    1751       class BlueMap : public GraphMap<MappableBpGraphComponent, Node, V> {
     1752      class BlueNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> {
    17521753        typedef GraphMap<MappableBpGraphComponent, Node, V> Parent;
    17531754
    17541755      public:
    17551756        /// \brief Construct a new map.
    17561757        ///
    17571758        /// Construct a new map for the graph.
    1758         explicit BlueMap(const MappableBpGraphComponent& graph)
     1759        explicit BlueNodeMap(const MappableBpGraphComponent& graph)
    17591760          : Parent(graph) {}
    17601761
    17611762        /// \brief Construct a new map with default value.
    17621763        ///
    17631764        /// Construct a new map for the graph and initalize the values.
    1764         BlueMap(const MappableBpGraphComponent& graph, const V& value)
     1765        BlueNodeMap(const MappableBpGraphComponent& graph, const V& value)
    17651766          : Parent(graph, value) {}
    17661767
    17671768      private:
    17681769        /// \brief Copy constructor.
    17691770        ///
    17701771        /// Copy Constructor.
    1771         BlueMap(const BlueMap& nm) : Parent(nm) {}
     1772        BlueNodeMap(const BlueNodeMap& nm) : Parent(nm) {}
    17721773
    17731774        /// \brief Assignment operator.
    17741775        ///
    17751776        /// Assignment operator.
    17761777        template <typename CMap>
    1777         BlueMap& operator=(const CMap&) {
     1778        BlueNodeMap& operator=(const CMap&) {
    17781779          checkConcept<ReadMap<Node, V>, CMap>();
    17791780          return *this;
    17801781        }
     
    17951796          checkConcept<MappableGraphComponent<Base>, _BpGraph>();
    17961797
    17971798          { // int map test
    1798             typedef typename _BpGraph::template RedMap<int> IntRedMap;
     1799            typedef typename _BpGraph::template RedNodeMap<int>
     1800              IntRedNodeMap;
    17991801            checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, int>,
    1800               IntRedMap >();
     1802              IntRedNodeMap >();
    18011803          } { // bool map test
    1802             typedef typename _BpGraph::template RedMap<bool> BoolRedMap;
     1804            typedef typename _BpGraph::template RedNodeMap<bool>
     1805              BoolRedNodeMap;
    18031806            checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, bool>,
    1804               BoolRedMap >();
     1807              BoolRedNodeMap >();
    18051808          } { // Dummy map test
    1806             typedef typename _BpGraph::template RedMap<Dummy> DummyRedMap;
     1809            typedef typename _BpGraph::template RedNodeMap<Dummy>
     1810              DummyRedNodeMap;
    18071811            checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, Dummy>,
    1808               DummyRedMap >();
     1812              DummyRedNodeMap >();
    18091813          }
    18101814
    18111815          { // int map test
    1812             typedef typename _BpGraph::template BlueMap<int> IntBlueMap;
     1816            typedef typename _BpGraph::template BlueNodeMap<int>
     1817              IntBlueNodeMap;
    18131818            checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, int>,
    1814               IntBlueMap >();
     1819              IntBlueNodeMap >();
    18151820          } { // bool map test
    1816             typedef typename _BpGraph::template BlueMap<bool> BoolBlueMap;
     1821            typedef typename _BpGraph::template BlueNodeMap<bool>
     1822              BoolBlueNodeMap;
    18171823            checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, bool>,
    1818               BoolBlueMap >();
     1824              BoolBlueNodeMap >();
    18191825          } { // Dummy map test
    1820             typedef typename _BpGraph::template BlueMap<Dummy> DummyBlueMap;
     1826            typedef typename _BpGraph::template BlueNodeMap<Dummy>
     1827              DummyBlueNodeMap;
    18211828            checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, Dummy>,
    1822               DummyBlueMap >();
     1829              DummyBlueNodeMap >();
    18231830          }
    18241831        }
    18251832
  • lemon/core.h

    diff -r 434a20e74585 -r d248eca9ca25 lemon/core.h
    a b  
    150150
    151151  ///Create convenience typedefs for the bipartite graph types and iterators
    152152
    153   ///This \c \#define creates the same convenient type definitions as defined
    154   ///by \ref GRAPH_TYPEDEFS(BpGraph) and ten more, namely it creates
    155   ///\c RedNode, \c RedIt, \c BoolRedMap, \c IntRedMap, \c DoubleRedMap,
    156   ///\c BlueNode, \c BlueIt, \c BoolBlueMap, \c IntBlueMap, \c DoubleBlueMap.
     153  ///This \c \#define creates the same convenient type definitions as
     154  ///defined by \ref GRAPH_TYPEDEFS(BpGraph) and ten more, namely it
     155  ///creates \c RedNode, \c RedNodeIt, \c BoolRedNodeMap,
     156  ///\c IntRedNodeMap, \c DoubleRedNodeMap, \c BlueNode, \c BlueNodeIt,
     157  ///\c BoolBlueNodeMap, \c IntBlueNodeMap, \c DoubleBlueNodeMap.
    157158  ///
    158159  ///\note If the graph type is a dependent type, ie. the graph type depend
    159160  ///on a template parameter, then use \c TEMPLATE_BPGRAPH_TYPEDEFS()
     
    161162#define BPGRAPH_TYPEDEFS(BpGraph)                                       \
    162163  GRAPH_TYPEDEFS(BpGraph);                                              \
    163164  typedef BpGraph::RedNode RedNode;                                     \
    164   typedef BpGraph::RedIt RedIt;                                         \
    165   typedef BpGraph::RedMap<bool> BoolRedMap;                             \
    166   typedef BpGraph::RedMap<int> IntRedMap;                               \
    167   typedef BpGraph::RedMap<double> DoubleRedMap;                         \
     165  typedef BpGraph::RedNodeIt RedNodeIt;                                 \
     166  typedef BpGraph::RedNodeMap<bool> BoolRedNodeMap;                     \
     167  typedef BpGraph::RedNodeMap<int> IntRedNodeMap;                       \
     168  typedef BpGraph::RedNodeMap<double> DoubleRedNodeMap;                 \
    168169  typedef BpGraph::BlueNode BlueNode;                                   \
    169   typedef BpGraph::BlueIt BlueIt;                                       \
    170   typedef BpGraph::BlueMap<bool> BoolBlueMap;                           \
    171   typedef BpGraph::BlueMap<int> IntBlueMap;                             \
    172   typedef BpGraph::BlueMap<double> DoubleBlueMap
     170  typedef BpGraph::BlueNodeIt BlueNodeIt;                               \
     171  typedef BpGraph::BlueNodeMap<bool> BoolBlueNodeMap;                   \
     172  typedef BpGraph::BlueNodeMap<int> IntBlueNodeMap;                     \
     173  typedef BpGraph::BlueNodeMap<double> DoubleBlueNodeMap
    173174
    174175  ///Create convenience typedefs for the bipartite graph types and iterators
    175176
     
    177178  ///
    178179  ///\note Use this macro, if the graph type is a dependent type,
    179180  ///ie. the graph type depend on a template parameter.
    180 #define TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph)                              \
    181   TEMPLATE_GRAPH_TYPEDEFS(BpGraph);                                     \
    182   typedef typename BpGraph::RedNode RedNode;                            \
    183   typedef typename BpGraph::RedIt RedIt;                                \
    184   typedef typename BpGraph::template RedMap<bool> BoolRedMap;           \
    185   typedef typename BpGraph::template RedMap<int> IntRedMap;             \
    186   typedef typename BpGraph::template RedMap<double> DoubleRedMap;       \
    187   typedef typename BpGraph::BlueNode BlueNode;                          \
    188   typedef typename BpGraph::BlueIt BlueIt;                              \
    189   typedef typename BpGraph::template BlueMap<bool> BoolBlueMap;         \
    190   typedef typename BpGraph::template BlueMap<int> IntBlueMap;           \
    191   typedef typename BpGraph::template BlueMap<double> DoubleBlueMap
     181#define TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph)                                  \
     182  TEMPLATE_GRAPH_TYPEDEFS(BpGraph);                                         \
     183  typedef typename BpGraph::RedNode RedNode;                                \
     184  typedef typename BpGraph::RedNodeIt RedNodeIt;                            \
     185  typedef typename BpGraph::template RedNodeMap<bool> BoolRedNodeMap;       \
     186  typedef typename BpGraph::template RedNodeMap<int> IntRedNodeMap;         \
     187  typedef typename BpGraph::template RedNodeMap<double> DoubleRedNodeMap;   \
     188  typedef typename BpGraph::BlueNode BlueNode;                              \
     189  typedef typename BpGraph::BlueNodeIt BlueNodeIt;                          \
     190  typedef typename BpGraph::template BlueNodeMap<bool> BoolBlueNodeMap;     \
     191  typedef typename BpGraph::template BlueNodeMap<int> IntBlueNodeMap;       \
     192  typedef typename BpGraph::template BlueNodeMap<double> DoubleBlueNodeMap
    192193
    193194  /// \brief Function to count the items in a graph.
    194195  ///
     
    565566                       BlueNodeRefMap& blueNodeRefMap,
    566567                       EdgeRefMap& edgeRefMap) {
    567568        to.clear();
    568         for (typename From::RedIt it(from); it != INVALID; ++it) {
     569        for (typename From::RedNodeIt it(from); it != INVALID; ++it) {
    569570          redNodeRefMap[it] = to.addRedNode();
    570571        }
    571         for (typename From::BlueIt it(from); it != INVALID; ++it) {
     572        for (typename From::BlueNodeIt it(from); it != INVALID; ++it) {
    572573          blueNodeRefMap[it] = to.addBlueNode();
    573574        }
    574575        for (typename From::EdgeIt it(from); it != INVALID; ++it) {
     
    11641165  ///  // Create cross references (inverse) for the edges
    11651166  ///  NewBpGraph::EdgeMap<OrigBpGraph::Edge> ecr(new_graph);
    11661167  ///  cg.edgeCrossRef(ecr);
    1167   ///  // Copy a red map
    1168   ///  OrigBpGraph::RedMap<double> ormap(orig_graph);
    1169   ///  NewBpGraph::RedMap<double> nrmap(new_graph);
    1170   ///  cg.edgeMap(ormap, nrmap);
     1168  ///  // Copy a red node map
     1169  ///  OrigBpGraph::RedNodeMap<double> ormap(orig_graph);
     1170  ///  NewBpGraph::RedNodeMap<double> nrmap(new_graph);
     1171  ///  cg.redNodeMap(ormap, nrmap);
    11711172  ///  // Copy a node
    11721173  ///  OrigBpGraph::Node on;
    11731174  ///  NewBpGraph::Node nn;
     
    11941195    typedef typename To::Arc TArc;
    11951196    typedef typename To::Edge TEdge;
    11961197
    1197     typedef typename From::template RedMap<TRedNode> RedNodeRefMap;
    1198     typedef typename From::template BlueMap<TBlueNode> BlueNodeRefMap;
     1198    typedef typename From::template RedNodeMap<TRedNode> RedNodeRefMap;
     1199    typedef typename From::template BlueNodeMap<TBlueNode> BlueNodeRefMap;
    11991200    typedef typename From::template EdgeMap<TEdge> EdgeRefMap;
    12001201
    12011202    struct NodeRefMap {
     
    13521353    /// the original map \c map should be the Node type of the source
    13531354    /// graph.
    13541355    template <typename FromMap, typename ToMap>
    1355     BpGraphCopy& redMap(const FromMap& map, ToMap& tmap) {
     1356    BpGraphCopy& redNodeMap(const FromMap& map, ToMap& tmap) {
    13561357      _red_maps.push_back(new _core_bits::MapCopy<From, RedNode,
    13571358                          RedNodeRefMap, FromMap, ToMap>(map, tmap));
    13581359      return *this;
     
    14031404    /// the original map \c map should be the Node type of the source
    14041405    /// graph.
    14051406    template <typename FromMap, typename ToMap>
    1406     BpGraphCopy& blueMap(const FromMap& map, ToMap& tmap) {
     1407    BpGraphCopy& blueNodeMap(const FromMap& map, ToMap& tmap) {
    14071408      _blue_maps.push_back(new _core_bits::MapCopy<From, BlueNode,
    14081409                           BlueNodeRefMap, FromMap, ToMap>(map, tmap));
    14091410      return *this;
  • lemon/lgf_reader.h

    diff -r 434a20e74585 -r d248eca9ca25 lemon/lgf_reader.h
    a b  
    21342134  /// reads the red and blue nodes from separate sections, and these
    21352135  /// sections can contain different set of maps.
    21362136  ///
    2137   /// The red and blue maps are read from the corresponding
     2137  /// The red and blue node maps are read from the corresponding
    21382138  /// sections. If a map is defined with the same name in both of
    21392139  /// these sections, then it can be read as a node map.
    21402140  template <typename BGR>
     
    23232323      return *this;
    23242324    }
    23252325
    2326     /// Add a red map reading rule to the reader.
     2326    /// Add a red node map reading rule to the reader.
    23272327    template <typename Map>
    2328     BpGraphReader& redMap(const std::string& caption, Map& map) {
     2328    BpGraphReader& redNodeMap(const std::string& caption, Map& map) {
    23292329      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23302330      _reader_bits::MapStorageBase<Node>* storage =
    23312331        new _reader_bits::MapStorage<Node, Map>(map);
     
    23332333      return *this;
    23342334    }
    23352335
    2336     /// \brief Red map reading rule
     2336    /// \brief Red node map reading rule
    23372337    ///
    2338     /// Add a red map reading rule with specialized converter to the
    2339     /// reader.
     2338    /// Add a red node map node reading rule with specialized converter to
     2339    /// the reader.
    23402340    template <typename Map, typename Converter>
    2341     BpGraphReader& redMap(const std::string& caption, Map& map,
    2342                           const Converter& converter = Converter()) {
     2341    BpGraphReader& redNodeMap(const std::string& caption, Map& map,
     2342                              const Converter& converter = Converter()) {
    23432343      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23442344      _reader_bits::MapStorageBase<Node>* storage =
    23452345        new _reader_bits::MapStorage<Node, Map, Converter>(map, converter);
     
    23472347      return *this;
    23482348    }
    23492349
    2350     /// Add a blue map reading rule to the reader.
     2350    /// Add a blue node map reading rule to the reader.
    23512351    template <typename Map>
    2352     BpGraphReader& blueMap(const std::string& caption, Map& map) {
     2352    BpGraphReader& blueNodeMap(const std::string& caption, Map& map) {
    23532353      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23542354      _reader_bits::MapStorageBase<Node>* storage =
    23552355        new _reader_bits::MapStorage<Node, Map>(map);
     
    23572357      return *this;
    23582358    }
    23592359
    2360     /// \brief Blue map reading rule
     2360    /// \brief Blue node map reading rule
    23612361    ///
    2362     /// Add a blue map reading rule with specialized converter to the
    2363     /// reader.
     2362    /// Add a blue node map reading rule with specialized converter to
     2363    /// the reader.
    23642364    template <typename Map, typename Converter>
    2365     BpGraphReader& blueMap(const std::string& caption, Map& map,
    2366                            const Converter& converter = Converter()) {
     2365    BpGraphReader& blueNodeMap(const std::string& caption, Map& map,
     2366                               const Converter& converter = Converter()) {
    23672367      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23682368      _reader_bits::MapStorageBase<Node>* storage =
    23692369        new _reader_bits::MapStorage<Node, Map, Converter>(map, converter);
     
    26702670        while (_reader_bits::readToken(line, map)) {
    26712671          if (maps.find(map) != maps.end()) {
    26722672            std::ostringstream msg;
    2673             msg << "Multiple occurence of red map: " << map;
     2673            msg << "Multiple occurence of red node map: " << map;
    26742674            throw FormatError(msg.str());
    26752675          }
    26762676          maps.insert(std::make_pair(map, index));
     
    27632763        while (_reader_bits::readToken(line, map)) {
    27642764          if (maps.find(map) != maps.end()) {
    27652765            std::ostringstream msg;
    2766             msg << "Multiple occurence of blue map: " << map;
     2766            msg << "Multiple occurence of blue node map: " << map;
    27672767            throw FormatError(msg.str());
    27682768          }
    27692769          maps.insert(std::make_pair(map, index));
  • lemon/lgf_writer.h

    diff -r 434a20e74585 -r d248eca9ca25 lemon/lgf_writer.h
    a b  
    16291629  /// reads the red and blue nodes from separate sections, and these
    16301630  /// sections can contain different set of maps.
    16311631  ///
    1632   /// The red and blue maps are written to the corresponding
     1632  /// The red and blue node maps are written to the corresponding
    16331633  /// sections. The node maps are written to both of these sections
    16341634  /// with the same map name.
    16351635  template <typename BGR>
     
    18051805      return *this;
    18061806    }
    18071807
    1808     /// \brief Red map writing rule
     1808    /// \brief Red node map writing rule
    18091809    ///
    1810     /// Add a red map writing rule to the writer.
     1810    /// Add a red node map writing rule to the writer.
    18111811    template <typename Map>
    1812     BpGraphWriter& redMap(const std::string& caption, const Map& map) {
     1812    BpGraphWriter& redNodeMap(const std::string& caption, const Map& map) {
    18131813      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
    18141814      _writer_bits::MapStorageBase<Node>* storage =
    18151815        new _writer_bits::MapStorage<Node, Map>(map);
     
    18171817      return *this;
    18181818    }
    18191819
    1820     /// \brief Red map writing rule
     1820    /// \brief Red node map writing rule
    18211821    ///
    1822     /// Add a red map writing rule with specialized converter to the
     1822    /// Add a red node map writing rule with specialized converter to the
    18231823    /// writer.
    18241824    template <typename Map, typename Converter>
    1825     BpGraphWriter& redMap(const std::string& caption, const Map& map,
    1826                           const Converter& converter = Converter()) {
     1825    BpGraphWriter& redNodeMap(const std::string& caption, const Map& map,
     1826                              const Converter& converter = Converter()) {
    18271827      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
    18281828      _writer_bits::MapStorageBase<Node>* storage =
    18291829        new _writer_bits::MapStorage<Node, Map, Converter>(map, converter);
     
    18311831      return *this;
    18321832    }
    18331833
    1834     /// \brief Blue map writing rule
     1834    /// \brief Blue node map writing rule
    18351835    ///
    1836     /// Add a blue map writing rule to the writer.
     1836    /// Add a blue node map writing rule to the writer.
    18371837    template <typename Map>
    1838     BpGraphWriter& blueMap(const std::string& caption, const Map& map) {
     1838    BpGraphWriter& blueNodeMap(const std::string& caption, const Map& map) {
    18391839      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
    18401840      _writer_bits::MapStorageBase<Node>* storage =
    18411841        new _writer_bits::MapStorage<Node, Map>(map);
     
    18431843      return *this;
    18441844    }
    18451845
    1846     /// \brief Blue map writing rule
     1846    /// \brief Blue node map writing rule
    18471847    ///
    1848     /// Add a blue map writing rule with specialized converter to the
     1848    /// Add a blue node map writing rule with specialized converter to the
    18491849    /// writer.
    18501850    template <typename Map, typename Converter>
    1851     BpGraphWriter& blueMap(const std::string& caption, const Map& map,
    1852                            const Converter& converter = Converter()) {
     1851    BpGraphWriter& blueNodeMap(const std::string& caption, const Map& map,
     1852                               const Converter& converter = Converter()) {
    18531853      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
    18541854      _writer_bits::MapStorageBase<Node>* storage =
    18551855        new _writer_bits::MapStorage<Node, Map, Converter>(map, converter);
     
    20582058      *_os << std::endl;
    20592059
    20602060      std::vector<Node> nodes;
    2061       for (RedIt n(_graph); n != INVALID; ++n) {
     2061      for (RedNodeIt n(_graph); n != INVALID; ++n) {
    20622062        nodes.push_back(n);
    20632063      }
    20642064
     
    21182118      *_os << std::endl;
    21192119
    21202120      std::vector<Node> nodes;
    2121       for (BlueIt n(_graph); n != INVALID; ++n) {
     2121      for (BlueNodeIt n(_graph); n != INVALID; ++n) {
    21222122        nodes.push_back(n);
    21232123      }
    21242124
  • test/bpgraph_test.cc

    diff -r 434a20e74585 -r d248eca9ca25 test/bpgraph_test.cc
    a b  
    101101  checkEdgeIds(G);
    102102
    103103  checkGraphNodeMap(G);
    104   checkGraphRedMap(G);
    105   checkGraphBlueMap(G);
     104  checkGraphRedNodeMap(G);
     105  checkGraphBlueNodeMap(G);
    106106  checkGraphArcMap(G);
    107107  checkGraphEdgeMap(G);
    108108}
     
    260260  checkEdgeIds(G);
    261261
    262262  checkGraphNodeMap(G);
    263   checkGraphRedMap(G);
    264   checkGraphBlueMap(G);
     263  checkGraphRedNodeMap(G);
     264  checkGraphBlueNodeMap(G);
    265265  checkGraphArcMap(G);
    266266  checkGraphEdgeMap(G);
    267267
     
    369369  checkGraphEdgeList(G, redNum * blueNum);
    370370  checkGraphArcList(G, 2 * redNum * blueNum);
    371371
    372   for (RedIt n(G); n != INVALID; ++n) {
     372  for (RedNodeIt n(G); n != INVALID; ++n) {
    373373    checkGraphOutArcList(G, n, blueNum);
    374374    checkGraphInArcList(G, n, blueNum);
    375375    checkGraphIncEdgeList(G, n, blueNum);
    376376  }
    377377
    378   for (BlueIt n(G); n != INVALID; ++n) {
     378  for (BlueNodeIt n(G); n != INVALID; ++n) {
    379379    checkGraphOutArcList(G, n, redNum);
    380380    checkGraphInArcList(G, n, redNum);
    381381    checkGraphIncEdgeList(G, n, redNum);
     
    393393  checkEdgeIds(G);
    394394
    395395  checkGraphNodeMap(G);
    396   checkGraphRedMap(G);
    397   checkGraphBlueMap(G);
     396  checkGraphRedNodeMap(G);
     397  checkGraphBlueNodeMap(G);
    398398  checkGraphArcMap(G);
    399399  checkGraphEdgeMap(G);
    400400
  • test/graph_copy_test.cc

    diff -r 434a20e74585 -r d248eca9ca25 test/graph_copy_test.cc
    a b  
    216216  // Build a graph
    217217  SmartBpGraph from;
    218218  SmartBpGraph::NodeMap<int> fnm(from);
    219   SmartBpGraph::RedMap<int> frnm(from);
    220   SmartBpGraph::BlueMap<int> fbnm(from);
     219  SmartBpGraph::RedNodeMap<int> frnm(from);
     220  SmartBpGraph::BlueNodeMap<int> fbnm(from);
    221221  SmartBpGraph::ArcMap<int> fam(from);
    222222  SmartBpGraph::EdgeMap<int> fem(from);
    223223  SmartBpGraph::Node fn = INVALID;
     
    261261  // Test graph copy
    262262  GR to;
    263263  typename GR::template NodeMap<int> tnm(to);
    264   typename GR::template RedMap<int> trnm(to);
    265   typename GR::template BlueMap<int> tbnm(to);
     264  typename GR::template RedNodeMap<int> trnm(to);
     265  typename GR::template BlueNodeMap<int> tbnm(to);
    266266  typename GR::template ArcMap<int> tam(to);
    267267  typename GR::template EdgeMap<int> tem(to);
    268268  typename GR::Node tn;
     
    272272  typename GR::Edge te;
    273273
    274274  SmartBpGraph::NodeMap<typename GR::Node> nr(from);
    275   SmartBpGraph::RedMap<typename GR::RedNode> rnr(from);
    276   SmartBpGraph::BlueMap<typename GR::BlueNode> bnr(from);
     275  SmartBpGraph::RedNodeMap<typename GR::RedNode> rnr(from);
     276  SmartBpGraph::BlueNodeMap<typename GR::BlueNode> bnr(from);
    277277  SmartBpGraph::ArcMap<typename GR::Arc> ar(from);
    278278  SmartBpGraph::EdgeMap<typename GR::Edge> er(from);
    279279
    280280  typename GR::template NodeMap<SmartBpGraph::Node> ncr(to);
    281   typename GR::template RedMap<SmartBpGraph::RedNode> rncr(to);
    282   typename GR::template BlueMap<SmartBpGraph::BlueNode> bncr(to);
     281  typename GR::template RedNodeMap<SmartBpGraph::RedNode> rncr(to);
     282  typename GR::template BlueNodeMap<SmartBpGraph::BlueNode> bncr(to);
    283283  typename GR::template ArcMap<SmartBpGraph::Arc> acr(to);
    284284  typename GR::template EdgeMap<SmartBpGraph::Edge> ecr(to);
    285285
    286286  bpGraphCopy(from, to).
    287     nodeMap(fnm, tnm).redMap(frnm, trnm).blueMap(fbnm, tbnm).
     287    nodeMap(fnm, tnm).
     288    redNodeMap(frnm, trnm).blueNodeMap(fbnm, tbnm).
    288289    arcMap(fam, tam).edgeMap(fem, tem).
    289290    nodeRef(nr).redRef(rnr).blueRef(bnr).
    290291    arcRef(ar).edgeRef(er).
     
    304305    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
    305306  }
    306307
    307   for (SmartBpGraph::RedIt it(from); it != INVALID; ++it) {
     308  for (SmartBpGraph::RedNodeIt it(from); it != INVALID; ++it) {
    308309    check(ncr[nr[it]] == it, "Wrong copy.");
    309310    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
    310311    check(rnr[it] == nr[it], "Wrong copy.");
     
    313314    check(to.red(rnr[it]), "Wrong copy.");
    314315  }
    315316
    316   for (SmartBpGraph::BlueIt it(from); it != INVALID; ++it) {
     317  for (SmartBpGraph::BlueNodeIt it(from); it != INVALID; ++it) {
    317318    check(ncr[nr[it]] == it, "Wrong copy.");
    318319    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
    319320    check(bnr[it] == nr[it], "Wrong copy.");
     
    343344  for (typename GR::NodeIt it(to); it != INVALID; ++it) {
    344345    check(nr[ncr[it]] == it, "Wrong copy.");
    345346  }
    346   for (typename GR::RedIt it(to); it != INVALID; ++it) {
     347  for (typename GR::RedNodeIt it(to); it != INVALID; ++it) {
    347348    check(rncr[it] == ncr[it], "Wrong copy.");
    348349    check(rnr[rncr[it]] == it, "Wrong copy.");
    349350  }
    350   for (typename GR::BlueIt it(to); it != INVALID; ++it) {
     351  for (typename GR::BlueNodeIt it(to); it != INVALID; ++it) {
    351352    check(bncr[it] == ncr[it], "Wrong copy.");
    352353    check(bnr[bncr[it]] == it, "Wrong copy.");
    353354  }
  • test/graph_test.h

    diff -r 434a20e74585 -r d248eca9ca25 test/graph_test.h
    a b  
    4343  template<class Graph>
    4444  void checkGraphRedNodeList(const Graph &G, int cnt)
    4545  {
    46     typename Graph::RedIt n(G);
     46    typename Graph::RedNodeIt n(G);
    4747    for(int i=0;i<cnt;i++) {
    4848      check(n!=INVALID,"Wrong red Node list linking.");
    4949      check(G.red(n),"Wrong node set check.");
     
    6565  template<class Graph>
    6666  void checkGraphBlueNodeList(const Graph &G, int cnt)
    6767  {
    68     typename Graph::BlueIt n(G);
     68    typename Graph::BlueNodeIt n(G);
    6969    for(int i=0;i<cnt;i++) {
    7070      check(n!=INVALID,"Wrong blue Node list linking.");
    7171      check(G.blue(n),"Wrong node set check.");
     
    225225  void checkRedNodeIds(const Graph& G) {
    226226    typedef typename Graph::RedNode RedNode;
    227227    std::set<int> values;
    228     for (typename Graph::RedIt n(G); n != INVALID; ++n) {
     228    for (typename Graph::RedNodeIt n(G); n != INVALID; ++n) {
    229229      check(G.red(n), "Wrong partition");
    230230      check(values.find(G.id(n)) == values.end(), "Wrong id");
    231231      check(G.id(n) <= G.maxRedId(), "Wrong maximum id");
     
    238238  void checkBlueNodeIds(const Graph& G) {
    239239    typedef typename Graph::BlueNode BlueNode;
    240240    std::set<int> values;
    241     for (typename Graph::BlueIt n(G); n != INVALID; ++n) {
     241    for (typename Graph::BlueNodeIt n(G); n != INVALID; ++n) {
    242242      check(G.blue(n), "Wrong partition");
    243243      check(values.find(G.id(n)) == values.end(), "Wrong id");
    244244      check(G.id(n) <= G.maxBlueId(), "Wrong maximum id");
     
    304304  }
    305305
    306306  template <typename Graph>
    307   void checkGraphRedMap(const Graph& G) {
     307  void checkGraphRedNodeMap(const Graph& G) {
    308308    typedef typename Graph::Node Node;
    309     typedef typename Graph::RedIt RedIt;
     309    typedef typename Graph::RedNodeIt RedNodeIt;
    310310
    311     typedef typename Graph::template RedMap<int> IntRedMap;
    312     IntRedMap map(G, 42);
    313     for (RedIt it(G); it != INVALID; ++it) {
     311    typedef typename Graph::template RedNodeMap<int> IntRedNodeMap;
     312    IntRedNodeMap map(G, 42);
     313    for (RedNodeIt it(G); it != INVALID; ++it) {
    314314      check(map[it] == 42, "Wrong map constructor.");
    315315    }
    316316    int s = 0;
    317     for (RedIt it(G); it != INVALID; ++it) {
     317    for (RedNodeIt it(G); it != INVALID; ++it) {
    318318      map[it] = 0;
    319319      check(map[it] == 0, "Wrong operator[].");
    320320      map.set(it, s);
     
    322322      ++s;
    323323    }
    324324    s = s * (s - 1) / 2;
    325     for (RedIt it(G); it != INVALID; ++it) {
     325    for (RedNodeIt it(G); it != INVALID; ++it) {
    326326      s -= map[it];
    327327    }
    328328    check(s == 0, "Wrong sum.");
     
    334334  }
    335335
    336336  template <typename Graph>
    337   void checkGraphBlueMap(const Graph& G) {
     337  void checkGraphBlueNodeMap(const Graph& G) {
    338338    typedef typename Graph::Node Node;
    339     typedef typename Graph::BlueIt BlueIt;
     339    typedef typename Graph::BlueNodeIt BlueNodeIt;
    340340
    341     typedef typename Graph::template BlueMap<int> IntBlueMap;
    342     IntBlueMap map(G, 42);
    343     for (BlueIt it(G); it != INVALID; ++it) {
     341    typedef typename Graph::template BlueNodeMap<int> IntBlueNodeMap;
     342    IntBlueNodeMap map(G, 42);
     343    for (BlueNodeIt it(G); it != INVALID; ++it) {
    344344      check(map[it] == 42, "Wrong map constructor.");
    345345    }
    346346    int s = 0;
    347     for (BlueIt it(G); it != INVALID; ++it) {
     347    for (BlueNodeIt it(G); it != INVALID; ++it) {
    348348      map[it] = 0;
    349349      check(map[it] == 0, "Wrong operator[].");
    350350      map.set(it, s);
     
    352352      ++s;
    353353    }
    354354    s = s * (s - 1) / 2;
    355     for (BlueIt it(G); it != INVALID; ++it) {
     355    for (BlueNodeIt it(G); it != INVALID; ++it) {
    356356      s -= map[it];
    357357    }
    358358    check(s == 0, "Wrong sum.");