lemon/circulation.h
changeset 416 26fd85a3087e
parent 414 5a7dbeaed70e
child 417 235be9d4b6ab
equal deleted inserted replaced
0:406d80b0b35f 1:88dc2922b202
   167     ///\name Named template parameters
   167     ///\name Named template parameters
   168 
   168 
   169     ///@{
   169     ///@{
   170 
   170 
   171     template <typename _FlowMap>
   171     template <typename _FlowMap>
   172     struct DefFlowMapTraits : public Traits {
   172     struct SetFlowMapTraits : public Traits {
   173       typedef _FlowMap FlowMap;
   173       typedef _FlowMap FlowMap;
   174       static FlowMap *createFlowMap(const Digraph&) {
   174       static FlowMap *createFlowMap(const Digraph&) {
   175         LEMON_ASSERT(false, "FlowMap is not initialized");
   175         LEMON_ASSERT(false, "FlowMap is not initialized");
   176         return 0; // ignore warnings
   176         return 0; // ignore warnings
   177       }
   177       }
   181     /// FlowMap type
   181     /// FlowMap type
   182     ///
   182     ///
   183     /// \ref named-templ-param "Named parameter" for setting FlowMap
   183     /// \ref named-templ-param "Named parameter" for setting FlowMap
   184     /// type
   184     /// type
   185     template <typename _FlowMap>
   185     template <typename _FlowMap>
   186     struct DefFlowMap
   186     struct SetFlowMap
   187       : public Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   187       : public Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   188                            DefFlowMapTraits<_FlowMap> > {
   188                            SetFlowMapTraits<_FlowMap> > {
   189       typedef Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   189       typedef Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   190                           DefFlowMapTraits<_FlowMap> > Create;
   190                           SetFlowMapTraits<_FlowMap> > Create;
   191     };
   191     };
   192 
   192 
   193     template <typename _Elevator>
   193     template <typename _Elevator>
   194     struct DefElevatorTraits : public Traits {
   194     struct SetElevatorTraits : public Traits {
   195       typedef _Elevator Elevator;
   195       typedef _Elevator Elevator;
   196       static Elevator *createElevator(const Digraph&, int) {
   196       static Elevator *createElevator(const Digraph&, int) {
   197         LEMON_ASSERT(false, "Elevator is not initialized");
   197         LEMON_ASSERT(false, "Elevator is not initialized");
   198         return 0; // ignore warnings
   198         return 0; // ignore warnings
   199       }
   199       }
   203     /// Elevator type
   203     /// Elevator type
   204     ///
   204     ///
   205     /// \ref named-templ-param "Named parameter" for setting Elevator
   205     /// \ref named-templ-param "Named parameter" for setting Elevator
   206     /// type
   206     /// type
   207     template <typename _Elevator>
   207     template <typename _Elevator>
   208     struct DefElevator
   208     struct SetElevator
   209       : public Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   209       : public Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   210                            DefElevatorTraits<_Elevator> > {
   210                            SetElevatorTraits<_Elevator> > {
   211       typedef Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   211       typedef Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   212                           DefElevatorTraits<_Elevator> > Create;
   212                           SetElevatorTraits<_Elevator> > Create;
   213     };
   213     };
   214 
   214 
   215     template <typename _Elevator>
   215     template <typename _Elevator>
   216     struct DefStandardElevatorTraits : public Traits {
   216     struct SetStandardElevatorTraits : public Traits {
   217       typedef _Elevator Elevator;
   217       typedef _Elevator Elevator;
   218       static Elevator *createElevator(const Digraph& digraph, int max_level) {
   218       static Elevator *createElevator(const Digraph& digraph, int max_level) {
   219         return new Elevator(digraph, max_level);
   219         return new Elevator(digraph, max_level);
   220       }
   220       }
   221     };
   221     };
   225     ///
   225     ///
   226     /// \ref named-templ-param "Named parameter" for setting Elevator
   226     /// \ref named-templ-param "Named parameter" for setting Elevator
   227     /// type. The Elevator should be standard constructor interface, ie.
   227     /// type. The Elevator should be standard constructor interface, ie.
   228     /// the digraph and the maximum level should be passed to it.
   228     /// the digraph and the maximum level should be passed to it.
   229     template <typename _Elevator>
   229     template <typename _Elevator>
   230     struct DefStandardElevator
   230     struct SetStandardElevator
   231       : public Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   231       : public Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   232                        DefStandardElevatorTraits<_Elevator> > {
   232                        SetStandardElevatorTraits<_Elevator> > {
   233       typedef Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   233       typedef Circulation<Digraph, LCapMap, UCapMap, DeltaMap,
   234                       DefStandardElevatorTraits<_Elevator> > Create;
   234                       SetStandardElevatorTraits<_Elevator> > Create;
   235     };
   235     };
   236 
   236 
   237     /// @}
   237     /// @}
   238 
   238 
   239   protected:
   239   protected: