COIN-OR::LEMON - Graph Library

Changeset 1194:699c7eac2c6d in lemon for lemon


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

Renamings in BpGraphs? (#69)

Location:
lemon
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r1193 r1194  
    914914    };
    915915
    916     class RedIt : public RedNode {
     916    class RedNodeIt : public RedNode {
    917917      const BpGraph* _graph;
    918918    public:
    919919
    920       RedIt() {}
    921 
    922       RedIt(Invalid i) : RedNode(i) { }
    923 
    924       explicit RedIt(const BpGraph& graph) : _graph(&graph) {
     920      RedNodeIt() {}
     921
     922      RedNodeIt(Invalid i) : RedNode(i) { }
     923
     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;
     
    936936    };
    937937
    938     class BlueIt : public BlueNode {
     938    class BlueNodeIt : public BlueNode {
    939939      const BpGraph* _graph;
    940940    public:
    941941
    942       BlueIt() {}
    943 
    944       BlueIt(Invalid i) : BlueNode(i) { }
    945 
    946       explicit BlueIt(const BpGraph& graph) : _graph(&graph) {
     942      BlueNodeIt() {}
     943
     944      BlueNodeIt(Invalid i) : BlueNode(i) { }
     945
     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;
     
    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;
     
    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;
  • lemon/bits/traits.h

    r1187 r1194  
    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;
    182 
    183     public:
    184       typedef typename GR::template RedMap<V> Type;
     180    class Map : public GR::template RedNodeMap<V> {
     181      typedef typename GR::template RedNodeMap<V> Parent;
     182
     183    public:
     184      typedef typename GR::template RedNodeMap<V> Type;
    185185      typedef typename Parent::Value Value;
    186186
     
    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;
    223 
    224     public:
    225       typedef typename GR::template BlueMap<V> Type;
     221    class Map : public GR::template BlueNodeMap<V> {
     222      typedef typename GR::template BlueNodeMap<V> Parent;
     223
     224    public:
     225      typedef typename GR::template BlueNodeMap<V> Type;
    226226      typedef typename Parent::Value Value;
    227227
  • 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;
  • lemon/concepts/graph_components.h

    r1193 r1194  
    12071207      ///
    12081208      /// This iterator goes through each red node.
    1209       typedef GraphItemIt<BpGraph, RedNode> RedIt;
     1209      typedef GraphItemIt<BpGraph, RedNode> RedNodeIt;
    12101210
    12111211      /// \brief This iterator goes through each blue node.
    12121212      ///
    12131213      /// This iterator goes through each blue node.
    1214       typedef GraphItemIt<BpGraph, BlueNode> BlueIt;
     1214      typedef GraphItemIt<BpGraph, BlueNode> BlueNodeIt;
    12151215
    12161216      /// @}
     
    12291229
    12301230          checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::RedNode>,
    1231             typename _BpGraph::RedIt>();
     1231            typename _BpGraph::RedNodeIt>();
    12321232          checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::BlueNode>,
    1233             typename _BpGraph::BlueIt>();
     1233            typename _BpGraph::BlueNodeIt>();
    12341234        }
    12351235
     
    17161716    /// bipartite graphs.  It extends \ref MappableGraphComponent with
    17171717    /// the standard graph map class for red and blue nodes (\c
    1718     /// RedMap and BlueMap). This concept is part of the BpGraph concept.
     1718    /// RedNodeMap and BlueNodeMap). This concept is part of the
     1719    /// BpGraph concept.
    17191720    template <typename BAS = BaseBpGraphComponent>
    17201721    class MappableBpGraphComponent : public MappableGraphComponent<BAS>  {
     
    17311732      /// It conforms to the ReferenceMap concept.
    17321733      template <typename V>
    1733       class RedMap : public GraphMap<MappableBpGraphComponent, Node, V> {
     1734      class RedNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> {
    17341735        typedef GraphMap<MappableBpGraphComponent, Node, V> Parent;
    17351736
     
    17381739        ///
    17391740        /// Construct a new map for the graph.
    1740         explicit RedMap(const MappableBpGraphComponent& graph)
     1741        explicit RedNodeMap(const MappableBpGraphComponent& graph)
    17411742          : Parent(graph) {}
    17421743
     
    17441745        ///
    17451746        /// Construct a new map for the graph and initalize the values.
    1746         RedMap(const MappableBpGraphComponent& graph, const V& value)
     1747        RedNodeMap(const MappableBpGraphComponent& graph, const V& value)
    17471748          : Parent(graph, value) {}
    17481749
     
    17511752        ///
    17521753        /// Copy Constructor.
    1753         RedMap(const RedMap& nm) : Parent(nm) {}
     1754        RedNodeMap(const RedNodeMap& nm) : Parent(nm) {}
    17541755
    17551756        /// \brief Assignment operator.
     
    17571758        /// Assignment operator.
    17581759        template <typename CMap>
    1759         RedMap& operator=(const CMap&) {
     1760        RedNodeMap& operator=(const CMap&) {
    17601761          checkConcept<ReadMap<Node, V>, CMap>();
    17611762          return *this;
     
    17691770      /// It conforms to the ReferenceMap concept.
    17701771      template <typename V>
    1771       class BlueMap : public GraphMap<MappableBpGraphComponent, Node, V> {
     1772      class BlueNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> {
    17721773        typedef GraphMap<MappableBpGraphComponent, Node, V> Parent;
    17731774
     
    17761777        ///
    17771778        /// Construct a new map for the graph.
    1778         explicit BlueMap(const MappableBpGraphComponent& graph)
     1779        explicit BlueNodeMap(const MappableBpGraphComponent& graph)
    17791780          : Parent(graph) {}
    17801781
     
    17821783        ///
    17831784        /// Construct a new map for the graph and initalize the values.
    1784         BlueMap(const MappableBpGraphComponent& graph, const V& value)
     1785        BlueNodeMap(const MappableBpGraphComponent& graph, const V& value)
    17851786          : Parent(graph, value) {}
    17861787
     
    17891790        ///
    17901791        /// Copy Constructor.
    1791         BlueMap(const BlueMap& nm) : Parent(nm) {}
     1792        BlueNodeMap(const BlueNodeMap& nm) : Parent(nm) {}
    17921793
    17931794        /// \brief Assignment operator.
     
    17951796        /// Assignment operator.
    17961797        template <typename CMap>
    1797         BlueMap& operator=(const CMap&) {
     1798        BlueNodeMap& operator=(const CMap&) {
    17981799          checkConcept<ReadMap<Node, V>, CMap>();
    17991800          return *this;
     
    18161817
    18171818          { // int map test
    1818             typedef typename _BpGraph::template RedMap<int> IntRedMap;
     1819            typedef typename _BpGraph::template RedNodeMap<int>
     1820              IntRedNodeMap;
    18191821            checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, int>,
    1820               IntRedMap >();
     1822              IntRedNodeMap >();
    18211823          } { // bool map test
    1822             typedef typename _BpGraph::template RedMap<bool> BoolRedMap;
     1824            typedef typename _BpGraph::template RedNodeMap<bool>
     1825              BoolRedNodeMap;
    18231826            checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, bool>,
    1824               BoolRedMap >();
     1827              BoolRedNodeMap >();
    18251828          } { // Dummy map test
    1826             typedef typename _BpGraph::template RedMap<Dummy> DummyRedMap;
     1829            typedef typename _BpGraph::template RedNodeMap<Dummy>
     1830              DummyRedNodeMap;
    18271831            checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, Dummy>,
    1828               DummyRedMap >();
     1832              DummyRedNodeMap >();
    18291833          }
    18301834
    18311835          { // int map test
    1832             typedef typename _BpGraph::template BlueMap<int> IntBlueMap;
     1836            typedef typename _BpGraph::template BlueNodeMap<int>
     1837              IntBlueNodeMap;
    18331838            checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, int>,
    1834               IntBlueMap >();
     1839              IntBlueNodeMap >();
    18351840          } { // bool map test
    1836             typedef typename _BpGraph::template BlueMap<bool> BoolBlueMap;
     1841            typedef typename _BpGraph::template BlueNodeMap<bool>
     1842              BoolBlueNodeMap;
    18371843            checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, bool>,
    1838               BoolBlueMap >();
     1844              BoolBlueNodeMap >();
    18391845          } { // Dummy map test
    1840             typedef typename _BpGraph::template BlueMap<Dummy> DummyBlueMap;
     1846            typedef typename _BpGraph::template BlueNodeMap<Dummy>
     1847              DummyBlueNodeMap;
    18411848            checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, Dummy>,
    1842               DummyBlueMap >();
     1849              DummyBlueNodeMap >();
    18431850          }
    18441851        }
  • lemon/core.h

    r1193 r1194  
    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
     
    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
     
    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.
     
    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        }
     
    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;
     
    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
     
    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));
     
    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));
  • lemon/lgf_reader.h

    r1192 r1194  
    21492149  /// sections can contain different set of maps.
    21502150  ///
    2151   /// The red and blue maps are read from the corresponding
     2151  /// The red and blue node maps are read from the corresponding
    21522152  /// sections. If a map is defined with the same name in both of
    21532153  /// these sections, then it can be read as a node map.
     
    23382338    }
    23392339
    2340     /// Add a red map reading rule to the reader.
     2340    /// Add a red node map reading rule to the reader.
    23412341    template <typename Map>
    2342     BpGraphReader& redMap(const std::string& caption, Map& map) {
     2342    BpGraphReader& redNodeMap(const std::string& caption, Map& map) {
    23432343      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23442344      _reader_bits::MapStorageBase<Node>* storage =
     
    23482348    }
    23492349
    2350     /// \brief Red map reading rule
    2351     ///
    2352     /// Add a red map reading rule with specialized converter to the
    2353     /// reader.
     2350    /// \brief Red node map reading rule
     2351    ///
     2352    /// Add a red node map node reading rule with specialized converter to
     2353    /// the reader.
    23542354    template <typename Map, typename Converter>
    2355     BpGraphReader& redMap(const std::string& caption, Map& map,
    2356                           const Converter& converter = Converter()) {
     2355    BpGraphReader& redNodeMap(const std::string& caption, Map& map,
     2356                              const Converter& converter = Converter()) {
    23572357      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23582358      _reader_bits::MapStorageBase<Node>* storage =
     
    23622362    }
    23632363
    2364     /// Add a blue map reading rule to the reader.
     2364    /// Add a blue node map reading rule to the reader.
    23652365    template <typename Map>
    2366     BpGraphReader& blueMap(const std::string& caption, Map& map) {
     2366    BpGraphReader& blueNodeMap(const std::string& caption, Map& map) {
    23672367      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23682368      _reader_bits::MapStorageBase<Node>* storage =
     
    23722372    }
    23732373
    2374     /// \brief Blue map reading rule
    2375     ///
    2376     /// Add a blue map reading rule with specialized converter to the
    2377     /// reader.
     2374    /// \brief Blue node map reading rule
     2375    ///
     2376    /// Add a blue node map reading rule with specialized converter to
     2377    /// the reader.
    23782378    template <typename Map, typename Converter>
    2379     BpGraphReader& blueMap(const std::string& caption, Map& map,
    2380                            const Converter& converter = Converter()) {
     2379    BpGraphReader& blueNodeMap(const std::string& caption, Map& map,
     2380                               const Converter& converter = Converter()) {
    23812381      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
    23822382      _reader_bits::MapStorageBase<Node>* storage =
     
    26852685          if (maps.find(map) != maps.end()) {
    26862686            std::ostringstream msg;
    2687             msg << "Multiple occurence of red map: " << map;
     2687            msg << "Multiple occurence of red node map: " << map;
    26882688            throw FormatError(msg.str());
    26892689          }
     
    27782778          if (maps.find(map) != maps.end()) {
    27792779            std::ostringstream msg;
    2780             msg << "Multiple occurence of blue map: " << map;
     2780            msg << "Multiple occurence of blue node map: " << map;
    27812781            throw FormatError(msg.str());
    27822782          }
  • lemon/lgf_writer.h

    r1192 r1194  
    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.
     
    18061806    }
    18071807
    1808     /// \brief Red map writing rule
    1809     ///
    1810     /// Add a red map writing rule to the writer.
     1808    /// \brief Red node map writing rule
     1809    ///
     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 =
     
    18181818    }
    18191819
    1820     /// \brief Red map writing rule
    1821     ///
    1822     /// Add a red map writing rule with specialized converter to the
     1820    /// \brief Red node map writing rule
     1821    ///
     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 =
     
    18321832    }
    18331833
    1834     /// \brief Blue map writing rule
    1835     ///
    1836     /// Add a blue map writing rule to the writer.
     1834    /// \brief Blue node map writing rule
     1835    ///
     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 =
     
    18441844    }
    18451845
    1846     /// \brief Blue map writing rule
    1847     ///
    1848     /// Add a blue map writing rule with specialized converter to the
     1846    /// \brief Blue node map writing rule
     1847    ///
     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 =
     
    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      }
     
    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      }
Note: See TracChangeset for help on using the changeset viewer.