# HG changeset patch # User Peter Kovacs # Date 2009-09-25 12:24:16 # Node ID 11404088d1a5bd36fb75981791b24b097c696491 # Parent d8073df341f625e4a519b40e6903ac83539c2f73 Add creator functions for IdMap and RangeIdMap (#302) diff --git a/lemon/maps.h b/lemon/maps.h --- a/lemon/maps.h +++ b/lemon/maps.h @@ -1899,6 +1899,14 @@ InverseMap inverse() const { return InverseMap(*_graph);} }; + /// \brief Returns an \c IdMap class. + /// + /// This function just returns an \c IdMap class. + /// \relates IdMap + template + inline IdMap idMap(const GR& graph) { + return IdMap(graph); + } /// \brief General cross reference graph map type. @@ -2362,6 +2370,15 @@ } }; + /// \brief Returns a \c RangeIdMap class. + /// + /// This function just returns an \c RangeIdMap class. + /// \relates RangeIdMap + template + inline RangeIdMap rangeIdMap(const GR& graph) { + return RangeIdMap(graph); + } + /// \brief Dynamic iterable \c bool map. /// /// This class provides a special graph map type which can store a