# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1253874256 -7200
# Node ID 11404088d1a5bd36fb75981791b24b097c696491
# Parent  d8073df341f625e4a519b40e6903ac83539c2f73
Add creator functions for IdMap and RangeIdMap (#302)

diff -r d8073df341f6 -r 11404088d1a5 lemon/maps.h
--- a/lemon/maps.h	Fri Sep 25 12:22:42 2009 +0200
+++ b/lemon/maps.h	Fri Sep 25 12:24:16 2009 +0200
@@ -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 <typename K, typename GR>
+  inline IdMap<GR, K> idMap(const GR& graph) {
+    return IdMap<GR, K>(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 <typename K, typename GR>
+  inline RangeIdMap<GR, K> rangeIdMap(const GR& graph) {
+    return RangeIdMap<GR, K>(graph);
+  }
+  
   /// \brief Dynamic iterable \c bool map.
   ///
   /// This class provides a special graph map type which can store a