191 ///\name Named template parameters |
191 ///\name Named template parameters |
192 |
192 |
193 ///@{ |
193 ///@{ |
194 |
194 |
195 template <typename _FlowMap> |
195 template <typename _FlowMap> |
196 struct DefFlowMapTraits : public Traits { |
196 struct SetFlowMapTraits : public Traits { |
197 typedef _FlowMap FlowMap; |
197 typedef _FlowMap FlowMap; |
198 static FlowMap *createFlowMap(const Digraph&) { |
198 static FlowMap *createFlowMap(const Digraph&) { |
199 LEMON_ASSERT(false, "FlowMap is not initialized"); |
199 LEMON_ASSERT(false, "FlowMap is not initialized"); |
200 return 0; // ignore warnings |
200 return 0; // ignore warnings |
201 } |
201 } |
205 /// FlowMap type |
205 /// FlowMap type |
206 /// |
206 /// |
207 /// \ref named-templ-param "Named parameter" for setting FlowMap |
207 /// \ref named-templ-param "Named parameter" for setting FlowMap |
208 /// type |
208 /// type |
209 template <typename _FlowMap> |
209 template <typename _FlowMap> |
210 struct DefFlowMap |
210 struct SetFlowMap |
211 : public Preflow<Digraph, CapacityMap, DefFlowMapTraits<_FlowMap> > { |
211 : public Preflow<Digraph, CapacityMap, SetFlowMapTraits<_FlowMap> > { |
212 typedef Preflow<Digraph, CapacityMap, |
212 typedef Preflow<Digraph, CapacityMap, |
213 DefFlowMapTraits<_FlowMap> > Create; |
213 SetFlowMapTraits<_FlowMap> > Create; |
214 }; |
214 }; |
215 |
215 |
216 template <typename _Elevator> |
216 template <typename _Elevator> |
217 struct DefElevatorTraits : public Traits { |
217 struct SetElevatorTraits : public Traits { |
218 typedef _Elevator Elevator; |
218 typedef _Elevator Elevator; |
219 static Elevator *createElevator(const Digraph&, int) { |
219 static Elevator *createElevator(const Digraph&, int) { |
220 LEMON_ASSERT(false, "Elevator is not initialized"); |
220 LEMON_ASSERT(false, "Elevator is not initialized"); |
221 return 0; // ignore warnings |
221 return 0; // ignore warnings |
222 } |
222 } |
226 /// Elevator type |
226 /// Elevator type |
227 /// |
227 /// |
228 /// \ref named-templ-param "Named parameter" for setting Elevator |
228 /// \ref named-templ-param "Named parameter" for setting Elevator |
229 /// type |
229 /// type |
230 template <typename _Elevator> |
230 template <typename _Elevator> |
231 struct DefElevator |
231 struct SetElevator |
232 : public Preflow<Digraph, CapacityMap, DefElevatorTraits<_Elevator> > { |
232 : public Preflow<Digraph, CapacityMap, SetElevatorTraits<_Elevator> > { |
233 typedef Preflow<Digraph, CapacityMap, |
233 typedef Preflow<Digraph, CapacityMap, |
234 DefElevatorTraits<_Elevator> > Create; |
234 SetElevatorTraits<_Elevator> > Create; |
235 }; |
235 }; |
236 |
236 |
237 template <typename _Elevator> |
237 template <typename _Elevator> |
238 struct DefStandardElevatorTraits : public Traits { |
238 struct SetStandardElevatorTraits : public Traits { |
239 typedef _Elevator Elevator; |
239 typedef _Elevator Elevator; |
240 static Elevator *createElevator(const Digraph& digraph, int max_level) { |
240 static Elevator *createElevator(const Digraph& digraph, int max_level) { |
241 return new Elevator(digraph, max_level); |
241 return new Elevator(digraph, max_level); |
242 } |
242 } |
243 }; |
243 }; |
247 /// |
247 /// |
248 /// \ref named-templ-param "Named parameter" for setting Elevator |
248 /// \ref named-templ-param "Named parameter" for setting Elevator |
249 /// type. The Elevator should be standard constructor interface, ie. |
249 /// type. The Elevator should be standard constructor interface, ie. |
250 /// the digraph and the maximum level should be passed to it. |
250 /// the digraph and the maximum level should be passed to it. |
251 template <typename _Elevator> |
251 template <typename _Elevator> |
252 struct DefStandardElevator |
252 struct SetStandardElevator |
253 : public Preflow<Digraph, CapacityMap, |
253 : public Preflow<Digraph, CapacityMap, |
254 DefStandardElevatorTraits<_Elevator> > { |
254 SetStandardElevatorTraits<_Elevator> > { |
255 typedef Preflow<Digraph, CapacityMap, |
255 typedef Preflow<Digraph, CapacityMap, |
256 DefStandardElevatorTraits<_Elevator> > Create; |
256 SetStandardElevatorTraits<_Elevator> > Create; |
257 }; |
257 }; |
258 |
258 |
259 /// @} |
259 /// @} |
260 |
260 |
261 protected: |
261 protected: |