Changeset 2287:16954ac69517 in lemon-0.x for lemon/graph_utils.h
- Timestamp:
- 10/31/06 15:56:13 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3052
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/graph_utils.h
r2286 r2287 1133 1133 /// 1134 1134 /// \see IterableValueMap 1135 #ifndef DOXYGEN1136 /// \param _Map A ReadWriteMap mapping from the item type to integer.1137 template <1138 typename _Graph, typename _Item, typename _Value,1139 typename _Map = DefaultMap<_Graph, _Item, _Value>1140 >1141 #else1142 1135 template <typename _Graph, typename _Item, typename _Value> 1143 #endif 1144 class InvertableMap : protected _Map { 1145 public: 1146 1147 /// The key type of InvertableMap (Node, Edge, UEdge). 1148 typedef typename _Map::Key Key; 1149 /// The value type of the InvertableMap. 1150 typedef typename _Map::Value Value; 1151 1136 class InvertableMap : protected DefaultMap<_Graph, _Item, _Value> { 1152 1137 private: 1153 1138 1154 typedef _MapMap;1139 typedef DefaultMap<_Graph, _Item, _Value> Map; 1155 1140 typedef _Graph Graph; 1156 1141 1157 typedef std::map< Value, Key> Container;1142 typedef std::map<_Value, _Item> Container; 1158 1143 Container invMap; 1159 1144 1160 1145 public: 1161 1146 1147 /// The key type of InvertableMap (Node, Edge, UEdge). 1148 typedef typename Map::Key Key; 1149 /// The value type of the InvertableMap. 1150 typedef typename Map::Value Value; 1151 1162 1152 1163 1153 … … 1339 1329 /// \param _Item The Item is the Key of the Map. It may be Node, Edge or 1340 1330 /// UEdge. 1341 #ifndef DOXYGEN1342 /// \param _Map A ReadWriteMap mapping from the item type to integer.1343 template <1344 typename _Graph, typename _Item,1345 typename _Map = DefaultMap<_Graph, _Item, int>1346 >1347 #else1348 1331 template <typename _Graph, typename _Item> 1349 #endif 1350 class DescriptorMap : protected _Map { 1332 class DescriptorMap : protected DefaultMap<_Graph, _Item, int> { 1351 1333 1352 1334 typedef _Item Item; 1353 typedef _MapMap;1335 typedef DefaultMap<_Graph, _Item, int> Map; 1354 1336 1355 1337 public: … … 1358 1340 1359 1341 /// The key type of DescriptorMap (Node, Edge, UEdge). 1360 typedef typename _Map::Key Key;1342 typedef typename Map::Key Key; 1361 1343 /// The value type of DescriptorMap. 1362 typedef typename _Map::Value Value;1344 typedef typename Map::Value Value; 1363 1345 1364 1346 /// \brief Constructor. … … 1373 1355 } 1374 1356 } 1375 1376 1357 1377 1358 protected:
Note: See TracChangeset
for help on using the changeset viewer.