# HG changeset patch # User Alpar Juttner <alpar@cs.elte.hu> # Date 1221127844 -3600 # Node ID c691064dfd4f2e3d4e230a1fd9845a1d96de2a5d # Parent 362415050b29c0c5c089847b2985595d373b33e2# Parent 0310c8984732b7dcf2afaa6eecdb74f936b550e8 Merge diff -r 362415050b29 -r c691064dfd4f lemon/bfs.h --- a/lemon/bfs.h Wed Sep 10 11:23:41 2008 +0100 +++ b/lemon/bfs.h Thu Sep 11 11:10:44 2008 +0100 @@ -230,7 +230,7 @@ ///@{ template <class T> - struct DefPredMapTraits : public Traits { + struct SetPredMapTraits : public Traits { typedef T PredMap; static PredMap *createPredMap(const Digraph &) { @@ -243,12 +243,12 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref PredMap type. template <class T> - struct DefPredMap : public Bfs< Digraph, DefPredMapTraits<T> > { - typedef Bfs< Digraph, DefPredMapTraits<T> > Create; + struct SetPredMap : public Bfs< Digraph, SetPredMapTraits<T> > { + typedef Bfs< Digraph, SetPredMapTraits<T> > Create; }; template <class T> - struct DefDistMapTraits : public Traits { + struct SetDistMapTraits : public Traits { typedef T DistMap; static DistMap *createDistMap(const Digraph &) { @@ -261,12 +261,12 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref DistMap type. template <class T> - struct DefDistMap : public Bfs< Digraph, DefDistMapTraits<T> > { - typedef Bfs< Digraph, DefDistMapTraits<T> > Create; + struct SetDistMap : public Bfs< Digraph, SetDistMapTraits<T> > { + typedef Bfs< Digraph, SetDistMapTraits<T> > Create; }; template <class T> - struct DefReachedMapTraits : public Traits { + struct SetReachedMapTraits : public Traits { typedef T ReachedMap; static ReachedMap *createReachedMap(const Digraph &) { @@ -279,12 +279,12 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ReachedMap type. template <class T> - struct DefReachedMap : public Bfs< Digraph, DefReachedMapTraits<T> > { - typedef Bfs< Digraph, DefReachedMapTraits<T> > Create; + struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits<T> > { + typedef Bfs< Digraph, SetReachedMapTraits<T> > Create; }; template <class T> - struct DefProcessedMapTraits : public Traits { + struct SetProcessedMapTraits : public Traits { typedef T ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &) { @@ -297,11 +297,11 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ProcessedMap type. template <class T> - struct DefProcessedMap : public Bfs< Digraph, DefProcessedMapTraits<T> > { - typedef Bfs< Digraph, DefProcessedMapTraits<T> > Create; + struct SetProcessedMap : public Bfs< Digraph, SetProcessedMapTraits<T> > { + typedef Bfs< Digraph, SetProcessedMapTraits<T> > Create; }; - struct DefDigraphProcessedMapTraits : public Traits { + struct SetStandardProcessedMapTraits : public Traits { typedef typename Digraph::template NodeMap<bool> ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &g) { @@ -314,10 +314,9 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. ///If you don't set it explicitly, it will be automatically allocated. - template <class T> - struct DefProcessedMapToBeDefaultMap : - public Bfs< Digraph, DefDigraphProcessedMapTraits> { - typedef Bfs< Digraph, DefDigraphProcessedMapTraits> Create; + struct SetStandardProcessedMap : + public Bfs< Digraph, SetStandardProcessedMapTraits > { + typedef Bfs< Digraph, SetStandardProcessedMapTraits > Create; }; ///@} @@ -1065,10 +1064,10 @@ } template<class T> - struct DefPredMapBase : public Base { + struct SetPredMapBase : public Base { typedef T PredMap; static PredMap *createPredMap(const Digraph &) { return 0; }; - DefPredMapBase(const TR &b) : TR(b) {} + SetPredMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref PredMap object. @@ -1076,17 +1075,17 @@ /// \ref named-templ-param "Named parameter" ///for setting \ref PredMap object. template<class T> - BfsWizard<DefPredMapBase<T> > predMap(const T &t) + BfsWizard<SetPredMapBase<T> > predMap(const T &t) { Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t)); - return BfsWizard<DefPredMapBase<T> >(*this); + return BfsWizard<SetPredMapBase<T> >(*this); } template<class T> - struct DefReachedMapBase : public Base { + struct SetReachedMapBase : public Base { typedef T ReachedMap; static ReachedMap *createReachedMap(const Digraph &) { return 0; }; - DefReachedMapBase(const TR &b) : TR(b) {} + SetReachedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref ReachedMap object. @@ -1094,17 +1093,17 @@ /// \ref named-templ-param "Named parameter" ///for setting \ref ReachedMap object. template<class T> - BfsWizard<DefReachedMapBase<T> > reachedMap(const T &t) + BfsWizard<SetReachedMapBase<T> > reachedMap(const T &t) { Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t)); - return BfsWizard<DefReachedMapBase<T> >(*this); + return BfsWizard<SetReachedMapBase<T> >(*this); } template<class T> - struct DefProcessedMapBase : public Base { + struct SetProcessedMapBase : public Base { typedef T ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &) { return 0; }; - DefProcessedMapBase(const TR &b) : TR(b) {} + SetProcessedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref ProcessedMap object. @@ -1112,17 +1111,17 @@ /// \ref named-templ-param "Named parameter" ///for setting \ref ProcessedMap object. template<class T> - BfsWizard<DefProcessedMapBase<T> > processedMap(const T &t) + BfsWizard<SetProcessedMapBase<T> > processedMap(const T &t) { Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t)); - return BfsWizard<DefProcessedMapBase<T> >(*this); + return BfsWizard<SetProcessedMapBase<T> >(*this); } template<class T> - struct DefDistMapBase : public Base { + struct SetDistMapBase : public Base { typedef T DistMap; static DistMap *createDistMap(const Digraph &) { return 0; }; - DefDistMapBase(const TR &b) : TR(b) {} + SetDistMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref DistMap object. @@ -1130,10 +1129,10 @@ /// \ref named-templ-param "Named parameter" ///for setting \ref DistMap object. template<class T> - BfsWizard<DefDistMapBase<T> > distMap(const T &t) + BfsWizard<SetDistMapBase<T> > distMap(const T &t) { Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t)); - return BfsWizard<DefDistMapBase<T> >(*this); + return BfsWizard<SetDistMapBase<T> >(*this); } }; @@ -1354,7 +1353,7 @@ ///@{ template <class T> - struct DefReachedMapTraits : public Traits { + struct SetReachedMapTraits : public Traits { typedef T ReachedMap; static ReachedMap *createReachedMap(const Digraph &digraph) { throw UninitializedParameter(); @@ -1365,9 +1364,9 @@ /// /// \ref named-templ-param "Named parameter" for setting ReachedMap type. template <class T> - struct DefReachedMap : public BfsVisit< Digraph, Visitor, - DefReachedMapTraits<T> > { - typedef BfsVisit< Digraph, Visitor, DefReachedMapTraits<T> > Create; + struct SetReachedMap : public BfsVisit< Digraph, Visitor, + SetReachedMapTraits<T> > { + typedef BfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create; }; ///@} diff -r 362415050b29 -r c691064dfd4f lemon/bits/base_extender.h --- a/lemon/bits/base_extender.h Wed Sep 10 11:23:41 2008 +0100 +++ b/lemon/bits/base_extender.h Thu Sep 11 11:10:44 2008 +0100 @@ -59,7 +59,7 @@ public: Arc() {} - /// Invalid arc constructor + // Invalid arc constructor Arc(Invalid i) : Edge(i), forward(true) {} bool operator==(const Arc &that) const { @@ -74,38 +74,41 @@ } }; + /// First node of the edge + Node u(const Edge &e) const { + return Parent::source(e); + } - - using Parent::source; - - /// Source of the given Arc. + /// Source of the given arc Node source(const Arc &e) const { return e.forward ? Parent::source(e) : Parent::target(e); } - using Parent::target; + /// Second node of the edge + Node v(const Edge &e) const { + return Parent::target(e); + } - /// Target of the given Arc. + /// Target of the given arc Node target(const Arc &e) const { return e.forward ? Parent::target(e) : Parent::source(e); } /// \brief Directed arc from an edge. /// - /// Returns a directed arc corresponding to the specified Edge. - /// If the given bool is true the given edge and the - /// returned arc have the same source node. - static Arc direct(const Edge &ue, bool d) { - return Arc(ue, d); + /// Returns a directed arc corresponding to the specified edge. + /// If the given bool is true, the first node of the given edge and + /// the source node of the returned arc are the same. + static Arc direct(const Edge &e, bool d) { + return Arc(e, d); } - /// Returns whether the given directed arc is same orientation as the - /// corresponding edge. + /// Returns whether the given directed arc has the same orientation + /// as the corresponding edge. /// /// \todo reference to the corresponding point of the undirected digraph /// concept. "What does the direction of an edge mean?" - static bool direction(const Arc &e) { return e.forward; } - + static bool direction(const Arc &a) { return a.forward; } using Parent::first; using Parent::next; @@ -229,7 +232,6 @@ return Parent::maxArcId(); } - int arcNum() const { return 2 * Parent::arcNum(); } diff -r 362415050b29 -r c691064dfd4f lemon/dfs.h --- a/lemon/dfs.h Wed Sep 10 11:23:41 2008 +0100 +++ b/lemon/dfs.h Thu Sep 11 11:10:44 2008 +0100 @@ -230,7 +230,7 @@ ///@{ template <class T> - struct DefPredMapTraits : public Traits { + struct SetPredMapTraits : public Traits { typedef T PredMap; static PredMap *createPredMap(const Digraph &) { @@ -243,12 +243,12 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref PredMap type. template <class T> - struct DefPredMap : public Dfs<Digraph, DefPredMapTraits<T> > { - typedef Dfs<Digraph, DefPredMapTraits<T> > Create; + struct SetPredMap : public Dfs<Digraph, SetPredMapTraits<T> > { + typedef Dfs<Digraph, SetPredMapTraits<T> > Create; }; template <class T> - struct DefDistMapTraits : public Traits { + struct SetDistMapTraits : public Traits { typedef T DistMap; static DistMap *createDistMap(const Digraph &) { @@ -261,12 +261,12 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref DistMap type. template <class T> - struct DefDistMap : public Dfs< Digraph, DefDistMapTraits<T> > { - typedef Dfs<Digraph, DefDistMapTraits<T> > Create; + struct SetDistMap : public Dfs< Digraph, SetDistMapTraits<T> > { + typedef Dfs<Digraph, SetDistMapTraits<T> > Create; }; template <class T> - struct DefReachedMapTraits : public Traits { + struct SetReachedMapTraits : public Traits { typedef T ReachedMap; static ReachedMap *createReachedMap(const Digraph &) { @@ -279,12 +279,12 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ReachedMap type. template <class T> - struct DefReachedMap : public Dfs< Digraph, DefReachedMapTraits<T> > { - typedef Dfs< Digraph, DefReachedMapTraits<T> > Create; + struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits<T> > { + typedef Dfs< Digraph, SetReachedMapTraits<T> > Create; }; template <class T> - struct DefProcessedMapTraits : public Traits { + struct SetProcessedMapTraits : public Traits { typedef T ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &) { @@ -297,11 +297,11 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ProcessedMap type. template <class T> - struct DefProcessedMap : public Dfs< Digraph, DefProcessedMapTraits<T> > { - typedef Dfs< Digraph, DefProcessedMapTraits<T> > Create; + struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits<T> > { + typedef Dfs< Digraph, SetProcessedMapTraits<T> > Create; }; - struct DefDigraphProcessedMapTraits : public Traits { + struct SetStandardProcessedMapTraits : public Traits { typedef typename Digraph::template NodeMap<bool> ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &g) { @@ -314,10 +314,9 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. ///If you don't set it explicitly, it will be automatically allocated. - template <class T> - struct DefProcessedMapToBeDefaultMap : - public Dfs< Digraph, DefDigraphProcessedMapTraits> { - typedef Dfs< Digraph, DefDigraphProcessedMapTraits> Create; + struct SetStandardProcessedMap : + public Dfs< Digraph, SetStandardProcessedMapTraits > { + typedef Dfs< Digraph, SetStandardProcessedMapTraits > Create; }; ///@} @@ -1000,10 +999,10 @@ } template<class T> - struct DefPredMapBase : public Base { + struct SetPredMapBase : public Base { typedef T PredMap; static PredMap *createPredMap(const Digraph &) { return 0; }; - DefPredMapBase(const TR &b) : TR(b) {} + SetPredMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref PredMap object. @@ -1011,17 +1010,17 @@ ///\ref named-templ-param "Named parameter" ///for setting \ref PredMap object. template<class T> - DfsWizard<DefPredMapBase<T> > predMap(const T &t) + DfsWizard<SetPredMapBase<T> > predMap(const T &t) { Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t)); - return DfsWizard<DefPredMapBase<T> >(*this); + return DfsWizard<SetPredMapBase<T> >(*this); } template<class T> - struct DefReachedMapBase : public Base { + struct SetReachedMapBase : public Base { typedef T ReachedMap; static ReachedMap *createReachedMap(const Digraph &) { return 0; }; - DefReachedMapBase(const TR &b) : TR(b) {} + SetReachedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref ReachedMap object. @@ -1029,17 +1028,17 @@ /// \ref named-templ-param "Named parameter" ///for setting \ref ReachedMap object. template<class T> - DfsWizard<DefReachedMapBase<T> > reachedMap(const T &t) + DfsWizard<SetReachedMapBase<T> > reachedMap(const T &t) { Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t)); - return DfsWizard<DefReachedMapBase<T> >(*this); + return DfsWizard<SetReachedMapBase<T> >(*this); } template<class T> - struct DefProcessedMapBase : public Base { + struct SetProcessedMapBase : public Base { typedef T ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &) { return 0; }; - DefProcessedMapBase(const TR &b) : TR(b) {} + SetProcessedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref ProcessedMap object. @@ -1047,17 +1046,17 @@ /// \ref named-templ-param "Named parameter" ///for setting \ref ProcessedMap object. template<class T> - DfsWizard<DefProcessedMapBase<T> > processedMap(const T &t) + DfsWizard<SetProcessedMapBase<T> > processedMap(const T &t) { Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t)); - return DfsWizard<DefProcessedMapBase<T> >(*this); + return DfsWizard<SetProcessedMapBase<T> >(*this); } template<class T> - struct DefDistMapBase : public Base { + struct SetDistMapBase : public Base { typedef T DistMap; static DistMap *createDistMap(const Digraph &) { return 0; }; - DefDistMapBase(const TR &b) : TR(b) {} + SetDistMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref DistMap object. @@ -1065,10 +1064,10 @@ ///\ref named-templ-param "Named parameter" ///for setting \ref DistMap object. template<class T> - DfsWizard<DefDistMapBase<T> > distMap(const T &t) + DfsWizard<SetDistMapBase<T> > distMap(const T &t) { Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t)); - return DfsWizard<DefDistMapBase<T> >(*this); + return DfsWizard<SetDistMapBase<T> >(*this); } }; @@ -1301,7 +1300,7 @@ ///@{ template <class T> - struct DefReachedMapTraits : public Traits { + struct SetReachedMapTraits : public Traits { typedef T ReachedMap; static ReachedMap *createReachedMap(const Digraph &digraph) { throw UninitializedParameter(); @@ -1312,9 +1311,9 @@ /// /// \ref named-templ-param "Named parameter" for setting ReachedMap type. template <class T> - struct DefReachedMap : public DfsVisit< Digraph, Visitor, - DefReachedMapTraits<T> > { - typedef DfsVisit< Digraph, Visitor, DefReachedMapTraits<T> > Create; + struct SetReachedMap : public DfsVisit< Digraph, Visitor, + SetReachedMapTraits<T> > { + typedef DfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create; }; ///@} diff -r 362415050b29 -r c691064dfd4f lemon/dijkstra.h --- a/lemon/dijkstra.h Wed Sep 10 11:23:41 2008 +0100 +++ b/lemon/dijkstra.h Thu Sep 11 11:10:44 2008 +0100 @@ -331,7 +331,7 @@ ///@{ template <class T> - struct DefPredMapTraits : public Traits { + struct SetPredMapTraits : public Traits { typedef T PredMap; static PredMap *createPredMap(const Digraph &) { @@ -344,13 +344,13 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref PredMap type. template <class T> - struct DefPredMap - : public Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > { - typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > Create; + struct SetPredMap + : public Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > { + typedef Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > Create; }; template <class T> - struct DefDistMapTraits : public Traits { + struct SetDistMapTraits : public Traits { typedef T DistMap; static DistMap *createDistMap(const Digraph &) { @@ -363,13 +363,13 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref DistMap type. template <class T> - struct DefDistMap - : public Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > { - typedef Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > Create; + struct SetDistMap + : public Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > { + typedef Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > Create; }; template <class T> - struct DefProcessedMapTraits : public Traits { + struct SetProcessedMapTraits : public Traits { typedef T ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &) { @@ -382,12 +382,12 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ProcessedMap type. template <class T> - struct DefProcessedMap - : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > { - typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > Create; + struct SetProcessedMap + : public Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > { + typedef Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > Create; }; - struct DefDigraphProcessedMapTraits : public Traits { + struct SetStandardProcessedMapTraits : public Traits { typedef typename Digraph::template NodeMap<bool> ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &g) { @@ -400,15 +400,14 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. ///If you don't set it explicitly, it will be automatically allocated. - template <class T> - struct DefProcessedMapToBeDefaultMap - : public Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> { - typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> + struct SetStandardProcessedMap + : public Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits > { + typedef Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits > Create; }; template <class H, class CR> - struct DefHeapTraits : public Traits { + struct SetHeapTraits : public Traits { typedef CR HeapCrossRef; typedef H Heap; static HeapCrossRef *createHeapCrossRef(const Digraph &) { @@ -425,13 +424,13 @@ ///\ref named-templ-param "Named parameter" for setting heap and cross ///reference type. template <class H, class CR = typename Digraph::template NodeMap<int> > - struct DefHeap - : public Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > { - typedef Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > Create; + struct SetHeap + : public Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > { + typedef Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > Create; }; template <class H, class CR> - struct DefStandardHeapTraits : public Traits { + struct SetStandardHeapTraits : public Traits { typedef CR HeapCrossRef; typedef H Heap; static HeapCrossRef *createHeapCrossRef(const Digraph &G) { @@ -450,14 +449,14 @@ ///object if the cross reference's constructor waits for the digraph as ///parameter and the heap's constructor waits for the cross reference. template <class H, class CR = typename Digraph::template NodeMap<int> > - struct DefStandardHeap - : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > { - typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > + struct SetStandardHeap + : public Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> > { + typedef Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> > Create; }; template <class T> - struct DefOperationTraitsTraits : public Traits { + struct SetOperationTraitsTraits : public Traits { typedef T OperationTraits; }; @@ -467,9 +466,9 @@ ///\ref named-templ-param "Named parameter" for setting ///\ref OperationTraits type. template <class T> - struct DefOperationTraits - : public Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> > { - typedef Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> > + struct SetOperationTraits + : public Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> > { + typedef Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> > Create; }; @@ -1205,10 +1204,10 @@ } template<class T> - struct DefPredMapBase : public Base { + struct SetPredMapBase : public Base { typedef T PredMap; static PredMap *createPredMap(const Digraph &) { return 0; }; - DefPredMapBase(const TR &b) : TR(b) {} + SetPredMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref PredMap object. @@ -1216,17 +1215,17 @@ ///\ref named-templ-param "Named parameter" ///for setting \ref PredMap object. template<class T> - DijkstraWizard<DefPredMapBase<T> > predMap(const T &t) + DijkstraWizard<SetPredMapBase<T> > predMap(const T &t) { Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t)); - return DijkstraWizard<DefPredMapBase<T> >(*this); + return DijkstraWizard<SetPredMapBase<T> >(*this); } template<class T> - struct DefProcessedMapBase : public Base { + struct SetProcessedMapBase : public Base { typedef T ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &) { return 0; }; - DefProcessedMapBase(const TR &b) : TR(b) {} + SetProcessedMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref ProcessedMap object. @@ -1234,17 +1233,17 @@ /// \ref named-templ-param "Named parameter" ///for setting \ref ProcessedMap object. template<class T> - DijkstraWizard<DefProcessedMapBase<T> > processedMap(const T &t) + DijkstraWizard<SetProcessedMapBase<T> > processedMap(const T &t) { Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t)); - return DijkstraWizard<DefProcessedMapBase<T> >(*this); + return DijkstraWizard<SetProcessedMapBase<T> >(*this); } template<class T> - struct DefDistMapBase : public Base { + struct SetDistMapBase : public Base { typedef T DistMap; static DistMap *createDistMap(const Digraph &) { return 0; }; - DefDistMapBase(const TR &b) : TR(b) {} + SetDistMapBase(const TR &b) : TR(b) {} }; ///\brief \ref named-templ-param "Named parameter" ///for setting \ref DistMap object. @@ -1252,10 +1251,10 @@ ///\ref named-templ-param "Named parameter" ///for setting \ref DistMap object. template<class T> - DijkstraWizard<DefDistMapBase<T> > distMap(const T &t) + DijkstraWizard<SetDistMapBase<T> > distMap(const T &t) { Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t)); - return DijkstraWizard<DefDistMapBase<T> >(*this); + return DijkstraWizard<SetDistMapBase<T> >(*this); } }; diff -r 362415050b29 -r c691064dfd4f test/heap_test.cc --- a/test/heap_test.cc Wed Sep 10 11:23:41 2008 +0100 +++ b/test/heap_test.cc Thu Sep 11 11:10:44 2008 +0100 @@ -131,7 +131,7 @@ void dijkstraHeapTest(const Digraph& digraph, const IntArcMap& length, Node source) { - typename Dijkstra<Digraph, IntArcMap>::template DefStandardHeap<Heap>:: + typename Dijkstra<Digraph, IntArcMap>::template SetStandardHeap<Heap>:: Create dijkstra(digraph, length); dijkstra.run(source);