COIN-OR::LEMON - Graph Library

Changeset 1194:699c7eac2c6d in lemon for lemon/core.h


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

Renamings in BpGraphs? (#69)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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));
Note: See TracChangeset for help on using the changeset viewer.