diff --git a/lemon/preflow.h b/lemon/preflow.h --- a/lemon/preflow.h +++ b/lemon/preflow.h @@ -193,7 +193,7 @@ ///@{ template - struct DefFlowMapTraits : public Traits { + struct SetFlowMapTraits : public Traits { typedef _FlowMap FlowMap; static FlowMap *createFlowMap(const Digraph&) { LEMON_ASSERT(false, "FlowMap is not initialized"); @@ -207,14 +207,14 @@ /// \ref named-templ-param "Named parameter" for setting FlowMap /// type template - struct DefFlowMap - : public Preflow > { + struct SetFlowMap + : public Preflow > { typedef Preflow > Create; + SetFlowMapTraits<_FlowMap> > Create; }; template - struct DefElevatorTraits : public Traits { + struct SetElevatorTraits : public Traits { typedef _Elevator Elevator; static Elevator *createElevator(const Digraph&, int) { LEMON_ASSERT(false, "Elevator is not initialized"); @@ -228,14 +228,14 @@ /// \ref named-templ-param "Named parameter" for setting Elevator /// type template - struct DefElevator - : public Preflow > { + struct SetElevator + : public Preflow > { typedef Preflow > Create; + SetElevatorTraits<_Elevator> > Create; }; template - struct DefStandardElevatorTraits : public Traits { + struct SetStandardElevatorTraits : public Traits { typedef _Elevator Elevator; static Elevator *createElevator(const Digraph& digraph, int max_level) { return new Elevator(digraph, max_level); @@ -249,11 +249,11 @@ /// type. The Elevator should be standard constructor interface, ie. /// the digraph and the maximum level should be passed to it. template - struct DefStandardElevator + struct SetStandardElevator : public Preflow > { + SetStandardElevatorTraits<_Elevator> > { typedef Preflow > Create; + SetStandardElevatorTraits<_Elevator> > Create; }; /// @} diff --git a/test/preflow_test.cc b/test/preflow_test.cc --- a/test/preflow_test.cc +++ b/test/preflow_test.cc @@ -46,7 +46,7 @@ FlowMap flow; CutMap cut; - Preflow::DefFlowMap::Create preflow_test(g,cap,n,n); + Preflow::SetFlowMap::Create preflow_test(g,cap,n,n); preflow_test.capacityMap(cap); flow = preflow_test.flowMap();