[Lemon-commits] Peter Kovacs: Add creator functions for IdMap an...

Lemon HG hg at lemon.cs.elte.hu
Sat Sep 26 07:12:01 CEST 2009


details:   http://lemon.cs.elte.hu/hg/lemon/rev/11404088d1a5
changeset: 778:11404088d1a5
user:      Peter Kovacs <kpeter [at] inf.elte.hu>
date:      Fri Sep 25 12:24:16 2009 +0200
description:
	Add creator functions for IdMap and RangeIdMap (#302)

diffstat:

 lemon/maps.h |  17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diffs (34 lines):

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 <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



More information about the Lemon-commits mailing list