Add creator functions for Residual and Residual::ResidualCapacity (#67)
authorPeter Kovacs <kpeter@inf.elte.hu>
Fri, 09 Jan 2009 12:43:52 +0100
changeset 47314bb8812b8af
parent 472 91fcb8ed4cdc
child 474 fbd6e04acf44
Add creator functions for Residual and Residual::ResidualCapacity (#67)
lemon/adaptors.h
     1.1 --- a/lemon/adaptors.h	Fri Dec 12 22:59:17 2008 +0100
     1.2 +++ b/lemon/adaptors.h	Fri Jan 09 12:43:52 2009 +0100
     1.3 @@ -2656,8 +2656,30 @@
     1.4  
     1.5      };
     1.6  
     1.7 +    /// \brief Returns a residual capacity map
     1.8 +    ///
     1.9 +    /// This function just returns a residual capacity map.
    1.10 +    ResidualCapacity residualCapacity() const {
    1.11 +      return ResidualCapacity(*this);
    1.12 +    }
    1.13 +
    1.14    };
    1.15  
    1.16 +  /// \brief Returns a (read-only) Residual adaptor
    1.17 +  ///
    1.18 +  /// This function just returns a (read-only) \ref Residual adaptor.
    1.19 +  /// \ingroup graph_adaptors
    1.20 +  /// \relates Residual
    1.21 +  template<typename Digraph, typename CapacityMap, typename FlowMap>
    1.22 +  Residual<Digraph, CapacityMap, FlowMap>
    1.23 +  residual(const Digraph& digraph,
    1.24 +           const CapacityMap& capacity,
    1.25 +           FlowMap& flow)
    1.26 +  {
    1.27 +    return Residual<Digraph, CapacityMap, FlowMap> (digraph, capacity, flow);
    1.28 +  }
    1.29 +
    1.30 +
    1.31    template <typename _Digraph>
    1.32    class SplitNodesBase {
    1.33    public: