Changeset 627:2313edd0db0b in lemon for lemon/concepts/graph_components.h
- Timestamp:
- 04/14/09 10:34:12 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/graph_components.h
r626 r627 989 989 /// the \c NodeMap, \c ArcMap and \c EdgeMap subtypes of digraph and 990 990 /// graph types, which can be used for associating data to graph items. 991 /// The standard graph maps must conform to the ReferenceMap concept. 991 992 template <typename GR, typename K, typename V> 992 class GraphMap : public Re adWriteMap<K, V> {993 class GraphMap : public ReferenceMap<K, V, V&, const V&> { 993 994 public: 994 995 … … 1001 1002 /// The value type of the map. 1002 1003 typedef V Value; 1004 /// The reference type of the map. 1005 typedef Value& Reference; 1006 /// The const reference type of the map. 1007 typedef const Value& ConstReference; 1008 1009 // The reference map tag. 1010 typedef True ReferenceMapTag; 1003 1011 1004 1012 /// \brief Construct a new map. … … 1032 1040 struct Constraints { 1033 1041 void constraints() { 1034 checkConcept<ReadWriteMap<Key, Value>, _Map >(); 1042 checkConcept 1043 <ReferenceMap<Key, Value, Value&, const Value&>, _Map>(); 1035 1044 _Map m1(g); 1036 1045 _Map m2(g,t); … … 1074 1083 /// 1075 1084 /// Standard graph map for the nodes. 1085 /// It conforms to the ReferenceMap concept. 1076 1086 template <typename V> 1077 1087 class NodeMap : public GraphMap<MappableDigraphComponent, Node, V> { … … 1111 1121 /// 1112 1122 /// Standard graph map for the arcs. 1123 /// It conforms to the ReferenceMap concept. 1113 1124 template <typename V> 1114 1125 class ArcMap : public GraphMap<MappableDigraphComponent, Arc, V> { … … 1208 1219 /// 1209 1220 /// Standard graph map for the edges. 1221 /// It conforms to the ReferenceMap concept. 1210 1222 template <typename V> 1211 1223 class EdgeMap : public GraphMap<MappableGraphComponent, Edge, V> {
Note: See TracChangeset
for help on using the changeset viewer.