1.1 --- a/lemon/dijkstra.h Wed Sep 10 11:23:41 2008 +0100
1.2 +++ b/lemon/dijkstra.h Thu Sep 11 11:10:44 2008 +0100
1.3 @@ -331,7 +331,7 @@
1.4 ///@{
1.5
1.6 template <class T>
1.7 - struct DefPredMapTraits : public Traits {
1.8 + struct SetPredMapTraits : public Traits {
1.9 typedef T PredMap;
1.10 static PredMap *createPredMap(const Digraph &)
1.11 {
1.12 @@ -344,13 +344,13 @@
1.13 ///\ref named-templ-param "Named parameter" for setting
1.14 ///\ref PredMap type.
1.15 template <class T>
1.16 - struct DefPredMap
1.17 - : public Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > {
1.18 - typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > Create;
1.19 + struct SetPredMap
1.20 + : public Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > {
1.21 + typedef Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > Create;
1.22 };
1.23
1.24 template <class T>
1.25 - struct DefDistMapTraits : public Traits {
1.26 + struct SetDistMapTraits : public Traits {
1.27 typedef T DistMap;
1.28 static DistMap *createDistMap(const Digraph &)
1.29 {
1.30 @@ -363,13 +363,13 @@
1.31 ///\ref named-templ-param "Named parameter" for setting
1.32 ///\ref DistMap type.
1.33 template <class T>
1.34 - struct DefDistMap
1.35 - : public Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > {
1.36 - typedef Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > Create;
1.37 + struct SetDistMap
1.38 + : public Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > {
1.39 + typedef Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > Create;
1.40 };
1.41
1.42 template <class T>
1.43 - struct DefProcessedMapTraits : public Traits {
1.44 + struct SetProcessedMapTraits : public Traits {
1.45 typedef T ProcessedMap;
1.46 static ProcessedMap *createProcessedMap(const Digraph &)
1.47 {
1.48 @@ -382,12 +382,12 @@
1.49 ///\ref named-templ-param "Named parameter" for setting
1.50 ///\ref ProcessedMap type.
1.51 template <class T>
1.52 - struct DefProcessedMap
1.53 - : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > {
1.54 - typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > Create;
1.55 + struct SetProcessedMap
1.56 + : public Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > {
1.57 + typedef Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > Create;
1.58 };
1.59
1.60 - struct DefDigraphProcessedMapTraits : public Traits {
1.61 + struct SetStandardProcessedMapTraits : public Traits {
1.62 typedef typename Digraph::template NodeMap<bool> ProcessedMap;
1.63 static ProcessedMap *createProcessedMap(const Digraph &g)
1.64 {
1.65 @@ -400,15 +400,14 @@
1.66 ///\ref named-templ-param "Named parameter" for setting
1.67 ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
1.68 ///If you don't set it explicitly, it will be automatically allocated.
1.69 - template <class T>
1.70 - struct DefProcessedMapToBeDefaultMap
1.71 - : public Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> {
1.72 - typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits>
1.73 + struct SetStandardProcessedMap
1.74 + : public Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits > {
1.75 + typedef Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits >
1.76 Create;
1.77 };
1.78
1.79 template <class H, class CR>
1.80 - struct DefHeapTraits : public Traits {
1.81 + struct SetHeapTraits : public Traits {
1.82 typedef CR HeapCrossRef;
1.83 typedef H Heap;
1.84 static HeapCrossRef *createHeapCrossRef(const Digraph &) {
1.85 @@ -425,13 +424,13 @@
1.86 ///\ref named-templ-param "Named parameter" for setting heap and cross
1.87 ///reference type.
1.88 template <class H, class CR = typename Digraph::template NodeMap<int> >
1.89 - struct DefHeap
1.90 - : public Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > {
1.91 - typedef Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > Create;
1.92 + struct SetHeap
1.93 + : public Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > {
1.94 + typedef Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > Create;
1.95 };
1.96
1.97 template <class H, class CR>
1.98 - struct DefStandardHeapTraits : public Traits {
1.99 + struct SetStandardHeapTraits : public Traits {
1.100 typedef CR HeapCrossRef;
1.101 typedef H Heap;
1.102 static HeapCrossRef *createHeapCrossRef(const Digraph &G) {
1.103 @@ -450,14 +449,14 @@
1.104 ///object if the cross reference's constructor waits for the digraph as
1.105 ///parameter and the heap's constructor waits for the cross reference.
1.106 template <class H, class CR = typename Digraph::template NodeMap<int> >
1.107 - struct DefStandardHeap
1.108 - : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > {
1.109 - typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> >
1.110 + struct SetStandardHeap
1.111 + : public Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> > {
1.112 + typedef Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> >
1.113 Create;
1.114 };
1.115
1.116 template <class T>
1.117 - struct DefOperationTraitsTraits : public Traits {
1.118 + struct SetOperationTraitsTraits : public Traits {
1.119 typedef T OperationTraits;
1.120 };
1.121
1.122 @@ -467,9 +466,9 @@
1.123 ///\ref named-templ-param "Named parameter" for setting
1.124 ///\ref OperationTraits type.
1.125 template <class T>
1.126 - struct DefOperationTraits
1.127 - : public Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> > {
1.128 - typedef Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> >
1.129 + struct SetOperationTraits
1.130 + : public Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> > {
1.131 + typedef Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> >
1.132 Create;
1.133 };
1.134
1.135 @@ -1205,10 +1204,10 @@
1.136 }
1.137
1.138 template<class T>
1.139 - struct DefPredMapBase : public Base {
1.140 + struct SetPredMapBase : public Base {
1.141 typedef T PredMap;
1.142 static PredMap *createPredMap(const Digraph &) { return 0; };
1.143 - DefPredMapBase(const TR &b) : TR(b) {}
1.144 + SetPredMapBase(const TR &b) : TR(b) {}
1.145 };
1.146 ///\brief \ref named-templ-param "Named parameter"
1.147 ///for setting \ref PredMap object.
1.148 @@ -1216,17 +1215,17 @@
1.149 ///\ref named-templ-param "Named parameter"
1.150 ///for setting \ref PredMap object.
1.151 template<class T>
1.152 - DijkstraWizard<DefPredMapBase<T> > predMap(const T &t)
1.153 + DijkstraWizard<SetPredMapBase<T> > predMap(const T &t)
1.154 {
1.155 Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
1.156 - return DijkstraWizard<DefPredMapBase<T> >(*this);
1.157 + return DijkstraWizard<SetPredMapBase<T> >(*this);
1.158 }
1.159
1.160 template<class T>
1.161 - struct DefProcessedMapBase : public Base {
1.162 + struct SetProcessedMapBase : public Base {
1.163 typedef T ProcessedMap;
1.164 static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
1.165 - DefProcessedMapBase(const TR &b) : TR(b) {}
1.166 + SetProcessedMapBase(const TR &b) : TR(b) {}
1.167 };
1.168 ///\brief \ref named-templ-param "Named parameter"
1.169 ///for setting \ref ProcessedMap object.
1.170 @@ -1234,17 +1233,17 @@
1.171 /// \ref named-templ-param "Named parameter"
1.172 ///for setting \ref ProcessedMap object.
1.173 template<class T>
1.174 - DijkstraWizard<DefProcessedMapBase<T> > processedMap(const T &t)
1.175 + DijkstraWizard<SetProcessedMapBase<T> > processedMap(const T &t)
1.176 {
1.177 Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
1.178 - return DijkstraWizard<DefProcessedMapBase<T> >(*this);
1.179 + return DijkstraWizard<SetProcessedMapBase<T> >(*this);
1.180 }
1.181
1.182 template<class T>
1.183 - struct DefDistMapBase : public Base {
1.184 + struct SetDistMapBase : public Base {
1.185 typedef T DistMap;
1.186 static DistMap *createDistMap(const Digraph &) { return 0; };
1.187 - DefDistMapBase(const TR &b) : TR(b) {}
1.188 + SetDistMapBase(const TR &b) : TR(b) {}
1.189 };
1.190 ///\brief \ref named-templ-param "Named parameter"
1.191 ///for setting \ref DistMap object.
1.192 @@ -1252,10 +1251,10 @@
1.193 ///\ref named-templ-param "Named parameter"
1.194 ///for setting \ref DistMap object.
1.195 template<class T>
1.196 - DijkstraWizard<DefDistMapBase<T> > distMap(const T &t)
1.197 + DijkstraWizard<SetDistMapBase<T> > distMap(const T &t)
1.198 {
1.199 Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
1.200 - return DijkstraWizard<DefDistMapBase<T> >(*this);
1.201 + return DijkstraWizard<SetDistMapBase<T> >(*this);
1.202 }
1.203
1.204 };