# HG changeset patch # User Peter Kovacs # Date 2009-01-09 12:43:52 # Node ID 14bb8812b8af4e5ce16161ed64dd1f9497d83014 # Parent 91fcb8ed4cdc8b96ec6d1881d6f8125dc904c756 Add creator functions for Residual and Residual::ResidualCapacity (#67) diff --git a/lemon/adaptors.h b/lemon/adaptors.h --- a/lemon/adaptors.h +++ b/lemon/adaptors.h @@ -2656,8 +2656,30 @@ }; + /// \brief Returns a residual capacity map + /// + /// This function just returns a residual capacity map. + ResidualCapacity residualCapacity() const { + return ResidualCapacity(*this); + } + }; + /// \brief Returns a (read-only) Residual adaptor + /// + /// This function just returns a (read-only) \ref Residual adaptor. + /// \ingroup graph_adaptors + /// \relates Residual + template + Residual + residual(const Digraph& digraph, + const CapacityMap& capacity, + FlowMap& flow) + { + return Residual (digraph, capacity, flow); + } + + template class SplitNodesBase { public: