1.1 --- a/doc/named-param.dox Wed Oct 05 13:44:29 2005 +0000
1.2 +++ b/doc/named-param.dox Wed Oct 05 16:45:37 2005 +0000
1.3 @@ -82,14 +82,14 @@
1.4 be used like in the following cases.
1.5
1.6 \code
1.7 -Dijkstra<>::SetPredNodeMap<NullMap<Node,Node> >
1.8 +Dijkstra<>::SetPredNodeMap<NullMap<Node,Node> >::Create
1.9 \endcode
1.10
1.11 It can also be used in conjunction with other named template
1.12 parameters in arbitrary order.
1.13
1.14 \code
1.15 -Dijkstra<>::SetDistMap<MyMap>::SetPredMap<NullMap<Node,Edge> >
1.16 +Dijkstra<>::SetDistMap<MyMap>::SetPredMap<NullMap<Node,Edge> >::Create
1.17 \endcode
1.18
1.19 The result will be an instantiated Dijkstra class, in which the
2.1 --- a/lemon/bfs.h Wed Oct 05 13:44:29 2005 +0000
2.2 +++ b/lemon/bfs.h Wed Oct 05 16:45:37 2005 +0000
2.3 @@ -57,24 +57,6 @@
2.4 {
2.5 return new PredMap(G);
2.6 }
2.7 -// ///\brief The type of the map that stores the last but one
2.8 -// ///nodes of the shortest paths.
2.9 -// ///
2.10 -// ///The type of the map that stores the last but one
2.11 -// ///nodes of the shortest paths.
2.12 -// ///It must meet the \ref concept::WriteMap "WriteMap" concept.
2.13 -// ///
2.14 -// typedef NullMap<typename Graph::Node,typename Graph::Node> PredNodeMap;
2.15 -// ///Instantiates a PredNodeMap.
2.16 -
2.17 -// ///This function instantiates a \ref PredNodeMap.
2.18 -// ///\param G is the graph, to which
2.19 -// ///we would like to define the \ref PredNodeMap
2.20 -// static PredNodeMap *createPredNodeMap(const GR &G)
2.21 -// {
2.22 -// return new PredNodeMap();
2.23 -// }
2.24 -
2.25 ///The type of the map that indicates which nodes are processed.
2.26
2.27 ///The type of the map that indicates which nodes are processed.
2.28 @@ -179,9 +161,6 @@
2.29 ///\brief The type of the map that stores the last
2.30 ///edges of the shortest paths.
2.31 typedef typename TR::PredMap PredMap;
2.32 -// ///\brief The type of the map that stores the last but one
2.33 -// ///nodes of the shortest paths.
2.34 -// typedef typename TR::PredNodeMap PredNodeMap;
2.35 ///The type of the map indicating which nodes are reached.
2.36 typedef typename TR::ReachedMap ReachedMap;
2.37 ///The type of the map indicating which nodes are processed.
2.38 @@ -195,10 +174,6 @@
2.39 PredMap *_pred;
2.40 ///Indicates if \ref _pred is locally allocated (\c true) or not.
2.41 bool local_pred;
2.42 -// ///Pointer to the map of predecessors nodes.
2.43 -// PredNodeMap *_predNode;
2.44 -// ///Indicates if \ref _predNode is locally allocated (\c true) or not.
2.45 -// bool local_predNode;
2.46 ///Pointer to the map of distances.
2.47 DistMap *_dist;
2.48 ///Indicates if \ref _dist is locally allocated (\c true) or not.
2.49 @@ -215,8 +190,6 @@
2.50 std::vector<typename Graph::Node> _queue;
2.51 int _queue_head,_queue_tail,_queue_next_dist;
2.52 int _curr_dist;
2.53 -// ///The source node of the last execution.
2.54 -// Node source;
2.55
2.56 ///Creates the maps if necessary.
2.57
2.58 @@ -228,10 +201,6 @@
2.59 local_pred = true;
2.60 _pred = Traits::createPredMap(*G);
2.61 }
2.62 -// if(!_predNode) {
2.63 -// local_predNode = true;
2.64 -// _predNode = Traits::createPredNodeMap(*G);
2.65 -// }
2.66 if(!_dist) {
2.67 local_dist = true;
2.68 _dist = Traits::createDistMap(*G);
2.69 @@ -265,24 +234,9 @@
2.70 ///\ref named-templ-param "Named parameter" for setting PredMap type
2.71 ///
2.72 template <class T>
2.73 - class DefPredMap : public Bfs< Graph, DefPredMapTraits<T> > { };
2.74 -
2.75 -// template <class T>
2.76 -// struct DefPredNodeMapTraits : public Traits {
2.77 -// typedef T PredNodeMap;
2.78 -// static PredNodeMap *createPredNodeMap(const Graph &G)
2.79 -// {
2.80 -// throw UninitializedParameter();
2.81 -// }
2.82 -// };
2.83 -// ///\ref named-templ-param "Named parameter" for setting PredNodeMap type
2.84 -
2.85 -// ///\ref named-templ-param "Named parameter" for setting PredNodeMap type
2.86 -// ///
2.87 -// template <class T>
2.88 -// class DefPredNodeMap : public Bfs< Graph,
2.89 -// LengthMap,
2.90 -// DefPredNodeMapTraits<T> > { };
2.91 + struct DefPredMap : public Bfs< Graph, DefPredMapTraits<T> > {
2.92 + typedef Bfs< Graph, DefPredMapTraits<T> > Create;
2.93 + };
2.94
2.95 template <class T>
2.96 struct DefDistMapTraits : public Traits {
2.97 @@ -297,8 +251,9 @@
2.98 ///\ref named-templ-param "Named parameter" for setting DistMap type
2.99 ///
2.100 template <class T>
2.101 - class DefDistMap : public Bfs< Graph,
2.102 - DefDistMapTraits<T> > { };
2.103 + struct DefDistMap : public Bfs< Graph, DefDistMapTraits<T> > {
2.104 + typedef Bfs< Graph, DefDistMapTraits<T> > Create;
2.105 + };
2.106
2.107 template <class T>
2.108 struct DefReachedMapTraits : public Traits {
2.109 @@ -313,16 +268,10 @@
2.110 ///\ref named-templ-param "Named parameter" for setting ReachedMap type
2.111 ///
2.112 template <class T>
2.113 - class DefReachedMap : public Bfs< Graph,
2.114 - DefReachedMapTraits<T> > { };
2.115 + struct DefReachedMap : public Bfs< Graph, DefReachedMapTraits<T> > {
2.116 + typedef Bfs< Graph, DefReachedMapTraits<T> > Create;
2.117 + };
2.118
2.119 - struct DefGraphReachedMapTraits : public Traits {
2.120 - typedef typename Graph::template NodeMap<bool> ReachedMap;
2.121 - static ReachedMap *createReachedMap(const Graph &G)
2.122 - {
2.123 - return new ReachedMap(G);
2.124 - }
2.125 - };
2.126 template <class T>
2.127 struct DefProcessedMapTraits : public Traits {
2.128 typedef T ProcessedMap;
2.129 @@ -336,8 +285,9 @@
2.130 ///\ref named-templ-param "Named parameter" for setting ProcessedMap type
2.131 ///
2.132 template <class T>
2.133 - class DefProcessedMap : public Bfs< Graph,
2.134 - DefProcessedMapTraits<T> > { };
2.135 + struct DefProcessedMap : public Bfs< Graph, DefProcessedMapTraits<T> > {
2.136 + typedef Bfs< Graph, DefProcessedMapTraits<T> > Create;
2.137 + };
2.138
2.139 struct DefGraphProcessedMapTraits : public Traits {
2.140 typedef typename Graph::template NodeMap<bool> ProcessedMap;
2.141 @@ -353,9 +303,10 @@
2.142 ///for setting the ProcessedMap type to be Graph::NodeMap<bool>.
2.143 ///If you don't set it explicitly, it will be automatically allocated.
2.144 template <class T>
2.145 - class DefProcessedMapToBeDefaultMap :
2.146 - public Bfs< Graph,
2.147 - DefGraphProcessedMapTraits> { };
2.148 + struct DefProcessedMapToBeDefaultMap :
2.149 + public Bfs< Graph, DefGraphProcessedMapTraits> {
2.150 + typedef Bfs< Graph, DefGraphProcessedMapTraits> Create;
2.151 + };
2.152
2.153 ///@}
2.154
2.155 @@ -368,7 +319,6 @@
2.156 Bfs(const Graph& _G) :
2.157 G(&_G),
2.158 _pred(NULL), local_pred(false),
2.159 -// _predNode(NULL), local_predNode(false),
2.160 _dist(NULL), local_dist(false),
2.161 _reached(NULL), local_reached(false),
2.162 _processed(NULL), local_processed(false)
2.163 @@ -378,7 +328,6 @@
2.164 ~Bfs()
2.165 {
2.166 if(local_pred) delete _pred;
2.167 -// if(local_predNode) delete _predNode;
2.168 if(local_dist) delete _dist;
2.169 if(local_reached) delete _reached;
2.170 if(local_processed) delete _processed;
2.171 @@ -435,23 +384,6 @@
2.172 return *this;
2.173 }
2.174
2.175 -// ///Sets the map storing the predecessor nodes.
2.176 -
2.177 -// ///Sets the map storing the predecessor nodes.
2.178 -// ///If you don't use this function before calling \ref run(),
2.179 -// ///it will allocate one. The destructor deallocates this
2.180 -// ///automatically allocated map, of course.
2.181 -// ///\return <tt> (*this) </tt>
2.182 -// Bfs &predNodeMap(PredNodeMap &m)
2.183 -// {
2.184 -// if(local_predNode) {
2.185 -// delete _predNode;
2.186 -// local_predNode=false;
2.187 -// }
2.188 -// _predNode = &m;
2.189 -// return *this;
2.190 -// }
2.191 -
2.192 ///Sets the map storing the distances calculated by the algorithm.
2.193
2.194 ///Sets the map storing the distances calculated by the algorithm.
2.195 @@ -494,7 +426,6 @@
2.196 _curr_dist=1;
2.197 for ( NodeIt u(*G) ; u!=INVALID ; ++u ) {
2.198 _pred->set(u,INVALID);
2.199 -// _predNode->set(u,INVALID);
2.200 _reached->set(u,false);
2.201 _processed->set(u,false);
2.202 }
2.203 @@ -537,7 +468,6 @@
2.204 _queue[_queue_head++]=m;
2.205 _reached->set(m,true);
2.206 _pred->set(m,e);
2.207 -// _pred_node->set(m,n);
2.208 _dist->set(m,_curr_dist);
2.209 }
2.210 return n;
2.211 @@ -745,13 +675,6 @@
2.212 ///must be called before using this function.
2.213 const PredMap &predMap() const { return *_pred;}
2.214
2.215 -// ///Returns a reference to the map of nodes of shortest paths.
2.216 -
2.217 -// ///Returns a reference to the NodeMap of the last but one nodes of the
2.218 -// ///shortest path tree.
2.219 -// ///\pre \ref run() must be called before using this function.
2.220 -// const PredNodeMap &predNodeMap() const { return *_predNode;}
2.221 -
2.222 ///Checks if a node is reachable from the root.
2.223
2.224 ///Returns \c true if \c v is reachable from the root.
2.225 @@ -794,23 +717,6 @@
2.226 {
2.227 return new PredMap();
2.228 }
2.229 -// ///\brief The type of the map that stores the last but one
2.230 -// ///nodes of the shortest paths.
2.231 -// ///
2.232 -// ///The type of the map that stores the last but one
2.233 -// ///nodes of the shortest paths.
2.234 -// ///It must meet the \ref concept::WriteMap "WriteMap" concept.
2.235 -// ///
2.236 -// typedef NullMap<typename Graph::Node,typename Graph::Node> PredNodeMap;
2.237 -// ///Instantiates a PredNodeMap.
2.238 -
2.239 -// ///This function instantiates a \ref PredNodeMap.
2.240 -// ///\param G is the graph, to which
2.241 -// ///we would like to define the \ref PredNodeMap
2.242 -// static PredNodeMap *createPredNodeMap(const GR &G)
2.243 -// {
2.244 -// return new PredNodeMap();
2.245 -// }
2.246
2.247 ///The type of the map that indicates which nodes are processed.
2.248
2.249 @@ -891,8 +797,6 @@
2.250 void *_processed;
2.251 ///Pointer to the map of predecessors edges.
2.252 void *_pred;
2.253 -// ///Pointer to the map of predecessors nodes.
2.254 -// void *_predNode;
2.255 ///Pointer to the map of distances.
2.256 void *_dist;
2.257 ///Pointer to the source node.
2.258 @@ -904,7 +808,6 @@
2.259 /// This constructor does not require parameters, therefore it initiates
2.260 /// all of the attributes to default values (0, INVALID).
2.261 BfsWizardBase() : _g(0), _reached(0), _processed(0), _pred(0),
2.262 -// _predNode(0),
2.263 _dist(0), _source(INVALID) {}
2.264
2.265 /// Constructor.
2.266 @@ -916,7 +819,6 @@
2.267 /// \param s is the initial value of \ref _source
2.268 BfsWizardBase(const GR &g, Node s=INVALID) :
2.269 _g((void *)&g), _reached(0), _processed(0), _pred(0),
2.270 -// _predNode(0),
2.271 _dist(0), _source(s) {}
2.272
2.273 };
2.274 @@ -965,9 +867,6 @@
2.275 ///\brief The type of the map that stores the last
2.276 ///edges of the shortest paths.
2.277 typedef typename TR::PredMap PredMap;
2.278 -// ///\brief The type of the map that stores the last but one
2.279 -// ///nodes of the shortest paths.
2.280 -// typedef typename TR::PredNodeMap PredNodeMap;
2.281 ///The type of the map that stores the dists of the nodes.
2.282 typedef typename TR::DistMap DistMap;
2.283
2.284 @@ -999,7 +898,6 @@
2.285 alg.reachedMap(*(ReachedMap*)Base::_reached);
2.286 if(Base::_processed) alg.processedMap(*(ProcessedMap*)Base::_processed);
2.287 if(Base::_pred) alg.predMap(*(PredMap*)Base::_pred);
2.288 -// if(Base::_predNode) alg.predNodeMap(*(PredNodeMap*)Base::_predNode);
2.289 if(Base::_dist) alg.distMap(*(DistMap*)Base::_dist);
2.290 alg.run(Base::_source);
2.291 }
2.292 @@ -1076,26 +974,6 @@
2.293 return BfsWizard<DefProcessedMapBase<T> >(*this);
2.294 }
2.295
2.296 -
2.297 -// template<class T>
2.298 -// struct DefPredNodeMapBase : public Base {
2.299 -// typedef T PredNodeMap;
2.300 -// static PredNodeMap *createPredNodeMap(const Graph &G) { return 0; };
2.301 -// DefPredNodeMapBase(const TR &b) : TR(b) {}
2.302 -// };
2.303 -
2.304 -// ///\brief \ref named-templ-param "Named parameter"
2.305 -// ///function for setting PredNodeMap type
2.306 -// ///
2.307 -// /// \ref named-templ-param "Named parameter"
2.308 -// ///function for setting PredNodeMap type
2.309 -// ///
2.310 -// template<class T>
2.311 -// BfsWizard<DefPredNodeMapBase<T> > predNodeMap(const T &t)
2.312 -// {
2.313 -// Base::_predNode=(void *)&t;
2.314 -// return BfsWizard<DefPredNodeMapBase<T> >(*this);
2.315 -// }
2.316
2.317 template<class T>
2.318 struct DefDistMapBase : public Base {
3.1 --- a/lemon/dfs.h Wed Oct 05 13:44:29 2005 +0000
3.2 +++ b/lemon/dfs.h Wed Oct 05 16:45:37 2005 +0000
3.3 @@ -57,23 +57,6 @@
3.4 {
3.5 return new PredMap(G);
3.6 }
3.7 -// ///\brief The type of the map that stores the last but one
3.8 -// ///nodes of the %DFS paths.
3.9 -// ///
3.10 -// ///The type of the map that stores the last but one
3.11 -// ///nodes of the %DFS paths.
3.12 -// ///It must meet the \ref concept::WriteMap "WriteMap" concept.
3.13 -// ///
3.14 -// typedef NullMap<typename Graph::Node,typename Graph::Node> PredNodeMap;
3.15 -// ///Instantiates a PredNodeMap.
3.16 -
3.17 -// ///This function instantiates a \ref PredNodeMap.
3.18 -// ///\param G is the graph, to which
3.19 -// ///we would like to define the \ref PredNodeMap
3.20 -// static PredNodeMap *createPredNodeMap(const GR &G)
3.21 -// {
3.22 -// return new PredNodeMap();
3.23 -// }
3.24
3.25 ///The type of the map that indicates which nodes are processed.
3.26
3.27 @@ -179,9 +162,6 @@
3.28 ///\brief The type of the map that stores the last
3.29 ///edges of the %DFS paths.
3.30 typedef typename TR::PredMap PredMap;
3.31 -// ///\brief The type of the map that stores the last but one
3.32 -// ///nodes of the %DFS paths.
3.33 -// typedef typename TR::PredNodeMap PredNodeMap;
3.34 ///The type of the map indicating which nodes are reached.
3.35 typedef typename TR::ReachedMap ReachedMap;
3.36 ///The type of the map indicating which nodes are processed.
3.37 @@ -195,10 +175,6 @@
3.38 PredMap *_pred;
3.39 ///Indicates if \ref _pred is locally allocated (\c true) or not.
3.40 bool local_pred;
3.41 -// ///Pointer to the map of predecessors nodes.
3.42 -// PredNodeMap *_predNode;
3.43 -// ///Indicates if \ref _predNode is locally allocated (\c true) or not.
3.44 -// bool local_predNode;
3.45 ///Pointer to the map of distances.
3.46 DistMap *_dist;
3.47 ///Indicates if \ref _dist is locally allocated (\c true) or not.
3.48 @@ -214,8 +190,6 @@
3.49
3.50 std::vector<typename Graph::OutEdgeIt> _stack;
3.51 int _stack_head;
3.52 -// ///The source node of the last execution.
3.53 -// Node source;
3.54
3.55 ///Creates the maps if necessary.
3.56
3.57 @@ -227,10 +201,6 @@
3.58 local_pred = true;
3.59 _pred = Traits::createPredMap(*G);
3.60 }
3.61 -// if(!_predNode) {
3.62 -// local_predNode = true;
3.63 -// _predNode = Traits::createPredNodeMap(*G);
3.64 -// }
3.65 if(!_dist) {
3.66 local_dist = true;
3.67 _dist = Traits::createDistMap(*G);
3.68 @@ -246,7 +216,9 @@
3.69 }
3.70
3.71 public :
3.72 -
3.73 +
3.74 + typedef Dfs Create;
3.75 +
3.76 ///\name Named template parameters
3.77
3.78 ///@{
3.79 @@ -264,25 +236,10 @@
3.80 ///\ref named-templ-param "Named parameter" for setting PredMap type
3.81 ///
3.82 template <class T>
3.83 - class DefPredMap : public Dfs< Graph,
3.84 - DefPredMapTraits<T> > { };
3.85 + struct DefPredMap : public Dfs<Graph, DefPredMapTraits<T> > {
3.86 + typedef Dfs<Graph, DefPredMapTraits<T> > Create;
3.87 + };
3.88
3.89 -// template <class T>
3.90 -// struct DefPredNodeMapTraits : public Traits {
3.91 -// typedef T PredNodeMap;
3.92 -// static PredNodeMap *createPredNodeMap(const Graph &G)
3.93 -// {
3.94 -// throw UninitializedParameter();
3.95 -// }
3.96 -// };
3.97 -// ///\ref named-templ-param "Named parameter" for setting PredNodeMap type
3.98 -
3.99 -// ///\ref named-templ-param "Named parameter" for setting PredNodeMap type
3.100 -// ///
3.101 -// template <class T>
3.102 -// class DefPredNodeMap : public Dfs< Graph,
3.103 -// LengthMap,
3.104 -// DefPredNodeMapTraits<T> > { };
3.105
3.106 template <class T>
3.107 struct DefDistMapTraits : public Traits {
3.108 @@ -297,8 +254,9 @@
3.109 ///\ref named-templ-param "Named parameter" for setting DistMap type
3.110 ///
3.111 template <class T>
3.112 - class DefDistMap : public Dfs< Graph,
3.113 - DefDistMapTraits<T> > { };
3.114 + struct DefDistMap {
3.115 + typedef Dfs<Graph, DefDistMapTraits<T> > Create;
3.116 + };
3.117
3.118 template <class T>
3.119 struct DefReachedMapTraits : public Traits {
3.120 @@ -313,16 +271,10 @@
3.121 ///\ref named-templ-param "Named parameter" for setting ReachedMap type
3.122 ///
3.123 template <class T>
3.124 - class DefReachedMap : public Dfs< Graph,
3.125 - DefReachedMapTraits<T> > { };
3.126 -
3.127 - struct DefGraphReachedMapTraits : public Traits {
3.128 - typedef typename Graph::template NodeMap<bool> ReachedMap;
3.129 - static ReachedMap *createReachedMap(const Graph &G)
3.130 - {
3.131 - return new ReachedMap(G);
3.132 - }
3.133 + struct DefReachedMap {
3.134 + typedef Dfs< Graph, DefReachedMapTraits<T> > Create;
3.135 };
3.136 +
3.137 template <class T>
3.138 struct DefProcessedMapTraits : public Traits {
3.139 typedef T ProcessedMap;
3.140 @@ -337,7 +289,7 @@
3.141 ///
3.142 template <class T>
3.143 struct DefProcessedMap : public Dfs< Graph, DefProcessedMapTraits<T> > {
3.144 - typedef Dfs< Graph, DefProcessedMapTraits<T> > Dfs;
3.145 + typedef Dfs< Graph, DefProcessedMapTraits<T> > Create;
3.146 };
3.147
3.148 struct DefGraphProcessedMapTraits : public Traits {
3.149 @@ -355,8 +307,9 @@
3.150 ///If you don't set it explicitely, it will be automatically allocated.
3.151 template <class T>
3.152 class DefProcessedMapToBeDefaultMap :
3.153 - public Dfs< Graph,
3.154 - DefGraphProcessedMapTraits> { };
3.155 + public Dfs< Graph, DefGraphProcessedMapTraits> {
3.156 + typedef Dfs< Graph, DefGraphProcessedMapTraits> Create;
3.157 + };
3.158
3.159 ///@}
3.160
4.1 --- a/lemon/dijkstra.h Wed Oct 05 13:44:29 2005 +0000
4.2 +++ b/lemon/dijkstra.h Wed Oct 05 16:45:37 2005 +0000
4.3 @@ -56,8 +56,7 @@
4.4 ///
4.5 ///\sa BinHeap
4.6 ///\sa Dijkstra
4.7 - typedef BinHeap<typename Graph::Node,
4.8 - typename LM::Value,
4.9 + typedef BinHeap<typename Graph::Node, typename LM::Value,
4.10 typename GR::template NodeMap<int>,
4.11 std::less<Value> > Heap;
4.12
4.13 @@ -255,9 +254,10 @@
4.14 ///\ref named-templ-param "Named parameter" for setting PredMap type
4.15 ///
4.16 template <class T>
4.17 - class DefPredMap : public Dijkstra< Graph,
4.18 - LengthMap,
4.19 - DefPredMapTraits<T> > { };
4.20 + struct DefPredMap
4.21 + : public Dijkstra< Graph, LengthMap, DefPredMapTraits<T> > {
4.22 + typedef Dijkstra< Graph, LengthMap, DefPredMapTraits<T> > Create;
4.23 + };
4.24
4.25 template <class T>
4.26 struct DefDistMapTraits : public Traits {
4.27 @@ -272,9 +272,10 @@
4.28 ///\ref named-templ-param "Named parameter" for setting DistMap type
4.29 ///
4.30 template <class T>
4.31 - class DefDistMap : public Dijkstra< Graph,
4.32 - LengthMap,
4.33 - DefDistMapTraits<T> > { };
4.34 + struct DefDistMap
4.35 + : public Dijkstra< Graph, LengthMap, DefDistMapTraits<T> > {
4.36 + typedef Dijkstra< Graph, LengthMap, DefDistMapTraits<T> > Create;
4.37 + };
4.38
4.39 template <class T>
4.40 struct DefProcessedMapTraits : public Traits {
4.41 @@ -289,9 +290,10 @@
4.42 ///\ref named-templ-param "Named parameter" for setting ProcessedMap type
4.43 ///
4.44 template <class T>
4.45 - class DefProcessedMap : public Dijkstra< Graph,
4.46 - LengthMap,
4.47 - DefProcessedMapTraits<T> > { };
4.48 + struct DefProcessedMap
4.49 + : public Dijkstra< Graph, LengthMap, DefProcessedMapTraits<T> > {
4.50 + typedef Dijkstra< Graph, LengthMap, DefProcessedMapTraits<T> > Create;
4.51 + };
4.52
4.53 struct DefGraphProcessedMapTraits : public Traits {
4.54 typedef typename Graph::template NodeMap<bool> ProcessedMap;
4.55 @@ -307,10 +309,10 @@
4.56 ///for setting the ProcessedMap type to be Graph::NodeMap<bool>.
4.57 ///If you don't set it explicitely, it will be automatically allocated.
4.58 template <class T>
4.59 - class DefProcessedMapToBeDefaultMap :
4.60 - public Dijkstra< Graph,
4.61 - LengthMap,
4.62 - DefGraphProcessedMapTraits> { };
4.63 + struct DefProcessedMapToBeDefaultMap
4.64 + : public Dijkstra< Graph, LengthMap, DefGraphProcessedMapTraits> {
4.65 + typedef Dijkstra< Graph, LengthMap, DefGraphProcessedMapTraits> Create;
4.66 + };
4.67
4.68 ///@}
4.69
5.1 --- a/lemon/topology.h Wed Oct 05 13:44:29 2005 +0000
5.2 +++ b/lemon/topology.h Wed Oct 05 16:45:37 2005 +0000
5.3 @@ -73,7 +73,7 @@
5.4 typedef BackCounterMap<NodeMap> ProcessedMap;
5.5
5.6 typename Dfs<Graph>::template DefProcessedMap<ProcessedMap>::
5.7 - Dfs dfs(graph);
5.8 + Create dfs(graph);
5.9
5.10 ProcessedMap processed(nodeMap, countNodes(graph));
5.11
5.12 @@ -111,7 +111,7 @@
5.13 typedef typename Graph::template NodeMap<bool> ProcessedMap;
5.14
5.15 typename Dfs<Graph>::template DefProcessedMap<ProcessedMap>::
5.16 - Dfs dfs(graph);
5.17 + Create dfs(graph);
5.18
5.19 ProcessedMap processed(graph);
5.20 dfs.processedMap(processed);