diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/core.h --- a/lemon/core.h Thu Dec 01 09:05:47 2011 +0100 +++ b/lemon/core.h Wed Jan 11 22:21:07 2012 +0100 @@ -150,10 +150,11 @@ ///Create convenience typedefs for the bipartite graph types and iterators - ///This \c \#define creates the same convenient type definitions as defined - ///by \ref GRAPH_TYPEDEFS(BpGraph) and ten more, namely it creates - ///\c RedNode, \c RedIt, \c BoolRedMap, \c IntRedMap, \c DoubleRedMap, - ///\c BlueNode, \c BlueIt, \c BoolBlueMap, \c IntBlueMap, \c DoubleBlueMap. + ///This \c \#define creates the same convenient type definitions as + ///defined by \ref GRAPH_TYPEDEFS(BpGraph) and ten more, namely it + ///creates \c RedNode, \c RedNodeIt, \c BoolRedNodeMap, + ///\c IntRedNodeMap, \c DoubleRedNodeMap, \c BlueNode, \c BlueNodeIt, + ///\c BoolBlueNodeMap, \c IntBlueNodeMap, \c DoubleBlueNodeMap. /// ///\note If the graph type is a dependent type, ie. the graph type depend ///on a template parameter, then use \c TEMPLATE_BPGRAPH_TYPEDEFS() @@ -161,15 +162,15 @@ #define BPGRAPH_TYPEDEFS(BpGraph) \ GRAPH_TYPEDEFS(BpGraph); \ typedef BpGraph::RedNode RedNode; \ - typedef BpGraph::RedIt RedIt; \ - typedef BpGraph::RedMap BoolRedMap; \ - typedef BpGraph::RedMap IntRedMap; \ - typedef BpGraph::RedMap DoubleRedMap; \ + typedef BpGraph::RedNodeIt RedNodeIt; \ + typedef BpGraph::RedNodeMap BoolRedNodeMap; \ + typedef BpGraph::RedNodeMap IntRedNodeMap; \ + typedef BpGraph::RedNodeMap DoubleRedNodeMap; \ typedef BpGraph::BlueNode BlueNode; \ - typedef BpGraph::BlueIt BlueIt; \ - typedef BpGraph::BlueMap BoolBlueMap; \ - typedef BpGraph::BlueMap IntBlueMap; \ - typedef BpGraph::BlueMap DoubleBlueMap + typedef BpGraph::BlueNodeIt BlueNodeIt; \ + typedef BpGraph::BlueNodeMap BoolBlueNodeMap; \ + typedef BpGraph::BlueNodeMap IntBlueNodeMap; \ + typedef BpGraph::BlueNodeMap DoubleBlueNodeMap ///Create convenience typedefs for the bipartite graph types and iterators @@ -177,18 +178,18 @@ /// ///\note Use this macro, if the graph type is a dependent type, ///ie. the graph type depend on a template parameter. -#define TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph) \ - TEMPLATE_GRAPH_TYPEDEFS(BpGraph); \ - typedef typename BpGraph::RedNode RedNode; \ - typedef typename BpGraph::RedIt RedIt; \ - typedef typename BpGraph::template RedMap BoolRedMap; \ - typedef typename BpGraph::template RedMap IntRedMap; \ - typedef typename BpGraph::template RedMap DoubleRedMap; \ - typedef typename BpGraph::BlueNode BlueNode; \ - typedef typename BpGraph::BlueIt BlueIt; \ - typedef typename BpGraph::template BlueMap BoolBlueMap; \ - typedef typename BpGraph::template BlueMap IntBlueMap; \ - typedef typename BpGraph::template BlueMap DoubleBlueMap +#define TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph) \ + TEMPLATE_GRAPH_TYPEDEFS(BpGraph); \ + typedef typename BpGraph::RedNode RedNode; \ + typedef typename BpGraph::RedNodeIt RedNodeIt; \ + typedef typename BpGraph::template RedNodeMap BoolRedNodeMap; \ + typedef typename BpGraph::template RedNodeMap IntRedNodeMap; \ + typedef typename BpGraph::template RedNodeMap DoubleRedNodeMap; \ + typedef typename BpGraph::BlueNode BlueNode; \ + typedef typename BpGraph::BlueNodeIt BlueNodeIt; \ + typedef typename BpGraph::template BlueNodeMap BoolBlueNodeMap; \ + typedef typename BpGraph::template BlueNodeMap IntBlueNodeMap; \ + typedef typename BpGraph::template BlueNodeMap DoubleBlueNodeMap /// \brief Function to count the items in a graph. /// @@ -565,10 +566,10 @@ BlueNodeRefMap& blueNodeRefMap, EdgeRefMap& edgeRefMap) { to.clear(); - for (typename From::RedIt it(from); it != INVALID; ++it) { + for (typename From::RedNodeIt it(from); it != INVALID; ++it) { redNodeRefMap[it] = to.addRedNode(); } - for (typename From::BlueIt it(from); it != INVALID; ++it) { + for (typename From::BlueNodeIt it(from); it != INVALID; ++it) { blueNodeRefMap[it] = to.addBlueNode(); } for (typename From::EdgeIt it(from); it != INVALID; ++it) { @@ -1164,10 +1165,10 @@ /// // Create cross references (inverse) for the edges /// NewBpGraph::EdgeMap ecr(new_graph); /// cg.edgeCrossRef(ecr); - /// // Copy a red map - /// OrigBpGraph::RedMap ormap(orig_graph); - /// NewBpGraph::RedMap nrmap(new_graph); - /// cg.edgeMap(ormap, nrmap); + /// // Copy a red node map + /// OrigBpGraph::RedNodeMap ormap(orig_graph); + /// NewBpGraph::RedNodeMap nrmap(new_graph); + /// cg.redNodeMap(ormap, nrmap); /// // Copy a node /// OrigBpGraph::Node on; /// NewBpGraph::Node nn; @@ -1194,8 +1195,8 @@ typedef typename To::Arc TArc; typedef typename To::Edge TEdge; - typedef typename From::template RedMap RedNodeRefMap; - typedef typename From::template BlueMap BlueNodeRefMap; + typedef typename From::template RedNodeMap RedNodeRefMap; + typedef typename From::template BlueNodeMap BlueNodeRefMap; typedef typename From::template EdgeMap EdgeRefMap; struct NodeRefMap { @@ -1352,7 +1353,7 @@ /// the original map \c map should be the Node type of the source /// graph. template - BpGraphCopy& redMap(const FromMap& map, ToMap& tmap) { + BpGraphCopy& redNodeMap(const FromMap& map, ToMap& tmap) { _red_maps.push_back(new _core_bits::MapCopy(map, tmap)); return *this; @@ -1403,7 +1404,7 @@ /// the original map \c map should be the Node type of the source /// graph. template - BpGraphCopy& blueMap(const FromMap& map, ToMap& tmap) { + BpGraphCopy& blueNodeMap(const FromMap& map, ToMap& tmap) { _blue_maps.push_back(new _core_bits::MapCopy(map, tmap)); return *this;