1.1 --- a/lemon/dfs.h Wed Sep 10 11:23:41 2008 +0100
1.2 +++ b/lemon/dfs.h Thu Sep 11 11:10:44 2008 +0100
1.3 @@ -230,7 +230,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 @@ -243,12 +243,12 @@
1.13 ///\ref named-templ-param "Named parameter" for setting
1.14 ///\ref PredMap type.
1.15 template <class T>
1.16 - struct DefPredMap : public Dfs<Digraph, DefPredMapTraits<T> > {
1.17 - typedef Dfs<Digraph, DefPredMapTraits<T> > Create;
1.18 + struct SetPredMap : public Dfs<Digraph, SetPredMapTraits<T> > {
1.19 + typedef Dfs<Digraph, SetPredMapTraits<T> > Create;
1.20 };
1.21
1.22 template <class T>
1.23 - struct DefDistMapTraits : public Traits {
1.24 + struct SetDistMapTraits : public Traits {
1.25 typedef T DistMap;
1.26 static DistMap *createDistMap(const Digraph &)
1.27 {
1.28 @@ -261,12 +261,12 @@
1.29 ///\ref named-templ-param "Named parameter" for setting
1.30 ///\ref DistMap type.
1.31 template <class T>
1.32 - struct DefDistMap : public Dfs< Digraph, DefDistMapTraits<T> > {
1.33 - typedef Dfs<Digraph, DefDistMapTraits<T> > Create;
1.34 + struct SetDistMap : public Dfs< Digraph, SetDistMapTraits<T> > {
1.35 + typedef Dfs<Digraph, SetDistMapTraits<T> > Create;
1.36 };
1.37
1.38 template <class T>
1.39 - struct DefReachedMapTraits : public Traits {
1.40 + struct SetReachedMapTraits : public Traits {
1.41 typedef T ReachedMap;
1.42 static ReachedMap *createReachedMap(const Digraph &)
1.43 {
1.44 @@ -279,12 +279,12 @@
1.45 ///\ref named-templ-param "Named parameter" for setting
1.46 ///\ref ReachedMap type.
1.47 template <class T>
1.48 - struct DefReachedMap : public Dfs< Digraph, DefReachedMapTraits<T> > {
1.49 - typedef Dfs< Digraph, DefReachedMapTraits<T> > Create;
1.50 + struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits<T> > {
1.51 + typedef Dfs< Digraph, SetReachedMapTraits<T> > Create;
1.52 };
1.53
1.54 template <class T>
1.55 - struct DefProcessedMapTraits : public Traits {
1.56 + struct SetProcessedMapTraits : public Traits {
1.57 typedef T ProcessedMap;
1.58 static ProcessedMap *createProcessedMap(const Digraph &)
1.59 {
1.60 @@ -297,11 +297,11 @@
1.61 ///\ref named-templ-param "Named parameter" for setting
1.62 ///\ref ProcessedMap type.
1.63 template <class T>
1.64 - struct DefProcessedMap : public Dfs< Digraph, DefProcessedMapTraits<T> > {
1.65 - typedef Dfs< Digraph, DefProcessedMapTraits<T> > Create;
1.66 + struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits<T> > {
1.67 + typedef Dfs< Digraph, SetProcessedMapTraits<T> > Create;
1.68 };
1.69
1.70 - struct DefDigraphProcessedMapTraits : public Traits {
1.71 + struct SetStandardProcessedMapTraits : public Traits {
1.72 typedef typename Digraph::template NodeMap<bool> ProcessedMap;
1.73 static ProcessedMap *createProcessedMap(const Digraph &g)
1.74 {
1.75 @@ -314,10 +314,9 @@
1.76 ///\ref named-templ-param "Named parameter" for setting
1.77 ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
1.78 ///If you don't set it explicitly, it will be automatically allocated.
1.79 - template <class T>
1.80 - struct DefProcessedMapToBeDefaultMap :
1.81 - public Dfs< Digraph, DefDigraphProcessedMapTraits> {
1.82 - typedef Dfs< Digraph, DefDigraphProcessedMapTraits> Create;
1.83 + struct SetStandardProcessedMap :
1.84 + public Dfs< Digraph, SetStandardProcessedMapTraits > {
1.85 + typedef Dfs< Digraph, SetStandardProcessedMapTraits > Create;
1.86 };
1.87
1.88 ///@}
1.89 @@ -1000,10 +999,10 @@
1.90 }
1.91
1.92 template<class T>
1.93 - struct DefPredMapBase : public Base {
1.94 + struct SetPredMapBase : public Base {
1.95 typedef T PredMap;
1.96 static PredMap *createPredMap(const Digraph &) { return 0; };
1.97 - DefPredMapBase(const TR &b) : TR(b) {}
1.98 + SetPredMapBase(const TR &b) : TR(b) {}
1.99 };
1.100 ///\brief \ref named-templ-param "Named parameter"
1.101 ///for setting \ref PredMap object.
1.102 @@ -1011,17 +1010,17 @@
1.103 ///\ref named-templ-param "Named parameter"
1.104 ///for setting \ref PredMap object.
1.105 template<class T>
1.106 - DfsWizard<DefPredMapBase<T> > predMap(const T &t)
1.107 + DfsWizard<SetPredMapBase<T> > predMap(const T &t)
1.108 {
1.109 Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
1.110 - return DfsWizard<DefPredMapBase<T> >(*this);
1.111 + return DfsWizard<SetPredMapBase<T> >(*this);
1.112 }
1.113
1.114 template<class T>
1.115 - struct DefReachedMapBase : public Base {
1.116 + struct SetReachedMapBase : public Base {
1.117 typedef T ReachedMap;
1.118 static ReachedMap *createReachedMap(const Digraph &) { return 0; };
1.119 - DefReachedMapBase(const TR &b) : TR(b) {}
1.120 + SetReachedMapBase(const TR &b) : TR(b) {}
1.121 };
1.122 ///\brief \ref named-templ-param "Named parameter"
1.123 ///for setting \ref ReachedMap object.
1.124 @@ -1029,17 +1028,17 @@
1.125 /// \ref named-templ-param "Named parameter"
1.126 ///for setting \ref ReachedMap object.
1.127 template<class T>
1.128 - DfsWizard<DefReachedMapBase<T> > reachedMap(const T &t)
1.129 + DfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
1.130 {
1.131 Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
1.132 - return DfsWizard<DefReachedMapBase<T> >(*this);
1.133 + return DfsWizard<SetReachedMapBase<T> >(*this);
1.134 }
1.135
1.136 template<class T>
1.137 - struct DefProcessedMapBase : public Base {
1.138 + struct SetProcessedMapBase : public Base {
1.139 typedef T ProcessedMap;
1.140 static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
1.141 - DefProcessedMapBase(const TR &b) : TR(b) {}
1.142 + SetProcessedMapBase(const TR &b) : TR(b) {}
1.143 };
1.144 ///\brief \ref named-templ-param "Named parameter"
1.145 ///for setting \ref ProcessedMap object.
1.146 @@ -1047,17 +1046,17 @@
1.147 /// \ref named-templ-param "Named parameter"
1.148 ///for setting \ref ProcessedMap object.
1.149 template<class T>
1.150 - DfsWizard<DefProcessedMapBase<T> > processedMap(const T &t)
1.151 + DfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
1.152 {
1.153 Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
1.154 - return DfsWizard<DefProcessedMapBase<T> >(*this);
1.155 + return DfsWizard<SetProcessedMapBase<T> >(*this);
1.156 }
1.157
1.158 template<class T>
1.159 - struct DefDistMapBase : public Base {
1.160 + struct SetDistMapBase : public Base {
1.161 typedef T DistMap;
1.162 static DistMap *createDistMap(const Digraph &) { return 0; };
1.163 - DefDistMapBase(const TR &b) : TR(b) {}
1.164 + SetDistMapBase(const TR &b) : TR(b) {}
1.165 };
1.166 ///\brief \ref named-templ-param "Named parameter"
1.167 ///for setting \ref DistMap object.
1.168 @@ -1065,10 +1064,10 @@
1.169 ///\ref named-templ-param "Named parameter"
1.170 ///for setting \ref DistMap object.
1.171 template<class T>
1.172 - DfsWizard<DefDistMapBase<T> > distMap(const T &t)
1.173 + DfsWizard<SetDistMapBase<T> > distMap(const T &t)
1.174 {
1.175 Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
1.176 - return DfsWizard<DefDistMapBase<T> >(*this);
1.177 + return DfsWizard<SetDistMapBase<T> >(*this);
1.178 }
1.179
1.180 };
1.181 @@ -1301,7 +1300,7 @@
1.182
1.183 ///@{
1.184 template <class T>
1.185 - struct DefReachedMapTraits : public Traits {
1.186 + struct SetReachedMapTraits : public Traits {
1.187 typedef T ReachedMap;
1.188 static ReachedMap *createReachedMap(const Digraph &digraph) {
1.189 throw UninitializedParameter();
1.190 @@ -1312,9 +1311,9 @@
1.191 ///
1.192 /// \ref named-templ-param "Named parameter" for setting ReachedMap type.
1.193 template <class T>
1.194 - struct DefReachedMap : public DfsVisit< Digraph, Visitor,
1.195 - DefReachedMapTraits<T> > {
1.196 - typedef DfsVisit< Digraph, Visitor, DefReachedMapTraits<T> > Create;
1.197 + struct SetReachedMap : public DfsVisit< Digraph, Visitor,
1.198 + SetReachedMapTraits<T> > {
1.199 + typedef DfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create;
1.200 };
1.201 ///@}
1.202