1.1 --- a/ChangeLog Sat Nov 13 12:53:28 2004 +0000
1.2 +++ b/ChangeLog Sat Nov 13 17:07:10 2004 +0000
1.3 @@ -1,3 +1,9 @@
1.4 + * ValueType -> Value, KeyType -> Key, ReferenceType ->Reference,
1.5 + PointerType -> Pointer
1.6 + * target() -> target(), source() -> source()
1.7 + * Graph factory
1.8 + * Right include paths in documentation
1.9 +
1.10 2004-09-30 Alpar Juttner <alpar@cs.elte.hu>
1.11
1.12 * Version 0.2 released
2.1 --- a/doc/maps.dox Sat Nov 13 12:53:28 2004 +0000
2.2 +++ b/doc/maps.dox Sat Nov 13 17:07:10 2004 +0000
2.3 @@ -9,8 +9,8 @@
2.4 <tt>typedef</tt>'s to determine the types of keys and values, like this:
2.5
2.6 \code
2.7 - typedef Edge KeyType;
2.8 - typedef double ValueType;
2.9 + typedef Edge Key;
2.10 + typedef double Value;
2.11 \endcode
2.12
2.13 A map can \e readable (ReadMap, for short), \e writable (WriteMap) or both
2.14 @@ -52,7 +52,7 @@
2.15 length[e]=3.5;
2.16 \endcode
2.17 - <em>Writable maps</em> have
2.18 -a member function \c set(KeyType,const ValueType &)
2.19 +a member function \c set(Key,const Value &)
2.20 for this purpose.
2.21 \code
2.22 length.set(e,3.5);
2.23 @@ -82,9 +82,9 @@
2.24 \code
2.25 struct MyMap
2.26 {
2.27 - typedef double ValueType;
2.28 - typedef Graph::Edge KeyType;
2.29 - double operator[](KeyType e) const { return M_PI;}
2.30 + typedef double Value;
2.31 + typedef Graph::Edge Key;
2.32 + double operator[](Key e) const { return M_PI;}
2.33 };
2.34 \endcode
2.35
2.36 @@ -95,7 +95,7 @@
2.37 \code
2.38 struct MyMap : public MapBase<Graph::Edge,double>
2.39 {
2.40 - ValueType operator[](KeyType e) const { return M_PI;}
2.41 + Value operator[](Key e) const { return M_PI;}
2.42 };
2.43 \endcode
2.44
2.45 @@ -111,7 +111,7 @@
2.46 const Graph::NodeMap<double> &pot;
2.47
2.48 public:
2.49 - ValueType operator[](KeyType e) const {
2.50 + Value operator[](Key e) const {
2.51 return orig_len.get(e)-pot.get(G.target(e))-pot.get(G.source(e));
2.52 }
2.53
3.1 --- a/src/lemon/array_map.h Sat Nov 13 12:53:28 2004 +0000
3.2 +++ b/src/lemon/array_map.h Sat Nov 13 17:07:10 2004 +0000
3.3 @@ -38,7 +38,7 @@
3.4 * the container functionality.
3.5 *
3.6 * The template parameter is the MapRegistry that the maps
3.7 - * will belong to and the ValueType.
3.8 + * will belong to and the Value.
3.9 */
3.10
3.11 template <typename _Graph,
3.12 @@ -52,7 +52,7 @@
3.13 /// The graph type of the maps.
3.14 typedef _Graph Graph;
3.15 /// The key type of the maps.
3.16 - typedef _Item KeyType;
3.17 + typedef _Item Key;
3.18
3.19 typedef AlterationObserverRegistry<_Item> Registry;
3.20
3.21 @@ -60,8 +60,6 @@
3.22 /// The iterator to iterate on the keys.
3.23 typedef _ItemIt KeyIt;
3.24
3.25 - typedef _Value Value;
3.26 -
3.27 /// The MapBase of the Map which imlements the core regisitry function.
3.28 typedef typename Registry::ObserverBase Parent;
3.29
3.30 @@ -69,18 +67,18 @@
3.31 public:
3.32
3.33 /// The value type of the map.
3.34 - typedef Value ValueType;
3.35 + typedef _Value Value;
3.36 /// The reference type of the map;
3.37 - typedef Value& ReferenceType;
3.38 + typedef Value& Reference;
3.39 /// The pointer type of the map;
3.40 - typedef Value* PointerType;
3.41 + typedef Value* Pointer;
3.42
3.43 /// The const value type of the map.
3.44 - typedef const Value ConstValueType;
3.45 + typedef const Value ConstValue;
3.46 /// The const reference type of the map;
3.47 - typedef const Value& ConstReferenceType;
3.48 + typedef const Value& ConstReference;
3.49 /// The pointer type of the map;
3.50 - typedef const Value* ConstPointerType;
3.51 + typedef const Value* ConstPointer;
3.52
3.53
3.54 private:
3.55 @@ -172,7 +170,7 @@
3.56 * The subscript operator. The map can be subscripted by the
3.57 * actual keys of the graph.
3.58 */
3.59 - ReferenceType operator[](const KeyType& key) {
3.60 + Reference operator[](const Key& key) {
3.61 int id = graph->id(key);
3.62 return values[id];
3.63 }
3.64 @@ -181,7 +179,7 @@
3.65 * The const subscript operator. The map can be subscripted by the
3.66 * actual keys of the graph.
3.67 */
3.68 - ConstReferenceType operator[](const KeyType& key) const {
3.69 + ConstReference operator[](const Key& key) const {
3.70 int id = graph->id(key);
3.71 return values[id];
3.72 }
3.73 @@ -189,13 +187,13 @@
3.74 /** Setter function of the map. Equivalent with map[key] = val.
3.75 * This is a compatibility feature with the not dereferable maps.
3.76 */
3.77 - void set(const KeyType& key, const ValueType& val) {
3.78 + void set(const Key& key, const Value& val) {
3.79 (*this)[key] = val;
3.80 }
3.81
3.82 /** Add a new key to the map. It called by the map registry.
3.83 */
3.84 - void add(const KeyType& key) {
3.85 + void add(const Key& key) {
3.86 int id = graph->id(key);
3.87 if (id >= capacity) {
3.88 int new_capacity = (capacity == 0 ? 1 : capacity);
3.89 @@ -219,7 +217,7 @@
3.90
3.91 /** Erase a key from the map. It called by the map registry.
3.92 */
3.93 - void erase(const KeyType& key) {
3.94 + void erase(const Key& key) {
3.95 int id = graph->id(key);
3.96 allocator.destroy(&(values[id]));
3.97 }
3.98 @@ -321,13 +319,13 @@
3.99 // // STL compatibility typedefs.
3.100 // typedef Iterator iterator;
3.101 // typedef ConstIterator const_iterator;
3.102 -// typedef typename Iterator::PairValueType value_type;
3.103 -// typedef typename Iterator::KeyType key_type;
3.104 -// typedef typename Iterator::ValueType data_type;
3.105 -// typedef typename Iterator::PairReferenceType reference;
3.106 -// typedef typename Iterator::PairPointerType pointer;
3.107 -// typedef typename ConstIterator::PairReferenceType const_reference;
3.108 -// typedef typename ConstIterator::PairPointerType const_pointer;
3.109 +// typedef typename Iterator::PairValue value_type;
3.110 +// typedef typename Iterator::Key key_type;
3.111 +// typedef typename Iterator::Value data_type;
3.112 +// typedef typename Iterator::PairReference reference;
3.113 +// typedef typename Iterator::PairPointer pointer;
3.114 +// typedef typename ConstIterator::PairReference const_reference;
3.115 +// typedef typename ConstIterator::PairPointer const_pointer;
3.116 // typedef int difference_type;
3.117 };
3.118
4.1 --- a/src/lemon/concept/graph.h Sat Nov 13 12:53:28 2004 +0000
4.2 +++ b/src/lemon/concept/graph.h Sat Nov 13 17:07:10 2004 +0000
4.3 @@ -567,9 +567,9 @@
4.4 // em=cm; //Copy to more complex type
4.5 // {
4.6 // //Check the typedef's
4.7 -// typename Graph::template NodeMap<int>::ValueType val;
4.8 +// typename Graph::template NodeMap<int>::Value val;
4.9 // val=1;
4.10 -// typename Graph::template NodeMap<int>::KeyType key;
4.11 +// typename Graph::template NodeMap<int>::Key key;
4.12 // key = typename Graph::NodeIt(G);
4.13 // }
4.14 // }
4.15 @@ -591,9 +591,9 @@
4.16
4.17 // {
4.18 // //Check the typedef's
4.19 -// typename Graph::template NodeMap<bool>::ValueType val;
4.20 +// typename Graph::template NodeMap<bool>::Value val;
4.21 // val=true;
4.22 -// typename Graph::template NodeMap<bool>::KeyType key;
4.23 +// typename Graph::template NodeMap<bool>::Key key;
4.24 // key= typename Graph::NodeIt(G);
4.25 // }
4.26 // }
4.27 @@ -614,9 +614,9 @@
4.28 // dm=cm; //Copy from another type
4.29 // {
4.30 // //Check the typedef's
4.31 -// typename Graph::template EdgeMap<int>::ValueType val;
4.32 +// typename Graph::template EdgeMap<int>::Value val;
4.33 // val=1;
4.34 -// typename Graph::template EdgeMap<int>::KeyType key;
4.35 +// typename Graph::template EdgeMap<int>::Key key;
4.36 // key= typename Graph::EdgeIt(G);
4.37 // }
4.38 // }
4.39 @@ -637,9 +637,9 @@
4.40 // m=dm; //Copy to another type
4.41 // {
4.42 // //Check the typedef's
4.43 -// typename Graph::template EdgeMap<bool>::ValueType val;
4.44 +// typename Graph::template EdgeMap<bool>::Value val;
4.45 // val=true;
4.46 -// typename Graph::template EdgeMap<bool>::KeyType key;
4.47 +// typename Graph::template EdgeMap<bool>::Key key;
4.48 // key= typename Graph::EdgeIt(G);
4.49 // }
4.50 // }
5.1 --- a/src/lemon/concept/graph_component.h Sat Nov 13 12:53:28 2004 +0000
5.2 +++ b/src/lemon/concept/graph_component.h Sat Nov 13 17:07:10 2004 +0000
5.3 @@ -677,22 +677,22 @@
5.4 typedef BaseGraphComponent::Node Node;
5.5 typedef BaseGraphComponent::Edge Edge;
5.6
5.7 - template <typename Value>
5.8 - class NodeMap : public ReferenceMap<Node, Value> {
5.9 + template <typename _Value>
5.10 + class NodeMap : public ReferenceMap<Node, _Value> {
5.11 public:
5.12 NodeMap(const Graph&) {}
5.13 - NodeMap(const Graph&, const Value&) {}
5.14 + NodeMap(const Graph&, const _Value&) {}
5.15 NodeMap(const NodeMap&) {}
5.16
5.17 NodeMap& operator=(const NodeMap&) { return *this;}
5.18
5.19 };
5.20
5.21 - template <typename Value>
5.22 - class EdgeMap : public ReferenceMap<Edge, Value> {
5.23 + template <typename _Value>
5.24 + class EdgeMap : public ReferenceMap<Edge, _Value> {
5.25 public:
5.26 EdgeMap(const Graph&) {}
5.27 - EdgeMap(const Graph&, const Value&) {}
5.28 + EdgeMap(const Graph&, const _Value&) {}
5.29 EdgeMap(const EdgeMap&) {}
5.30
5.31 EdgeMap& operator=(const EdgeMap&) { return *this;}
6.1 --- a/src/lemon/concept/maps.h Sat Nov 13 12:53:28 2004 +0000
6.2 +++ b/src/lemon/concept/maps.h Sat Nov 13 17:07:10 2004 +0000
6.3 @@ -36,12 +36,12 @@
6.4 {
6.5 public:
6.6 /// Map's key type.
6.7 - typedef K KeyType;
6.8 + typedef K Key;
6.9 /// Map's value type. (The type of objects associated with the keys).
6.10 - typedef T ValueType;
6.11 + typedef T Value;
6.12
6.13 /// Returns the value associated with a key.
6.14 - ValueType operator[](const KeyType &k) const {return ValueType();}
6.15 + Value operator[](const Key &k) const {return Value();}
6.16
6.17 ///Default constructor
6.18 ReadMap() {}
6.19 @@ -54,12 +54,12 @@
6.20 {
6.21 public:
6.22 /// Map's key type.
6.23 - typedef K KeyType;
6.24 + typedef K Key;
6.25 /// Map's value type. (The type of objects associated with the keys).
6.26 - typedef T ValueType;
6.27 + typedef T Value;
6.28
6.29 /// Sets the value associated with a key.
6.30 - void set(const KeyType &k,const ValueType &t) {}
6.31 + void set(const Key &k,const Value &t) {}
6.32
6.33 ///Default constructor
6.34 WriteMap() {}
6.35 @@ -72,14 +72,14 @@
6.36 {
6.37 public:
6.38 /// Map's key type.
6.39 - typedef K KeyType;
6.40 + typedef K Key;
6.41 /// Map's value type. (The type of objects associated with the keys).
6.42 - typedef T ValueType;
6.43 + typedef T Value;
6.44
6.45 /// Returns the value associated with a key.
6.46 - ValueType operator[](const KeyType &k) const {return ValueType();}
6.47 + Value operator[](const Key &k) const {return Value();}
6.48 /// Sets the value associated with a key.
6.49 - void set(const KeyType &k,const ValueType &t) {}
6.50 + void set(const Key &k,const Value &t) {}
6.51
6.52 ///Default constructor
6.53 ReadWriteMap() {}
6.54 @@ -92,24 +92,24 @@
6.55 {
6.56 public:
6.57 /// Map's key type.
6.58 - typedef K KeyType;
6.59 + typedef K Key;
6.60 /// Map's value type. (The type of objects associated with the keys).
6.61 - typedef T ValueType;
6.62 + typedef T Value;
6.63
6.64 protected:
6.65 - ValueType tmp;
6.66 + Value tmp;
6.67 public:
6.68 - typedef ValueType& ReferenceType;
6.69 + typedef Value& Reference;
6.70 /// Map's const reference type.
6.71 - typedef const ValueType& ConstReferenceType;
6.72 + typedef const Value& ConstReference;
6.73
6.74 ///Returns a reference to the value associated to a key.
6.75 - ReferenceType operator[](const KeyType &i) { return tmp; }
6.76 + Reference operator[](const Key &i) { return tmp; }
6.77 ///Returns a const reference to the value associated to a key.
6.78 - ConstReferenceType operator[](const KeyType &i) const
6.79 + ConstReference operator[](const Key &i) const
6.80 { return tmp; }
6.81 /// Sets the value associated with a key.
6.82 - void set(const KeyType &k,const ValueType &t) { operator[](k)=t; }
6.83 + void set(const Key &k,const Value &t) { operator[](k)=t; }
6.84
6.85 ///Default constructor
6.86 ReferenceMap() {}
6.87 @@ -149,15 +149,15 @@
6.88
6.89 template<typename ReadMap>
6.90 struct ReadMapConcept {
6.91 - typedef typename ReadMap::KeyType KeyType;
6.92 - typedef typename ReadMap::ValueType ValueType;
6.93 + typedef typename ReadMap::Key Key;
6.94 + typedef typename ReadMap::Value Value;
6.95
6.96 void constraints() {
6.97 // No constraints for constructor.
6.98
6.99 - // What are the requirement for the ValueType?
6.100 + // What are the requirement for the Value?
6.101 // CopyConstructible? Assignable? None of these?
6.102 - ValueType v = m[k];
6.103 + Value v = m[k];
6.104 v = m[k];
6.105
6.106 // FIXME:
6.107 @@ -165,13 +165,13 @@
6.108 }
6.109
6.110 ReadMap m;
6.111 - KeyType k;
6.112 + Key k;
6.113 };
6.114
6.115 template<typename WriteMap>
6.116 struct WriteMapConcept {
6.117 - typedef typename WriteMap::KeyType KeyType;
6.118 - typedef typename WriteMap::ValueType ValueType;
6.119 + typedef typename WriteMap::Key Key;
6.120 + typedef typename WriteMap::Value Value;
6.121
6.122 void constraints() {
6.123 // No constraints for constructor.
6.124 @@ -180,8 +180,8 @@
6.125 }
6.126
6.127 WriteMap m;
6.128 - KeyType k;
6.129 - ValueType v;
6.130 + Key k;
6.131 + Value v;
6.132 };
6.133
6.134 template<typename ReadWriteMap>
6.135 @@ -194,12 +194,12 @@
6.136
6.137 template<typename ReferenceMap>
6.138 struct ReferenceMapConcept {
6.139 - typedef typename ReferenceMap::KeyType KeyType;
6.140 - typedef typename ReferenceMap::ValueType ValueType;
6.141 - typedef typename ReferenceMap::ReferenceType ReferenceType;
6.142 + typedef typename ReferenceMap::Key Key;
6.143 + typedef typename ReferenceMap::Value Value;
6.144 + typedef typename ReferenceMap::Reference Reference;
6.145
6.146 // What for is this?
6.147 - typedef typename ReferenceMap::ConstReferenceType ConstReferenceType;
6.148 + typedef typename ReferenceMap::ConstReference ConstReference;
6.149
6.150 void constraints() {
6.151 function_requires< ReadWriteMapConcept<ReferenceMap> >();
6.152 @@ -207,13 +207,13 @@
6.153 m[k] = v;
6.154 // Or should we require real reference?
6.155 // Like this:
6.156 - // ValueType &vv = m[k];
6.157 + // Value &vv = m[k];
6.158 // ignore_unused_variable_warning(vv);
6.159 }
6.160
6.161 ReferenceMap m;
6.162 - KeyType k;
6.163 - ValueType v;
6.164 + Key k;
6.165 + Value v;
6.166 };
6.167
6.168 /// \todo GraphMapConceptCheck
6.169 @@ -235,7 +235,7 @@
6.170 }
6.171 const GraphMap &c;
6.172 const Graph &g;
6.173 - const typename GraphMap::ValueType &t;
6.174 + const typename GraphMap::Value &t;
6.175 };
6.176
6.177
7.1 --- a/src/lemon/default_map.h Sat Nov 13 12:53:28 2004 +0000
7.2 +++ b/src/lemon/default_map.h Sat Nov 13 17:07:10 2004 +0000
7.3 @@ -33,11 +33,11 @@
7.4
7.5 /** The ArrayMap template class is graph map structure what
7.6 * automatically updates the map when a key is added to or erased from
7.7 - * the map. This map uses the VectorMap if the ValueType is a primitive
7.8 + * the map. This map uses the VectorMap if the Value is a primitive
7.9 * type and the ArrayMap for the other cases.
7.10 *
7.11 * The template parameter is the MapRegistry that the maps
7.12 - * will belong to and the ValueType.
7.13 + * will belong to and the Value.
7.14 */
7.15
7.16
7.17 @@ -147,10 +147,10 @@
7.18 typedef DefaultMap<_Graph, _Item, _ItemIt, _Value> Map;
7.19
7.20 typedef typename Parent::Graph Graph;
7.21 - typedef typename Parent::ValueType ValueType;
7.22 + typedef typename Parent::Value Value;
7.23
7.24 DefaultMap(const Graph& _g) : Parent(_g) {}
7.25 - DefaultMap(const Graph& _g, const ValueType& _v) : Parent(_g, _v) {}
7.26 + DefaultMap(const Graph& _g, const Value& _v) : Parent(_g, _v) {}
7.27 };
7.28
7.29
7.30 @@ -180,11 +180,11 @@
7.31 typedef DefaultMap<Graph, Node, NodeIt, _Value> Parent;
7.32
7.33 //typedef typename Parent::Graph Graph;
7.34 - typedef typename Parent::ValueType ValueType;
7.35 + typedef typename Parent::Value Value;
7.36
7.37 NodeMap(const Graph& _g)
7.38 : Parent(_g) {}
7.39 - NodeMap(const Graph& _g, const ValueType& _v)
7.40 + NodeMap(const Graph& _g, const Value& _v)
7.41 : Parent(_g, _v) {}
7.42
7.43 };
7.44 @@ -200,11 +200,11 @@
7.45 typedef DefaultMap<Graph, Edge, EdgeIt, _Value> Parent;
7.46
7.47 //typedef typename Parent::Graph Graph;
7.48 - typedef typename Parent::ValueType ValueType;
7.49 + typedef typename Parent::Value Value;
7.50
7.51 EdgeMap(const Graph& _g)
7.52 : Parent(_g) {}
7.53 - EdgeMap(const Graph& _g, const ValueType& _v)
7.54 + EdgeMap(const Graph& _g, const Value& _v)
7.55 : Parent(_g, _v) {}
7.56
7.57 };
8.1 --- a/src/lemon/dijkstra.h Sat Nov 13 12:53:28 2004 +0000
8.2 +++ b/src/lemon/dijkstra.h Sat Nov 13 17:07:10 2004 +0000
8.3 @@ -37,7 +37,7 @@
8.4 ///so it is easy to change it to any kind of length.
8.5 ///
8.6 ///The type of the length is determined by the
8.7 - ///\ref concept::ReadMap::ValueType "ValueType" of the length map.
8.8 + ///\ref concept::ReadMap::Value "Value" of the length map.
8.9 ///
8.10 ///It is also possible to change the underlying priority heap.
8.11 ///
8.12 @@ -81,7 +81,7 @@
8.13 typedef typename Graph::OutEdgeIt OutEdgeIt;
8.14
8.15 ///The type of the length of the edges.
8.16 - typedef typename LM::ValueType ValueType;
8.17 + typedef typename LM::Value Value;
8.18 ///The type of the map that stores the edge lengths.
8.19 typedef LM LengthMap;
8.20 ///\brief The type of the map that stores the last
8.21 @@ -91,7 +91,7 @@
8.22 ///nodes of the shortest paths.
8.23 typedef typename Graph::template NodeMap<Node> PredNodeMap;
8.24 ///The type of the map that stores the dists of the nodes.
8.25 - typedef typename Graph::template NodeMap<ValueType> DistMap;
8.26 + typedef typename Graph::template NodeMap<Value> DistMap;
8.27
8.28 private:
8.29 /// Pointer to the underlying graph.
8.30 @@ -237,8 +237,8 @@
8.31
8.32 typename GR::template NodeMap<int> heap_map(*G,-1);
8.33
8.34 - typedef Heap<Node, ValueType, typename GR::template NodeMap<int>,
8.35 - std::less<ValueType> >
8.36 + typedef Heap<Node, Value, typename GR::template NodeMap<int>,
8.37 + std::less<Value> >
8.38 HeapType;
8.39
8.40 HeapType heap(heap_map);
8.41 @@ -248,7 +248,7 @@
8.42 while ( !heap.empty() ) {
8.43
8.44 Node v=heap.top();
8.45 - ValueType oldvalue=heap[v];
8.46 + Value oldvalue=heap[v];
8.47 heap.pop();
8.48 distance->set(v, oldvalue);
8.49
8.50 @@ -281,7 +281,7 @@
8.51 ///\pre \ref run() must be called before using this function.
8.52 ///\warning If node \c v in unreachable from the root the return value
8.53 ///of this funcion is undefined.
8.54 - ValueType dist(Node v) const { return (*distance)[v]; }
8.55 + Value dist(Node v) const { return (*distance)[v]; }
8.56
8.57 ///Returns the 'previous edge' of the shortest path tree.
8.58
9.1 --- a/src/lemon/dimacs.h Sat Nov 13 12:53:28 2004 +0000
9.2 +++ b/src/lemon/dimacs.h Sat Nov 13 17:07:10 2004 +0000
9.3 @@ -50,8 +50,8 @@
9.4 typename Graph::Node &s, typename Graph::Node &t,
9.5 CostMap& cost) {
9.6 g.clear();
9.7 - typename CapacityMap::ValueType _cap;
9.8 - typename CostMap::ValueType _cost;
9.9 + typename CapacityMap::Value _cap;
9.10 + typename CostMap::Value _cost;
9.11 char d;
9.12 std::string problem;
9.13 char c;
10.1 --- a/src/lemon/graph_wrapper.h Sat Nov 13 12:53:28 2004 +0000
10.2 +++ b/src/lemon/graph_wrapper.h Sat Nov 13 17:07:10 2004 +0000
10.3 @@ -1121,8 +1121,8 @@
10.4 template <typename TT> friend class EdgeMap;
10.5 typename Graph::template EdgeMap<T> forward_map, backward_map;
10.6 public:
10.7 - typedef T ValueType;
10.8 - typedef Edge KeyType;
10.9 + typedef T Value;
10.10 + typedef Edge Key;
10.11
10.12 EdgeMap(const SubBidirGraphWrapper<Graph,
10.13 ForwardFilterMap, BackwardFilterMap>& g) :
10.14 @@ -1150,7 +1150,7 @@
10.15 backward_map.set(e, a);
10.16 }
10.17
10.18 - typename Graph::template EdgeMap<T>::ConstReferenceType
10.19 + typename Graph::template EdgeMap<T>::ConstReference
10.20 operator[](Edge e) const {
10.21 if (!e.backward)
10.22 return forward_map[e];
10.23 @@ -1158,7 +1158,7 @@
10.24 return backward_map[e];
10.25 }
10.26
10.27 - typename Graph::template EdgeMap<T>::ReferenceType
10.28 + typename Graph::template EdgeMap<T>::Reference
10.29 operator[](Edge e) {
10.30 if (!e.backward)
10.31 return forward_map[e];
10.32 @@ -1345,8 +1345,8 @@
10.33 protected:
10.34 const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>* res_graph;
10.35 public:
10.36 - typedef Number ValueType;
10.37 - typedef Edge KeyType;
10.38 + typedef Number Value;
10.39 + typedef Edge Key;
10.40 ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>&
10.41 _res_graph) : res_graph(&_res_graph) { }
10.42 Number operator[](const Edge& e) const {
11.1 --- a/src/lemon/kruskal.h Sat Nov 13 12:53:28 2004 +0000
11.2 +++ b/src/lemon/kruskal.h Sat Nov 13 17:07:10 2004 +0000
11.3 @@ -112,12 +112,12 @@
11.4 class NonConstMapWr {
11.5 const Map &m;
11.6 public:
11.7 - typedef typename Map::ValueType ValueType;
11.8 + typedef typename Map::Value Value;
11.9
11.10 NonConstMapWr(const Map &_m) : m(_m) {}
11.11
11.12 - template<class KeyType>
11.13 - void set(KeyType const& k, ValueType const &v) const { m.set(k,v); }
11.14 + template<class Key>
11.15 + void set(Key const& k, Value const &v) const { m.set(k,v); }
11.16 };
11.17
11.18 template <class GR, class IN, class OUT>
11.19 @@ -150,11 +150,11 @@
11.20 template<class GR, class Map>
11.21 class KruskalMapInput
11.22 : public std::vector< std::pair<typename GR::Edge,
11.23 - typename Map::ValueType> > {
11.24 + typename Map::Value> > {
11.25
11.26 public:
11.27 typedef std::vector< std::pair<typename GR::Edge,
11.28 - typename Map::ValueType> > Parent;
11.29 + typename Map::Value> > Parent;
11.30 typedef typename Parent::value_type value_type;
11.31
11.32 private:
11.33 @@ -235,19 +235,19 @@
11.34 /// map and the output is a sequence of the tree edges, a special
11.35 /// wrapper function exists: \ref kruskalEdgeMap_IteratorOut().
11.36 ///
11.37 - /// \warning Not a regular property map, as it doesn't know its KeyType
11.38 + /// \warning Not a regular property map, as it doesn't know its Key
11.39
11.40 template<class Iterator>
11.41 class KruskalSequenceOutput {
11.42 mutable Iterator it;
11.43
11.44 public:
11.45 - typedef bool ValueType;
11.46 + typedef bool Value;
11.47
11.48 KruskalSequenceOutput(Iterator const &_it) : it(_it) {}
11.49
11.50 - template<typename KeyType>
11.51 - void set(KeyType const& k, bool v) const { if(v) {*it=k; ++it;} }
11.52 + template<typename Key>
11.53 + void set(Key const& k, bool v) const { if(v) {*it=k; ++it;} }
11.54 };
11.55
11.56 template<class Iterator>
11.57 @@ -287,7 +287,7 @@
11.58
11.59 template <class GR, class IN, class RET>
11.60 inline
11.61 - typename IN::ValueType
11.62 + typename IN::Value
11.63 kruskalEdgeMap(GR const& G,
11.64 IN const& in,
11.65 RET &out) {
11.66 @@ -332,7 +332,7 @@
11.67
11.68 template <class GR, class IN, class RET>
11.69 inline
11.70 - typename IN::ValueType
11.71 + typename IN::Value
11.72 kruskalEdgeMap_IteratorOut(const GR& G,
11.73 const IN& in,
11.74 RET out)
12.1 --- a/src/lemon/map_defines.h Sat Nov 13 12:53:28 2004 +0000
12.2 +++ b/src/lemon/map_defines.h Sat Nov 13 17:07:10 2004 +0000
12.3 @@ -51,13 +51,13 @@
12.4 * supports this feature it should be fixed.
12.5 */
12.6 #define CREATE_NODE_MAP(DynMap) \
12.7 -template <typename Value> \
12.8 -class NodeMap : public DynMap<NodeMapRegistry, Value> { \
12.9 +template <typename _Value> \
12.10 +class NodeMap : public DynMap<NodeMapRegistry, _Value> { \
12.11 public: \
12.12 -typedef DynMap<NodeMapRegistry, Value> Parent; \
12.13 +typedef DynMap<NodeMapRegistry, _Value> Parent; \
12.14 NodeMap(const typename Parent::Graph& g) \
12.15 : Parent(g, g.node_maps) {} \
12.16 -NodeMap(const typename Parent::Graph& g, const Value& v) \
12.17 +NodeMap(const typename Parent::Graph& g, const _Value& v) \
12.18 : Parent(g, g.node_maps, v) {} \
12.19 NodeMap(const NodeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
12.20 template <typename TT> \
12.21 @@ -81,14 +81,14 @@
12.22 * supports this feature it should be fixed.
12.23 */
12.24 #define CREATE_EDGE_MAP(DynMap) \
12.25 -template <typename Value> \
12.26 -class EdgeMap : public DynMap<EdgeMapRegistry, Value> { \
12.27 +template <typename _Value> \
12.28 +class EdgeMap : public DynMap<EdgeMapRegistry, _Value> { \
12.29 public: \
12.30 -typedef DynMap<EdgeMapRegistry, Value> Parent; \
12.31 +typedef DynMap<EdgeMapRegistry, _Value> Parent; \
12.32 \
12.33 EdgeMap(const typename Parent::Graph& g) \
12.34 : Parent(g, g.edge_maps) {} \
12.35 -EdgeMap(const typename Parent::Graph& g, const Value& v) \
12.36 +EdgeMap(const typename Parent::Graph& g, const _Value& v) \
12.37 : Parent(g, g.edge_maps, v) {} \
12.38 EdgeMap(const EdgeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
12.39 template <typename TT> \
12.40 @@ -125,14 +125,14 @@
12.41 * supports this feature it should be fixed.
12.42 */
12.43 #define CREATE_SYM_EDGE_MAP(DynMap) \
12.44 -template <typename Value> \
12.45 -class SymEdgeMap : public DynMap<SymEdgeMapRegistry, Value> { \
12.46 +template <typename _Value> \
12.47 +class SymEdgeMap : public DynMap<SymEdgeMapRegistry, _Value> { \
12.48 public: \
12.49 -typedef DynMap<SymEdgeMapRegistry, Value> Parent; \
12.50 +typedef DynMap<SymEdgeMapRegistry, _Value> Parent; \
12.51 \
12.52 SymEdgeMap(const typename Parent::Graph& g) \
12.53 : Parent(g, g.sym_edge_maps) {} \
12.54 -SymEdgeMap(const typename Parent::Graph& g, const Value& v) \
12.55 +SymEdgeMap(const typename Parent::Graph& g, const _Value& v) \
12.56 : Parent(g, g.sym_edge_maps, v) {} \
12.57 SymEdgeMap(const SymEdgeMap& copy) \
12.58 : Parent(static_cast<const Parent&>(copy)) {} \
12.59 @@ -153,15 +153,15 @@
12.60 /** This is a macro to import an node map into a graph class.
12.61 */
12.62 #define IMPORT_NODE_MAP(From, from, To, to) \
12.63 -template <typename Value> \
12.64 -class NodeMap : public From::template NodeMap<Value> { \
12.65 +template <typename _Value> \
12.66 +class NodeMap : public From::template NodeMap<_Value> { \
12.67 \
12.68 public: \
12.69 -typedef typename From::template NodeMap<Value> Parent; \
12.70 +typedef typename From::template NodeMap<_Value> Parent; \
12.71 \
12.72 NodeMap(const To& to) \
12.73 : Parent(static_cast<const From&>(from)) { } \
12.74 -NodeMap(const To& to, const Value& value) \
12.75 +NodeMap(const To& to, const _Value& value) \
12.76 : Parent(static_cast<const From&>(from), value) { } \
12.77 NodeMap(const NodeMap& copy) \
12.78 : Parent(static_cast<const Parent&>(copy)) {} \
12.79 @@ -182,15 +182,15 @@
12.80 /** This is a macro to import an edge map into a graph class.
12.81 */
12.82 #define IMPORT_EDGE_MAP(From, from, To, to) \
12.83 -template <typename Value> \
12.84 -class EdgeMap : public From::template EdgeMap<Value> { \
12.85 +template <typename _Value> \
12.86 +class EdgeMap : public From::template EdgeMap<_Value> { \
12.87 \
12.88 public: \
12.89 -typedef typename From::template EdgeMap<Value> Parent; \
12.90 +typedef typename From::template EdgeMap<_Value> Parent; \
12.91 \
12.92 EdgeMap(const To& to) \
12.93 : Parent(static_cast<const From&>(from)) { } \
12.94 -EdgeMap(const To& to, const Value& value) \
12.95 +EdgeMap(const To& to, const _Value& value) \
12.96 : Parent(static_cast<const From&>(from), value) { } \
12.97 EdgeMap(const EdgeMap& copy) \
12.98 : Parent(static_cast<const Parent&>(copy)) {} \
13.1 --- a/src/lemon/map_iterator.h Sat Nov 13 12:53:28 2004 +0000
13.2 +++ b/src/lemon/map_iterator.h Sat Nov 13 17:07:10 2004 +0000
13.3 @@ -41,23 +41,23 @@
13.4 public:
13.5
13.6 /// The key type of the iterator.
13.7 - typedef typename Map::KeyType KeyType;
13.8 + typedef typename Map::Key Key;
13.9 /// The iterator to iterate on the keys.
13.10 typedef typename Map::KeyIt KeyIt;
13.11
13.12 /// The value type of the iterator.
13.13 - typedef typename Map::ValueType ValueType;
13.14 + typedef typename Map::Value Value;
13.15 /// The reference type of the iterator.
13.16 - typedef typename Map::ReferenceType ReferenceType;
13.17 + typedef typename Map::Reference Reference;
13.18 /// The pointer type of the iterator.
13.19 - typedef typename Map::PointerType PointerType;
13.20 + typedef typename Map::Pointer Pointer;
13.21
13.22 /// The const value type of the iterator.
13.23 - typedef typename Map::ConstValueType ConstValueType;
13.24 + typedef typename Map::ConstValue ConstValue;
13.25 /// The const reference type of the iterator.
13.26 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.27 + typedef typename Map::ConstReference ConstReference;
13.28 /// The pointer type of the iterator.
13.29 - typedef typename Map::ConstPointerType ConstPointerType;
13.30 + typedef typename Map::ConstPointer ConstPointer;
13.31
13.32 protected:
13.33
13.34 @@ -104,33 +104,33 @@
13.35 typedef MapIteratorBase<Map> Base;
13.36
13.37 /// The key type of the iterator.
13.38 - typedef typename Map::KeyType KeyType;
13.39 + typedef typename Map::Key Key;
13.40 /// The iterator to iterate on the keys.
13.41 typedef typename Map::KeyIt KeyIt;
13.42
13.43 /// The value type of the iterator.
13.44 - typedef typename Map::ValueType ValueType;
13.45 + typedef typename Map::Value Value;
13.46 /// The reference type of the iterator.
13.47 - typedef typename Map::ReferenceType ReferenceType;
13.48 + typedef typename Map::Reference Reference;
13.49 /// The pointer type of the iterator.
13.50 - typedef typename Map::PointerType PointerType;
13.51 + typedef typename Map::Pointer Pointer;
13.52
13.53 /// The const value type of the iterator.
13.54 - typedef typename Map::ConstValueType ConstValueType;
13.55 + typedef typename Map::ConstValue ConstValue;
13.56 /// The const reference type of the iterator.
13.57 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.58 + typedef typename Map::ConstReference ConstReference;
13.59 /// The pointer type of the iterator.
13.60 - typedef typename Map::ConstPointerType ConstPointerType;
13.61 + typedef typename Map::ConstPointer ConstPointer;
13.62
13.63 public:
13.64
13.65 /// The value type of the iterator.
13.66 - typedef extended_pair<KeyType, const KeyType&,
13.67 - ValueType, const ValueType&> PairValueType;
13.68 + typedef extended_pair<Key, const Key&,
13.69 + Value, const Value&> PairValue;
13.70
13.71 /// The reference type of the iterator.
13.72 - typedef extended_pair<const KeyType&, const KeyType&,
13.73 - ReferenceType, ReferenceType> PairReferenceType;
13.74 + typedef extended_pair<const Key&, const Key&,
13.75 + Reference, Reference> PairReference;
13.76
13.77 /// Default constructor.
13.78 MapIterator() {}
13.79 @@ -140,24 +140,24 @@
13.80 MapIterator(Map& pmap, const KeyIt& pit) : Base(pit), map(&pmap) {}
13.81
13.82 /// Dereference operator for the iterator.
13.83 - PairReferenceType operator*() {
13.84 - return PairReferenceType(Base::it, (*map)[Base::it]);
13.85 + PairReference operator*() {
13.86 + return PairReference(Base::it, (*map)[Base::it]);
13.87 }
13.88
13.89 /// The pointer type of the iterator.
13.90 - class PairPointerType {
13.91 + class PairPointer {
13.92 friend class MapIterator;
13.93 private:
13.94 - PairReferenceType data;
13.95 - PairPointerType(const KeyType& key, ReferenceType val)
13.96 + PairReference data;
13.97 + PairPointer(const Key& key, Reference val)
13.98 : data(key, val) {}
13.99 public:
13.100 - PairReferenceType* operator->() {return &data;}
13.101 + PairReference* operator->() {return &data;}
13.102 };
13.103
13.104 /// Arrow operator for the iterator.
13.105 - PairPointerType operator->() {
13.106 - return PairPointerType(Base::it, ((*map)[Base::it]));
13.107 + PairPointer operator->() {
13.108 + return PairPointer(Base::it, ((*map)[Base::it]));
13.109 }
13.110
13.111 /// The pre increment operator of the iterator.
13.112 @@ -180,9 +180,9 @@
13.113 // STL compatibility typedefs.
13.114 typedef std::forward_iterator_tag iterator_category;
13.115 typedef int difference_type;
13.116 - typedef PairValueType value_type;
13.117 - typedef PairReferenceType reference;
13.118 - typedef PairPointerType pointer;
13.119 + typedef PairValue value_type;
13.120 + typedef PairReference reference;
13.121 + typedef PairPointer pointer;
13.122 };
13.123
13.124 /** Compatible iterator with the stl maps' iterators.
13.125 @@ -197,23 +197,23 @@
13.126 typedef MapIteratorBase<Map> Base;
13.127
13.128 /// The key type of the iterator.
13.129 - typedef typename Map::KeyType KeyType;
13.130 + typedef typename Map::Key Key;
13.131 /// The iterator to iterate on the keys.
13.132 typedef typename Map::KeyIt KeyIt;
13.133
13.134 /// The value type of the iterator.
13.135 - typedef typename Map::ValueType ValueType;
13.136 + typedef typename Map::Value Value;
13.137 /// The reference type of the iterator.
13.138 - typedef typename Map::ReferenceType ReferenceType;
13.139 + typedef typename Map::Reference Reference;
13.140 /// The pointer type of the iterator.
13.141 - typedef typename Map::PointerType PointerType;
13.142 + typedef typename Map::Pointer Pointer;
13.143
13.144 /// The const value type of the iterator.
13.145 - typedef typename Map::ConstValueType ConstValueType;
13.146 + typedef typename Map::ConstValue ConstValue;
13.147 /// The const reference type of the iterator.
13.148 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.149 + typedef typename Map::ConstReference ConstReference;
13.150 /// The pointer type of the iterator.
13.151 - typedef typename Map::ConstPointerType ConstPointerType;
13.152 + typedef typename Map::ConstPointer ConstPointer;
13.153
13.154 public:
13.155
13.156 @@ -232,32 +232,32 @@
13.157 }
13.158
13.159 /// The value type of the iterator.
13.160 - typedef extended_pair<KeyType, const KeyType&,
13.161 - ValueType, const ValueType&> PairValueType;
13.162 + typedef extended_pair<Key, const Key&,
13.163 + Value, const Value&> PairValue;
13.164
13.165 /// The reference type of map.
13.166 - typedef extended_pair<const KeyType&, const KeyType&,
13.167 - ConstReferenceType, ConstReferenceType> PairReferenceType;
13.168 + typedef extended_pair<const Key&, const Key&,
13.169 + ConstReference, ConstReference> PairReference;
13.170
13.171 /// Dereference operator for the iterator.
13.172 - PairReferenceType operator*() {
13.173 - return PairReferenceType(Base::it, (*map)[Base::it]);
13.174 + PairReference operator*() {
13.175 + return PairReference(Base::it, (*map)[Base::it]);
13.176 }
13.177
13.178 /// The pointer type of the iterator.
13.179 - class PairPointerType {
13.180 + class PairPointer {
13.181 friend class MapConstIterator;
13.182 private:
13.183 - PairReferenceType data;
13.184 - PairPointerType(const KeyType& key, ConstReferenceType val)
13.185 + PairReference data;
13.186 + PairPointer(const Key& key, ConstReference val)
13.187 : data(key, val) {}
13.188 public:
13.189 - PairReferenceType* operator->() {return &data;}
13.190 + PairReference* operator->() {return &data;}
13.191 };
13.192
13.193 /// Arrow operator for the iterator.
13.194 - PairPointerType operator->() {
13.195 - return PairPointerType(Base::it, (*map)[Base::it]);
13.196 + PairPointer operator->() {
13.197 + return PairPointer(Base::it, (*map)[Base::it]);
13.198 }
13.199
13.200 /// The pre increment operator of the iterator.
13.201 @@ -280,9 +280,9 @@
13.202 // STL compatibility typedefs.
13.203 typedef std::input_iterator_tag iterator_category;
13.204 typedef int difference_type;
13.205 - typedef PairValueType value_type;
13.206 - typedef PairReferenceType reference;
13.207 - typedef PairPointerType pointer;
13.208 + typedef PairValue value_type;
13.209 + typedef PairReference reference;
13.210 + typedef PairPointer pointer;
13.211 };
13.212
13.213 /** The class makes the KeyIt to an stl compatible iterator
13.214 @@ -297,7 +297,7 @@
13.215 typedef MapIteratorBase<Map> Base;
13.216
13.217 /// The key type of the iterator.
13.218 - typedef typename Map::KeyType KeyType;
13.219 + typedef typename Map::Key Key;
13.220 /// The iterator to iterate on the keys.
13.221 typedef typename Map::KeyIt KeyIt;
13.222
13.223 @@ -323,17 +323,17 @@
13.224 }
13.225
13.226 /// The dereferencing operator of the iterator.
13.227 - KeyType operator*() const {
13.228 - return static_cast<KeyType>(Base::it);
13.229 + Key operator*() const {
13.230 + return static_cast<Key>(Base::it);
13.231 }
13.232
13.233 public:
13.234 // STL compatibility typedefs.
13.235 typedef std::input_iterator_tag iterator_category;
13.236 typedef int difference_type;
13.237 - typedef KeyType value_type;
13.238 - typedef const KeyType& reference;
13.239 - typedef const KeyType* pointer;
13.240 + typedef Key value_type;
13.241 + typedef const Key& reference;
13.242 + typedef const Key* pointer;
13.243 };
13.244
13.245 template <typename Map> class MapConstValueIterator;
13.246 @@ -352,24 +352,24 @@
13.247 typedef MapIteratorBase<Map> Base;
13.248
13.249 /// The key type of the iterator.
13.250 - typedef typename Map::KeyType KeyType;
13.251 + typedef typename Map::Key Key;
13.252 /// The iterator to iterate on the keys.
13.253 typedef typename Map::KeyIt KeyIt;
13.254
13.255
13.256 /// The value type of the iterator.
13.257 - typedef typename Map::ValueType ValueType;
13.258 + typedef typename Map::Value Value;
13.259 /// The reference type of the iterator.
13.260 - typedef typename Map::ReferenceType ReferenceType;
13.261 + typedef typename Map::Reference Reference;
13.262 /// The pointer type of the iterator.
13.263 - typedef typename Map::PointerType PointerType;
13.264 + typedef typename Map::Pointer Pointer;
13.265
13.266 /// The const value type of the iterator.
13.267 - typedef typename Map::ConstValueType ConstValueType;
13.268 + typedef typename Map::ConstValue ConstValue;
13.269 /// The const reference type of the iterator.
13.270 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.271 + typedef typename Map::ConstReference ConstReference;
13.272 /// The pointer type of the iterator.
13.273 - typedef typename Map::ConstPointerType ConstPointerType;
13.274 + typedef typename Map::ConstPointer ConstPointer;
13.275
13.276 private:
13.277
13.278 @@ -399,12 +399,12 @@
13.279 }
13.280
13.281 /// The dereferencing operator of the iterator.
13.282 - ReferenceType operator*() const {
13.283 + Reference operator*() const {
13.284 return (*map)[Base::it];
13.285 }
13.286
13.287 /// The arrow operator of the iterator.
13.288 - PointerType operator->() const {
13.289 + Pointer operator->() const {
13.290 return &(operator*());
13.291 }
13.292
13.293 @@ -412,9 +412,9 @@
13.294 // STL compatibility typedefs.
13.295 typedef std::forward_iterator_tag iterator_category;
13.296 typedef int difference_type;
13.297 - typedef ValueType value_type;
13.298 - typedef ReferenceType reference;
13.299 - typedef PointerType pointer;
13.300 + typedef Value value_type;
13.301 + typedef Reference reference;
13.302 + typedef Pointer pointer;
13.303 };
13.304
13.305 /** MapValueIterator creates an stl compatible iterator
13.306 @@ -430,23 +430,23 @@
13.307 typedef MapIteratorBase<Map> Base;
13.308
13.309 /// The key type of the iterator.
13.310 - typedef typename Map::KeyType KeyType;
13.311 + typedef typename Map::Key Key;
13.312 /// The iterator to iterate on the keys.
13.313 typedef typename Map::KeyIt KeyIt;
13.314
13.315 /// The value type of the iterator.
13.316 - typedef typename Map::ValueType ValueType;
13.317 + typedef typename Map::Value Value;
13.318 /// The reference type of the iterator.
13.319 - typedef typename Map::ReferenceType ReferenceType;
13.320 + typedef typename Map::Reference Reference;
13.321 /// The pointer type of the iterator.
13.322 - typedef typename Map::PointerType PointerType;
13.323 + typedef typename Map::Pointer Pointer;
13.324
13.325 /// The const value type of the iterator.
13.326 - typedef typename Map::ConstValueType ConstValueType;
13.327 + typedef typename Map::ConstValue ConstValue;
13.328 /// The const reference type of the iterator.
13.329 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.330 + typedef typename Map::ConstReference ConstReference;
13.331 /// The pointer type of the iterator.
13.332 - typedef typename Map::ConstPointerType ConstPointerType;
13.333 + typedef typename Map::ConstPointer ConstPointer;
13.334
13.335 private:
13.336
13.337 @@ -481,12 +481,12 @@
13.338 }
13.339
13.340 /// The dereferencing operator of the iterator.
13.341 - ConstReferenceType operator*() const {
13.342 + ConstReference operator*() const {
13.343 return (*map)[Base::it];
13.344 }
13.345
13.346 /// The arrow operator of the iterator.
13.347 - ConstPointerType operator->() const {
13.348 + ConstPointer operator->() const {
13.349 return &(operator*());
13.350 }
13.351
13.352 @@ -494,9 +494,9 @@
13.353 // STL compatibility typedefs.
13.354 typedef std::input_iterator_tag iterator_category;
13.355 typedef int difference_type;
13.356 - typedef ValueType value_type;
13.357 - typedef ConstReferenceType reference;
13.358 - typedef ConstPointerType pointer;
13.359 + typedef Value value_type;
13.360 + typedef ConstReference reference;
13.361 + typedef ConstPointer pointer;
13.362 };
13.363
13.364
13.365 @@ -511,24 +511,24 @@
13.366 public:
13.367
13.368 /// The key type of the iterator.
13.369 - typedef typename Map::KeyType KeyType;
13.370 + typedef typename Map::Key Key;
13.371 /// The iterator to iterate on the keys.
13.372 typedef typename Map::KeyIt KeyIt;
13.373
13.374
13.375 /// The value type of the iterator.
13.376 - typedef typename Map::ValueType ValueType;
13.377 + typedef typename Map::Value Value;
13.378 /// The reference type of the iterator.
13.379 - typedef typename Map::ReferenceType ReferenceType;
13.380 + typedef typename Map::Reference Reference;
13.381 /// The pointer type of the iterator.
13.382 - typedef typename Map::PointerType PointerType;
13.383 + typedef typename Map::Pointer Pointer;
13.384
13.385 /// The const value type of the iterator.
13.386 - typedef typename Map::ConstValueType ConstValueType;
13.387 + typedef typename Map::ConstValue ConstValue;
13.388 /// The const reference type of the iterator.
13.389 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.390 + typedef typename Map::ConstReference ConstReference;
13.391 /// The pointer type of the iterator.
13.392 - typedef typename Map::ConstPointerType ConstPointerType;
13.393 + typedef typename Map::ConstPointer ConstPointer;
13.394
13.395 /// The map initialized const key set.
13.396 MapConstKeySet(const Map& pmap) : map(&pmap) {}
13.397 @@ -548,10 +548,10 @@
13.398
13.399 public:
13.400 // STL compatibility typedefs.
13.401 - typedef ValueType value_type;
13.402 + typedef Value value_type;
13.403 typedef ConstIterator const_iterator;
13.404 - typedef ConstReferenceType const_reference;
13.405 - typedef ConstPointerType const_pointer;
13.406 + typedef ConstReference const_reference;
13.407 + typedef ConstPointer const_pointer;
13.408 typedef int difference_type;
13.409 };
13.410
13.411 @@ -567,24 +567,24 @@
13.412 public:
13.413
13.414 /// The key type of the iterator.
13.415 - typedef typename Map::KeyType KeyType;
13.416 + typedef typename Map::Key Key;
13.417 /// The iterator to iterate on the keys.
13.418 typedef typename Map::KeyIt KeyIt;
13.419
13.420
13.421 /// The value type of the iterator.
13.422 - typedef typename Map::ValueType ValueType;
13.423 + typedef typename Map::Value Value;
13.424 /// The reference type of the iterator.
13.425 - typedef typename Map::ReferenceType ReferenceType;
13.426 + typedef typename Map::Reference Reference;
13.427 /// The pointer type of the iterator.
13.428 - typedef typename Map::PointerType PointerType;
13.429 + typedef typename Map::Pointer Pointer;
13.430
13.431 /// The const value type of the iterator.
13.432 - typedef typename Map::ConstValueType ConstValueType;
13.433 + typedef typename Map::ConstValue ConstValue;
13.434 /// The const reference type of the iterator.
13.435 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.436 + typedef typename Map::ConstReference ConstReference;
13.437 /// The pointer type of the iterator.
13.438 - typedef typename Map::ConstPointerType ConstPointerType;
13.439 + typedef typename Map::ConstPointer ConstPointer;
13.440
13.441 /// The map initialized const value set.
13.442 MapConstValueSet(const Map& pmap) : map(&pmap) {}
13.443 @@ -604,10 +604,10 @@
13.444
13.445 public:
13.446 // STL compatibility typedefs.
13.447 - typedef ValueType value_type;
13.448 + typedef Value value_type;
13.449 typedef ConstIterator const_iterator;
13.450 - typedef ConstReferenceType const_reference;
13.451 - typedef ConstPointerType const_pointer;
13.452 + typedef ConstReference const_reference;
13.453 + typedef ConstPointer const_pointer;
13.454 typedef int difference_type;
13.455 };
13.456
13.457 @@ -624,24 +624,24 @@
13.458 public:
13.459
13.460 /// The key type of the iterator.
13.461 - typedef typename Map::KeyType KeyType;
13.462 + typedef typename Map::Key Key;
13.463 /// The iterator to iterate on the keys.
13.464 typedef typename Map::KeyIt KeyIt;
13.465
13.466
13.467 /// The value type of the iterator.
13.468 - typedef typename Map::ValueType ValueType;
13.469 + typedef typename Map::Value Value;
13.470 /// The reference type of the iterator.
13.471 - typedef typename Map::ReferenceType ReferenceType;
13.472 + typedef typename Map::Reference Reference;
13.473 /// The pointer type of the iterator.
13.474 - typedef typename Map::PointerType PointerType;
13.475 + typedef typename Map::Pointer Pointer;
13.476
13.477 /// The const value type of the iterator.
13.478 - typedef typename Map::ConstValueType ConstValueType;
13.479 + typedef typename Map::ConstValue ConstValue;
13.480 /// The const reference type of the iterator.
13.481 - typedef typename Map::ConstReferenceType ConstReferenceType;
13.482 + typedef typename Map::ConstReference ConstReference;
13.483 /// The pointer type of the iterator.
13.484 - typedef typename Map::ConstPointerType ConstPointerType;
13.485 + typedef typename Map::ConstPointer ConstPointer;
13.486
13.487 /// The map initialized value set.
13.488 MapValueSet(Map& pmap) : map(&pmap) {}
13.489 @@ -674,13 +674,13 @@
13.490
13.491 public:
13.492 // STL compatibility typedefs.
13.493 - typedef ValueType value_type;
13.494 + typedef Value value_type;
13.495 typedef Iterator iterator;
13.496 typedef ConstIterator const_iterator;
13.497 - typedef ReferenceType reference;
13.498 - typedef ConstReferenceType const_reference;
13.499 - typedef PointerType pointer;
13.500 - typedef ConstPointerType const_pointer;
13.501 + typedef Reference reference;
13.502 + typedef ConstReference const_reference;
13.503 + typedef Pointer pointer;
13.504 + typedef ConstPointer const_pointer;
13.505 typedef int difference_type;
13.506
13.507 };
14.1 --- a/src/lemon/maps.h Sat Nov 13 12:53:28 2004 +0000
14.2 +++ b/src/lemon/maps.h Sat Nov 13 17:07:10 2004 +0000
14.3 @@ -36,9 +36,9 @@
14.4 {
14.5 public:
14.6 ///\e
14.7 - typedef K KeyType;
14.8 + typedef K Key;
14.9 ///\e
14.10 - typedef T ValueType;
14.11 + typedef T Value;
14.12 };
14.13
14.14 /// Null map. (a.k.a. DoNothingMap)
14.15 @@ -108,20 +108,20 @@
14.16 /// \c std::map wrapper
14.17
14.18 /// This is essentially a wrapper for \c std::map. With addition that
14.19 - /// you can specify a default value different from \c ValueType() .
14.20 + /// you can specify a default value different from \c Value() .
14.21 ///
14.22 /// \todo Provide allocator parameter...
14.23 - template <typename Key, typename T, typename Compare = std::less<Key> >
14.24 - class StdMap : public std::map<Key,T,Compare> {
14.25 - typedef std::map<Key,T,Compare> parent;
14.26 + template <typename K, typename T, typename Compare = std::less<K> >
14.27 + class StdMap : public std::map<K,T,Compare> {
14.28 + typedef std::map<K,T,Compare> parent;
14.29 T v;
14.30 typedef typename parent::value_type PairType;
14.31
14.32 public:
14.33 - typedef Key KeyType;
14.34 - typedef T ValueType;
14.35 - typedef T& ReferenceType;
14.36 - typedef const T& ConstReferenceType;
14.37 + typedef K Key;
14.38 + typedef T Value;
14.39 + typedef T& Reference;
14.40 + typedef const T& ConstReference;
14.41
14.42
14.43 StdMap() : v() {}
14.44 @@ -143,10 +143,10 @@
14.45 //FIXME;
14.46 }
14.47
14.48 - ReferenceType operator[](const Key &k) {
14.49 + Reference operator[](const Key &k) {
14.50 return insert(PairType(k,v)).first -> second;
14.51 }
14.52 - ConstReferenceType operator[](const Key &k) const {
14.53 + ConstReference operator[](const Key &k) const {
14.54 typename parent::iterator i = lower_bound(k);
14.55 if (i == parent::end() || parent::key_comp()(k, (*i).first))
14.56 return v;
15.1 --- a/src/lemon/min_cost_flow.h Sat Nov 13 12:53:28 2004 +0000
15.2 +++ b/src/lemon/min_cost_flow.h Sat Nov 13 17:07:10 2004 +0000
15.3 @@ -59,10 +59,10 @@
15.4 template <typename Graph, typename LengthMap, typename CapacityMap>
15.5 class MinCostFlow {
15.6
15.7 - typedef typename LengthMap::ValueType Length;
15.8 + typedef typename LengthMap::Value Length;
15.9
15.10 //Warning: this should be integer type
15.11 - typedef typename CapacityMap::ValueType Capacity;
15.12 + typedef typename CapacityMap::Value Capacity;
15.13
15.14 typedef typename Graph::Node Node;
15.15 typedef typename Graph::NodeIt NodeIt;
15.16 @@ -94,14 +94,14 @@
15.17 const LengthMap &length;
15.18 const NodeMap &pot;
15.19 public :
15.20 - typedef typename LengthMap::KeyType KeyType;
15.21 - typedef typename LengthMap::ValueType ValueType;
15.22 + typedef typename LengthMap::Key Key;
15.23 + typedef typename LengthMap::Value Value;
15.24
15.25 ModLengthMap(const ResGW& _g,
15.26 const LengthMap &_length, const NodeMap &_pot) :
15.27 g(_g), /*rev(_rev),*/ length(_length), pot(_pot) { }
15.28
15.29 - ValueType operator[](typename ResGW::Edge e) const {
15.30 + Value operator[](typename ResGW::Edge e) const {
15.31 if (g.forward(e))
15.32 return length[e]-(pot[g.target(e)]-pot[g.source(e)]);
15.33 else
16.1 --- a/src/lemon/suurballe.h Sat Nov 13 12:53:28 2004 +0000
16.2 +++ b/src/lemon/suurballe.h Sat Nov 13 17:07:10 2004 +0000
16.3 @@ -58,7 +58,7 @@
16.4 class Suurballe{
16.5
16.6
16.7 - typedef typename LengthMap::ValueType Length;
16.8 + typedef typename LengthMap::Value Length;
16.9
16.10 typedef typename Graph::Node Node;
16.11 typedef typename Graph::NodeIt NodeIt;
17.1 --- a/src/lemon/vector_map.h Sat Nov 13 12:53:28 2004 +0000
17.2 +++ b/src/lemon/vector_map.h Sat Nov 13 17:07:10 2004 +0000
17.3 @@ -53,7 +53,7 @@
17.4 /// The graph type of the map.
17.5 typedef _Graph Graph;
17.6 /// The key type of the map.
17.7 - typedef _Item KeyType;
17.8 + typedef _Item Key;
17.9 /// The id map type of the map.
17.10 typedef AlterationObserverRegistry<_Item> Registry;
17.11 /// The value type of the map.
17.12 @@ -71,19 +71,17 @@
17.13
17.14 public:
17.15
17.16 - /// The value type of the map.
17.17 - typedef Value ValueType;
17.18 /// The reference type of the map;
17.19 - typedef typename Container::reference ReferenceType;
17.20 + typedef typename Container::reference Reference;
17.21 /// The pointer type of the map;
17.22 - typedef typename Container::pointer PointerType;
17.23 + typedef typename Container::pointer Pointer;
17.24
17.25 /// The const value type of the map.
17.26 - typedef const Value ConstValueType;
17.27 + typedef const Value ConstValue;
17.28 /// The const reference type of the map;
17.29 - typedef typename Container::const_reference ConstReferenceType;
17.30 + typedef typename Container::const_reference ConstReference;
17.31 /// The pointer type of the map;
17.32 - typedef typename Container::const_pointer ConstPointerType;
17.33 + typedef typename Container::const_pointer ConstPointer;
17.34
17.35 /// Constructor to attach the new map into the registry.
17.36
17.37 @@ -150,7 +148,7 @@
17.38 /// The subscript operator. The map can be subscripted by the
17.39 /// actual items of the graph.
17.40
17.41 - ReferenceType operator[](const KeyType& key) {
17.42 + Reference operator[](const Key& key) {
17.43 return container[graph->id(key)];
17.44 }
17.45
17.46 @@ -159,7 +157,7 @@
17.47 /// The const subscript operator. The map can be subscripted by the
17.48 /// actual items of the graph.
17.49
17.50 - ConstReferenceType operator[](const KeyType& key) const {
17.51 + ConstReference operator[](const Key& key) const {
17.52 return container[graph->id(key)];
17.53 }
17.54
17.55 @@ -169,7 +167,7 @@
17.56 /// It the same as operator[](key) = value expression.
17.57 ///
17.58
17.59 - void set(const KeyType& key, const ValueType& value) {
17.60 + void set(const Key& key, const Value& value) {
17.61 (*this)[key] = value;
17.62 }
17.63
17.64 @@ -178,7 +176,7 @@
17.65 /// It adds a new key to the map. It called by the observer registry
17.66 /// and it overrides the add() member function of the observer base.
17.67
17.68 - void add(const KeyType& key) {
17.69 + void add(const Key& key) {
17.70 int id = graph->id(key);
17.71 if (id >= (int)container.size()) {
17.72 container.resize(id + 1);
17.73 @@ -189,7 +187,7 @@
17.74
17.75 /// Erase a key from the map. It called by the observer registry
17.76 /// and it overrides the erase() member function of the observer base.
17.77 - void erase(const KeyType&) {}
17.78 + void erase(const Key&) {}
17.79
17.80 /// Buildes the map.
17.81
18.1 --- a/src/lemon/xy.h Sat Nov 13 12:53:28 2004 +0000
18.2 +++ b/src/lemon/xy.h Sat Nov 13 17:07:10 2004 +0000
18.3 @@ -50,7 +50,7 @@
18.4
18.5 public:
18.6
18.7 - typedef T ValueType;
18.8 + typedef T Value;
18.9
18.10 T x,y;
18.11
19.1 --- a/src/test/sym_graph_test.h Sat Nov 13 12:53:28 2004 +0000
19.2 +++ b/src/test/sym_graph_test.h Sat Nov 13 17:07:10 2004 +0000
19.3 @@ -95,9 +95,9 @@
19.4 dm=cm; //Copy from another type
19.5 {
19.6 //Check the typedef's
19.7 - typename Graph::template SymEdgeMap<int>::ValueType val;
19.8 + typename Graph::template SymEdgeMap<int>::Value val;
19.9 val = 1;
19.10 - typename Graph::template SymEdgeMap<int>::KeyType key;
19.11 + typename Graph::template SymEdgeMap<int>::Key key;
19.12 key = typename Graph::SymEdgeIt(G);
19.13 }
19.14 }
19.15 @@ -118,9 +118,9 @@
19.16 m=dm; //Copy to another type
19.17 {
19.18 //Check the typedef's
19.19 - typename Graph::template SymEdgeMap<bool>::ValueType val;
19.20 + typename Graph::template SymEdgeMap<bool>::Value val;
19.21 val=true;
19.22 - typename Graph::template SymEdgeMap<bool>::KeyType key;
19.23 + typename Graph::template SymEdgeMap<bool>::Key key;
19.24 key= typename Graph::SymEdgeIt(G);
19.25 }
19.26 }
20.1 --- a/src/work/alpar/boolmap_iter.cc Sat Nov 13 12:53:28 2004 +0000
20.2 +++ b/src/work/alpar/boolmap_iter.cc Sat Nov 13 17:07:10 2004 +0000
20.3 @@ -13,8 +13,8 @@
20.4 typedef GG Graph;
20.5 typedef typename GG::Edge Edge;
20.6
20.7 - typedef Edge KeyType;
20.8 - typedef bool ValueType;
20.9 + typedef Edge Key;
20.10 + typedef bool Value;
20.11
20.12 friend class RefType;
20.13 friend class FalseIterator;
20.14 @@ -67,12 +67,12 @@
20.15 public:
20.16 RefType(BoolIterEdgeMap &_M,Edge _e) : M(_M), e(_e) { }
20.17
20.18 - operator ValueType() const
20.19 + operator Value() const
20.20 {
20.21 return M.isTrue(e);
20.22
20.23 }
20.24 - ValueType operator = (ValueType v) const
20.25 + Value operator = (Value v) const
20.26 {
20.27 if(v) M.setTrue(e);
20.28 else M.setFalse(e);
21.1 --- a/src/work/alpar/dijkstra.h Sat Nov 13 12:53:28 2004 +0000
21.2 +++ b/src/work/alpar/dijkstra.h Sat Nov 13 17:07:10 2004 +0000
21.3 @@ -46,7 +46,7 @@
21.4 ///
21.5 typedef LM LengthMap;
21.6 //The type of the length of the edges.
21.7 - typedef typename LM::ValueType ValueType;
21.8 + typedef typename LM::Value Value;
21.9 ///The heap type used by Dijkstra algorithm.
21.10
21.11 ///The heap type used by Dijkstra algorithm.
21.12 @@ -54,9 +54,9 @@
21.13 ///\sa BinHeap
21.14 ///\sa Dijkstra
21.15 typedef BinHeap<typename Graph::Node,
21.16 - typename LM::ValueType,
21.17 + typename LM::Value,
21.18 typename GR::template NodeMap<int>,
21.19 - std::less<ValueType> > Heap;
21.20 + std::less<Value> > Heap;
21.21
21.22 ///\brief The type of the map that stores the last
21.23 ///edges of the shortest paths.
21.24 @@ -90,7 +90,7 @@
21.25
21.26 ///It must meet the \ref concept::WriteMap "WriteMap" concept.
21.27 ///
21.28 - typedef typename Graph::template NodeMap<typename LM::ValueType> DistMap;
21.29 + typedef typename Graph::template NodeMap<typename LM::Value> DistMap;
21.30 ///Instantiates a DistMap.
21.31
21.32 ///\todo Please document...
21.33 @@ -109,7 +109,7 @@
21.34 ///so it is easy to change it to any kind of length.
21.35 ///
21.36 ///The type of the length is determined by the
21.37 - ///\ref concept::ReadMap::ValueType "ValueType" of the length map.
21.38 + ///\ref concept::ReadMap::Value "Value" of the length map.
21.39 ///
21.40 ///It is also possible to change the underlying priority heap.
21.41 ///
21.42 @@ -158,7 +158,7 @@
21.43 typedef typename Graph::OutEdgeIt OutEdgeIt;
21.44
21.45 ///The type of the length of the edges.
21.46 - typedef typename TR::LengthMap::ValueType ValueType;
21.47 + typedef typename TR::LengthMap::Value Value;
21.48 ///The type of the map that stores the edge lengths.
21.49 typedef typename TR::LengthMap LengthMap;
21.50 ///\brief The type of the map that stores the last
21.51 @@ -387,7 +387,7 @@
21.52 while ( !heap.empty() ) {
21.53
21.54 Node v=heap.top();
21.55 - ValueType oldvalue=heap[v];
21.56 + Value oldvalue=heap[v];
21.57 heap.pop();
21.58 distance->set(v, oldvalue);
21.59
21.60 @@ -420,7 +420,7 @@
21.61 ///\pre \ref run() must be called before using this function.
21.62 ///\warning If node \c v in unreachable from the root the return value
21.63 ///of this funcion is undefined.
21.64 - ValueType dist(Node v) const { return (*distance)[v]; }
21.65 + Value dist(Node v) const { return (*distance)[v]; }
21.66
21.67 ///Returns the 'previous edge' of the shortest path tree.
21.68
21.69 @@ -497,7 +497,7 @@
21.70 ///The type of the map that stores the edge lengths.
21.71 typedef typename TR::LengthMap LengthMap;
21.72 ///The type of the length of the edges.
21.73 - typedef typename LengthMap::ValueType ValueType;
21.74 + typedef typename LengthMap::Value Value;
21.75 ///\brief The type of the map that stores the last
21.76 ///edges of the shortest paths.
21.77 typedef typename TR::PredMap PredMap;
22.1 --- a/src/work/alpar/f_ed_ka.h Sat Nov 13 12:53:28 2004 +0000
22.2 +++ b/src/work/alpar/f_ed_ka.h Sat Nov 13 17:07:10 2004 +0000
22.3 @@ -13,7 +13,7 @@
22.4
22.5 namespace lemon {
22.6 template <typename Graph, typename FlowMap, typename CapacityMap>
22.7 - typename FlowMap::ValueType maxFlow(Graph &G,
22.8 + typename FlowMap::Value maxFlow(Graph &G,
22.9 FlowMap &f,
22.10 CapacityMap &c,
22.11 typename Graph::NodeIt s,
22.12 @@ -25,7 +25,7 @@
22.13 typedef typename Graph::EachEdgeIt EachEdgeIt;
22.14 typedef typename Graph::OutEdgeIt OutEdgeIt;
22.15 typedef typename Graph::InEdgeIt InEdgeIt;
22.16 - typedef typename FlowMap::ValueType T;
22.17 + typedef typename FlowMap::Value T;
22.18
22.19 T flow_val = 0;
22.20 T aug_val;
23.1 --- a/src/work/alpar/rw_nonref_map.cc Sat Nov 13 12:53:28 2004 +0000
23.2 +++ b/src/work/alpar/rw_nonref_map.cc Sat Nov 13 17:07:10 2004 +0000
23.3 @@ -10,8 +10,8 @@
23.4 typedef GG Graph;
23.5 typedef typename GG::Edge Edge;
23.6
23.7 - typedef Edge KeyType;
23.8 - typedef TT ValueType;
23.9 + typedef Edge Key;
23.10 + typedef TT Value;
23.11
23.12 class RefType
23.13 {
23.14 @@ -20,15 +20,15 @@
23.15 public:
23.16 RefType(Graph &_G,Edge _e) : G(_G), e(_e) { }
23.17
23.18 - operator ValueType() const
23.19 + operator Value() const
23.20 {
23.21 - ValueType tmp;
23.22 + Value tmp;
23.23 std::cout << G.id(G.source(e)) << "->"
23.24 << G.id(G.target(e)) << ": ";
23.25 std::cin >> tmp;
23.26 return tmp;
23.27 }
23.28 - ValueType operator = (ValueType v) const
23.29 + Value operator = (Value v) const
23.30 {
23.31 std::cout << G.id(G.source(e)) << "->"
23.32 << G.id(G.target(e)) << ": " << v << '\n';
23.33 @@ -47,23 +47,23 @@
23.34 class NullMap
23.35 {
23.36 public:
23.37 - typedef K KeyType;
23.38 - typedef T ValueType;
23.39 + typedef K Key;
23.40 + typedef T Value;
23.41
23.42 class RefType
23.43 {
23.44 - ValueType val;
23.45 + Value val;
23.46 public:
23.47 - RefType(ValueType v) : val(v) { }
23.48 - operator ValueType() const { return val; }
23.49 - ValueType operator = (ValueType v) const { return val; }
23.50 + RefType(Value v) : val(v) { }
23.51 + operator Value() const { return val; }
23.52 + Value operator = (Value v) const { return val; }
23.53 };
23.54
23.55 private:
23.56 - ValueType val;
23.57 + Value val;
23.58 public:
23.59 - NullMap(ValueType v) : val(v) { }
23.60 - RefType operator[] (KeyType e) const { return RefType(v);}
23.61 + NullMap(Value v) : val(v) { }
23.62 + RefType operator[] (Key e) const { return RefType(v);}
23.63 };
23.64
23.65 int main()
24.1 --- a/src/work/athos/mincostflow.h Sat Nov 13 12:53:28 2004 +0000
24.2 +++ b/src/work/athos/mincostflow.h Sat Nov 13 17:07:10 2004 +0000
24.3 @@ -43,10 +43,10 @@
24.4 template <typename Graph, typename CostMap, typename SupplyDemandMap>
24.5 class MinCostFlow {
24.6
24.7 - typedef typename CostMap::ValueType Cost;
24.8 + typedef typename CostMap::Value Cost;
24.9
24.10
24.11 - typedef typename SupplyDemandMap::ValueType SupplyDemand;
24.12 + typedef typename SupplyDemandMap::Value SupplyDemand;
24.13
24.14 typedef typename Graph::Node Node;
24.15 typedef typename Graph::NodeIt NodeIt;
24.16 @@ -68,10 +68,10 @@
24.17 const CostMap &ol;
24.18 const NodeMap &pot;
24.19 public :
24.20 - typedef typename CostMap::KeyType KeyType;
24.21 - typedef typename CostMap::ValueType ValueType;
24.22 + typedef typename CostMap::Key Key;
24.23 + typedef typename CostMap::Value Value;
24.24
24.25 - ValueType operator[](typename ResGraph::Edge e) const {
24.26 + Value operator[](typename ResGraph::Edge e) const {
24.27 if (res_graph.forward(e))
24.28 return ol[e]-(pot[res_graph.target(e)]-pot[res_graph.source(e)]);
24.29 else
25.1 --- a/src/work/athos/old/minlengthpaths.h Sat Nov 13 12:53:28 2004 +0000
25.2 +++ b/src/work/athos/old/minlengthpaths.h Sat Nov 13 17:07:10 2004 +0000
25.3 @@ -30,7 +30,7 @@
25.4 template <typename Graph, typename LengthMap>
25.5 class MinLengthPaths {
25.6
25.7 - typedef typename LengthMap::ValueType Length;
25.8 + typedef typename LengthMap::Value Length;
25.9
25.10 typedef typename Graph::Node Node;
25.11 typedef typename Graph::NodeIt NodeIt;
25.12 @@ -49,10 +49,10 @@
25.13 const LengthMap &ol;
25.14 const NodeMap &pot;
25.15 public :
25.16 - typedef typename LengthMap::KeyType KeyType;
25.17 - typedef typename LengthMap::ValueType ValueType;
25.18 + typedef typename LengthMap::Key Key;
25.19 + typedef typename LengthMap::Value Value;
25.20
25.21 - ValueType operator[](typename ResGraphType::Edge e) const {
25.22 + Value operator[](typename ResGraphType::Edge e) const {
25.23 //if ( (1-2*rev[e])*ol[e]-(pot[G.target(e)]-pot[G.source(e)] ) <0 ){
25.24 // std::cout<<"Negative length!!"<<std::endl;
25.25 //}
26.1 --- a/src/work/athos/union_find.h Sat Nov 13 12:53:28 2004 +0000
26.2 +++ b/src/work/athos/union_find.h Sat Nov 13 17:07:10 2004 +0000
26.3 @@ -15,7 +15,7 @@
26.4
26.5 namespace lemon {
26.6
26.7 - template <typename KeyType, typename KeyIntMap>
26.8 + template <typename Key, typename KeyIntMap>
26.9 class UnionFind {
26.10 KeyIntMap& pointmap;
26.11 struct VectorElementType {
26.12 @@ -34,7 +34,7 @@
26.13 }
26.14
26.15 //Give a component of one point to the structure
26.16 - int addPoint(KeyType u){
26.17 + int addPoint(Key u){
26.18 int _index = container.size();
26.19 VectorElementType buf(_index,1);
26.20 container.push_back(buf);
26.21 @@ -43,7 +43,7 @@
26.22
26.23
26.24 //Finds the big boss of u
26.25 - int find(KeyType u){
26.26 + int find(Key u){
26.27 if (pointmap.get(u)==-1){
26.28 int whoami = addPoint(u);
26.29 pointmap.set(u, whoami);
26.30 @@ -61,7 +61,7 @@
26.31 }
26.32
26.33 //Finds u and v in the structures and merges the comopnents, if not equal
26.34 - bool findAndMerge(KeyType u,KeyType v){
26.35 + bool findAndMerge(Key u,Key v){
26.36 int bu = find(u);
26.37 int bv = find(v);
26.38 if (bu != bv){
27.1 --- a/src/work/deba/dijkstra.h Sat Nov 13 12:53:28 2004 +0000
27.2 +++ b/src/work/deba/dijkstra.h Sat Nov 13 17:07:10 2004 +0000
27.3 @@ -21,7 +21,7 @@
27.4 ///\ref ReadMap "readable map",
27.5 ///so it is easy to change it to any kind of length.
27.6 ///
27.7 - ///The type of the length is determined by the \c ValueType of the length map.
27.8 + ///The type of the length is determined by the \c Value of the length map.
27.9 ///
27.10 ///It is also possible to change the underlying priority heap.
27.11 ///
27.12 @@ -59,7 +59,7 @@
27.13 typedef typename Graph::OutEdgeIt OutEdgeIt;
27.14
27.15 ///The type of the length of the edges.
27.16 - typedef typename LM::ValueType ValueType;
27.17 + typedef typename LM::Value Value;
27.18 ///The type of the map that stores the edge lengths.
27.19 typedef LM LengthMap;
27.20 ///\brief The type of the map that stores the last
27.21 @@ -69,7 +69,7 @@
27.22 ///nodes of the shortest paths.
27.23 typedef typename Graph::template NodeMap<Node> PredNodeMap;
27.24 ///The type of the map that stores the dists of the nodes.
27.25 - typedef typename Graph::template NodeMap<ValueType> DistMap;
27.26 + typedef typename Graph::template NodeMap<Value> DistMap;
27.27
27.28 private:
27.29 const Graph *G;
27.30 @@ -216,8 +216,8 @@
27.31
27.32 typename GR::template NodeMap<int> heap_map(*G,-1);
27.33
27.34 - typedef Heap<Node, ValueType, typename GR::template NodeMap<int>,
27.35 - std::less<ValueType> >
27.36 + typedef Heap<Node, Value, typename GR::template NodeMap<int>,
27.37 + std::less<Value> >
27.38 HeapType;
27.39
27.40 HeapType heap(heap_map);
27.41 @@ -227,7 +227,7 @@
27.42 while ( !heap.empty() ) {
27.43
27.44 Node v=heap.top();
27.45 - ValueType oldvalue=heap[v];
27.46 + Value oldvalue=heap[v];
27.47 heap.pop();
27.48 distance->set(v, oldvalue);
27.49
27.50 @@ -261,7 +261,7 @@
27.51 ///\pre \ref run() must be called before using this function.
27.52 ///\warning If node \c v in unreachable from the root the return value
27.53 ///of this funcion is undefined.
27.54 - ValueType dist(Node v) const { return (*distance)[v]; }
27.55 + Value dist(Node v) const { return (*distance)[v]; }
27.56
27.57 ///Returns the 'previous edge' of the shortest path tree.
27.58
28.1 --- a/src/work/klao/iter_map.h Sat Nov 13 12:53:28 2004 +0000
28.2 +++ b/src/work/klao/iter_map.h Sat Nov 13 17:07:10 2004 +0000
28.3 @@ -25,14 +25,14 @@
28.4 class IterableMap {
28.5 public:
28.6
28.7 - typedef typename KeyIntMap::KeyType KeyType;
28.8 - typedef Val ValueType;
28.9 + typedef typename KeyIntMap::Key Key;
28.10 + typedef Val Value;
28.11
28.12 - typedef typename std::vector<KeyType>::const_iterator iterator;
28.13 + typedef typename std::vector<Key>::const_iterator iterator;
28.14
28.15 protected:
28.16 KeyIntMap &base;
28.17 - std::vector<KeyType> data;
28.18 + std::vector<Key> data;
28.19 size_t bounds[N];
28.20 Val def_val;
28.21
28.22 @@ -55,7 +55,7 @@
28.23 size_t move(size_t a, uint8_t m, uint8_t n) {
28.24 if(m != n) {
28.25 size_t orig_a = a;
28.26 - KeyType orig_key = data[a];
28.27 + Key orig_key = data[a];
28.28 while(m > n) {
28.29 --m;
28.30 half_swap(a, bounds[m]++);
28.31 @@ -80,11 +80,11 @@
28.32 // for(int i=0; i<N; ++i) { bounds[i]=0; }
28.33 }
28.34
28.35 - Val operator[](const KeyType& k) const {
28.36 + Val operator[](const Key& k) const {
28.37 return find(base[k]);
28.38 }
28.39
28.40 - void set(const KeyType& k, Val n) {
28.41 + void set(const Key& k, Val n) {
28.42 // FIXME: range check?
28.43 size_t a = base[k];
28.44 if(a < bounds[N-1]) {
28.45 @@ -95,14 +95,14 @@
28.46 }
28.47 }
28.48
28.49 - void insert(const KeyType& k, Val n) {
28.50 + void insert(const Key& k, Val n) {
28.51 data.push_back(k);
28.52 base.set(k, move(bounds[N-1]++, N-1, n));
28.53 }
28.54
28.55 /// This func is not very usable, but necessary to implement
28.56 /// dynamic map behaviour.
28.57 - void remove(const KeyType& k) {
28.58 + void remove(const Key& k) {
28.59 size_t a = base[k];
28.60 if(a < bounds[N-1]) {
28.61 move(a, find(a), N);
28.62 @@ -130,7 +130,7 @@
28.63
28.64
28.65 /// For use as an iterator...
28.66 - KeyType& first(KeyType &k, Val n) {
28.67 + Key& first(Key &k, Val n) {
28.68 size_t i = (n ? bounds[n-1] : 0);
28.69 if( i < bounds[n] ) {
28.70 k = data[i];
28.71 @@ -142,7 +142,7 @@
28.72 }
28.73
28.74 /// For use as an iterator...
28.75 - KeyType& next(KeyType &k) {
28.76 + Key& next(Key &k) {
28.77 size_t i = base[k];
28.78 uint8_t n = find(i);
28.79 ++i;
29.1 --- a/src/work/marci/augmenting_flow.h Sat Nov 13 12:53:28 2004 +0000
29.2 +++ b/src/work/marci/augmenting_flow.h Sat Nov 13 17:07:10 2004 +0000
29.3 @@ -112,8 +112,8 @@
29.4 IntMap* map;
29.5 int* number_of_augmentations;
29.6 public:
29.7 - typedef Node KeyType;
29.8 - typedef bool ValueType;
29.9 + typedef Node Key;
29.10 + typedef bool Value;
29.11 TrickyReachedMap(IntMap& _map, int& _number_of_augmentations) :
29.12 map(&_map), number_of_augmentations(&_number_of_augmentations) { }
29.13 void set(const Node& n, bool b) {
30.1 --- a/src/work/marci/bfs_mm.h Sat Nov 13 12:53:28 2004 +0000
30.2 +++ b/src/work/marci/bfs_mm.h Sat Nov 13 17:07:10 2004 +0000
30.3 @@ -140,7 +140,7 @@
30.4 const ReachedMap& reachedMap() const { return *reached_map; }
30.5 /// Guess what?
30.6 /// \deprecated
30.7 - typename ReachedMap::ValueType reached(const Node& n) const {
30.8 + typename ReachedMap::Value reached(const Node& n) const {
30.9 return (*reached_map)[n];
30.10 }
30.11 /// Guess what?
30.12 @@ -242,7 +242,7 @@
30.13 const PredMap& predMap() const { return *pred_map; }
30.14 /// Guess what?
30.15 /// \deprecated
30.16 - typename PredMap::ValueType pred(const Node& n) const {
30.17 + typename PredMap::Value pred(const Node& n) const {
30.18 return (*pred_map)[n];
30.19 }
30.20 /// Guess what?
30.21 @@ -250,7 +250,7 @@
30.22 const PredNodeMap& predNodeMap() const { return *pred_node_map; }
30.23 /// Guess what?
30.24 /// \deprecated
30.25 - typename PredNodeMap::ValueType predNode(const Node& n) const {
30.26 + typename PredNodeMap::Value predNode(const Node& n) const {
30.27 return (*pred_node_map)[n];
30.28 }
30.29 /// Guess what?
30.30 @@ -258,7 +258,7 @@
30.31 const DistMap& distMap() const { return *dist_map; }
30.32 /// Guess what?
30.33 /// \deprecated
30.34 - typename DistMap::ValueType dist(const Node& n) const {
30.35 + typename DistMap::Value dist(const Node& n) const {
30.36 return (*dist_map)[n];
30.37 }
30.38 };
31.1 --- a/src/work/marci/bipartite_graph_wrapper.h Sat Nov 13 12:53:28 2004 +0000
31.2 +++ b/src/work/marci/bipartite_graph_wrapper.h Sat Nov 13 17:07:10 2004 +0000
31.3 @@ -794,15 +794,15 @@
31.4 /// stGraphWrapper<Graph, sIterableMap, tIterableMap>.
31.5 template<typename NM> class NodeMapWrapper {
31.6 public:
31.7 - typedef Node KeyType;
31.8 - typedef typename NM::ValueType ValueType;
31.9 + typedef Node Key;
31.10 + typedef typename NM::Value Value;
31.11 protected:
31.12 NM* nm;
31.13 - ValueType* s_value, t_value;
31.14 + Value* s_value, t_value;
31.15 public:
31.16 - NodeMapWrapper(NM& _nm, ValueType& _s_value, ValueType& _t_value) :
31.17 + NodeMapWrapper(NM& _nm, Value& _s_value, Value& _t_value) :
31.18 nm(&_nm), s_value(&_s_value), t_value(&_t_value) { }
31.19 - ValueType operator[](const Node& n) const {
31.20 + Value operator[](const Node& n) const {
31.21 switch (n.getSpec()) {
31.22 case 0:
31.23 return (*nm)[n];
31.24 @@ -813,7 +813,7 @@
31.25 return *t_value;
31.26 }
31.27 }
31.28 - void set(const Node& n, ValueType t) {
31.29 + void set(const Node& n, Value t) {
31.30 switch (n.getSpec()) {
31.31 case 0:
31.32 nm->set(n, t);
31.33 @@ -873,14 +873,14 @@
31.34 template<typename EM, typename NM>
31.35 class EdgeMapWrapper {
31.36 public:
31.37 - typedef Edge KeyType;
31.38 - typedef typename EM::ValueType ValueType;
31.39 + typedef Edge Key;
31.40 + typedef typename EM::Value Value;
31.41 protected:
31.42 EM* em;
31.43 NM* nm;
31.44 public:
31.45 EdgeMapWrapper(EM& _em, NM& _nm) : em(&_em), nm(&_nm) { }
31.46 - ValueType operator[](const Edge& e) const {
31.47 + Value operator[](const Edge& e) const {
31.48 switch (e.getSpec()) {
31.49 case 0:
31.50 return (*em)[e];
31.51 @@ -891,7 +891,7 @@
31.52 return (*nm)[e.getNode()];
31.53 }
31.54 }
31.55 - void set(const Edge& e, ValueType t) {
31.56 + void set(const Edge& e, Value t) {
31.57 switch (e.getSpec()) {
31.58 case 0:
31.59 em->set(e, t);
32.1 --- a/src/work/marci/experiment/list_graph.h Sat Nov 13 12:53:28 2004 +0000
32.2 +++ b/src/work/marci/experiment/list_graph.h Sat Nov 13 17:07:10 2004 +0000
32.3 @@ -38,8 +38,8 @@
32.4 const ListGraph& G;
32.5 std::vector<T> container;
32.6 public:
32.7 - typedef T ValueType;
32.8 - typedef Node KeyType;
32.9 + typedef T Value;
32.10 + typedef Node Key;
32.11 NodeMap(const ListGraph& _G) : G(_G), container(G.node_id) { }
32.12 NodeMap(const ListGraph& _G, T a) :
32.13 G(_G), container(G.node_id, a) { }
32.14 @@ -59,8 +59,8 @@
32.15 const ListGraph& G;
32.16 std::vector<T> container;
32.17 public:
32.18 - typedef T ValueType;
32.19 - typedef Edge KeyType;
32.20 + typedef T Value;
32.21 + typedef Edge Key;
32.22 EdgeMap(const ListGraph& _G) : G(_G), container(G.edge_id) { }
32.23 EdgeMap(const ListGraph& _G, T a) :
32.24 G(_G), container(G.edge_id, a) { }
33.1 --- a/src/work/marci/graph_concept.h Sat Nov 13 12:53:28 2004 +0000
33.2 +++ b/src/work/marci/graph_concept.h Sat Nov 13 17:07:10 2004 +0000
33.3 @@ -167,8 +167,8 @@
33.4 template<class T> class NodeMap
33.5 {
33.6 public:
33.7 - typedef T ValueType;
33.8 - typedef Node KeyType;
33.9 + typedef T Value;
33.10 + typedef Node Key;
33.11
33.12 NodeMap(const GraphConcept& g) { }
33.13 NodeMap(const GraphConcept& g, T t) { }
33.14 @@ -205,8 +205,8 @@
33.15 template<class T> class EdgeMap
33.16 {
33.17 public:
33.18 - typedef T ValueType;
33.19 - typedef Edge KeyType;
33.20 + typedef T Value;
33.21 + typedef Edge Key;
33.22
33.23 EdgeMap(const GraphConcept& g) {}
33.24 EdgeMap(const GraphConcept& g, T t) {}
34.1 --- a/src/work/marci/leda/leda_graph_wrapper.h Sat Nov 13 12:53:28 2004 +0000
34.2 +++ b/src/work/marci/leda/leda_graph_wrapper.h Sat Nov 13 17:07:10 2004 +0000
34.3 @@ -261,8 +261,8 @@
34.4 {
34.5 leda_node_map<T> leda_stuff;
34.6 public:
34.7 - typedef T ValueType;
34.8 - typedef Node KeyType;
34.9 + typedef T Value;
34.10 + typedef Node Key;
34.11
34.12 NodeMap(const LedaGraphWrapper &G) : leda_stuff(*(G.l_graph)) {}
34.13 NodeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G.l_graph), t) {}
34.14 @@ -281,8 +281,8 @@
34.15 {
34.16 leda_edge_map<T> leda_stuff;
34.17 public:
34.18 - typedef T ValueType;
34.19 - typedef Edge KeyType;
34.20 + typedef T Value;
34.21 + typedef Edge Key;
34.22
34.23 EdgeMap(const LedaGraphWrapper &G) : leda_stuff(*(G.l_graph)) {}
34.24 EdgeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G.l_graph), t) {}
34.25 @@ -303,8 +303,8 @@
34.26 {
34.27 leda_node_array<T>* leda_stuff;
34.28 public:
34.29 - typedef T ValueType;
34.30 - typedef Node KeyType;
34.31 + typedef T Value;
34.32 + typedef Node Key;
34.33
34.34 NodeMapWrapper(leda_node_array<T>& _leda_stuff) :
34.35 leda_stuff(&_leda_stuff) { }
34.36 @@ -325,8 +325,8 @@
34.37 {
34.38 leda_edge_array<T>* leda_stuff;
34.39 public:
34.40 - typedef T ValueType;
34.41 - typedef Edge KeyType;
34.42 + typedef T Value;
34.43 + typedef Edge Key;
34.44
34.45 EdgeMapWrapper(leda_edge_array<T>& _leda_stuff) :
34.46 leda_stuff(_leda_stuff) { }
35.1 --- a/src/work/peter/edgepathgraph.h Sat Nov 13 12:53:28 2004 +0000
35.2 +++ b/src/work/peter/edgepathgraph.h Sat Nov 13 17:07:10 2004 +0000
35.3 @@ -306,8 +306,8 @@
35.4 template<class T> class NodeMap
35.5 {
35.6 public:
35.7 - typedef T ValueType;
35.8 - typedef Node KeyType;
35.9 + typedef T Value;
35.10 + typedef Node Key;
35.11
35.12 NodeMap(const EdgePathGraph &) {}
35.13 NodeMap(const EdgePathGraph &, T) {}
35.14 @@ -344,8 +344,8 @@
35.15 template<class T> class EdgeMap
35.16 {
35.17 public:
35.18 - typedef T ValueType;
35.19 - typedef Edge KeyType;
35.20 + typedef T Value;
35.21 + typedef Edge Key;
35.22
35.23 EdgeMap(const EdgePathGraph &) {}
35.24 EdgeMap(const EdgePathGraph &, T ) {}
36.1 --- a/src/work/peter/hierarchygraph.h Sat Nov 13 12:53:28 2004 +0000
36.2 +++ b/src/work/peter/hierarchygraph.h Sat Nov 13 17:07:10 2004 +0000
36.3 @@ -433,8 +433,8 @@
36.4 template < class T > class NodeMap
36.5 {
36.6 public:
36.7 - typedef T ValueType;
36.8 - typedef Node KeyType;
36.9 + typedef T Value;
36.10 + typedef Node Key;
36.11
36.12 NodeMap (const HierarchyGraph &)
36.13 {
36.14 @@ -489,8 +489,8 @@
36.15 template < class T > class EdgeMap
36.16 {
36.17 public:
36.18 - typedef T ValueType;
36.19 - typedef Edge KeyType;
36.20 + typedef T Value;
36.21 + typedef Edge Key;
36.22
36.23 EdgeMap (const HierarchyGraph &)
36.24 {
37.1 --- a/src/work/sage_graph.h Sat Nov 13 12:53:28 2004 +0000
37.2 +++ b/src/work/sage_graph.h Sat Nov 13 17:07:10 2004 +0000
37.3 @@ -38,8 +38,8 @@
37.4 const SageGraph& G;
37.5 std::vector<T> container;
37.6 public:
37.7 - typedef T ValueType;
37.8 - typedef Node KeyType;
37.9 + typedef T Value;
37.10 + typedef Node Key;
37.11 NodeMap(const SageGraph& _G) : G(_G), container(G.node_id) { }
37.12 NodeMap(const SageGraph& _G, T a) :
37.13 G(_G), container(G.node_id, a) { }
37.14 @@ -59,8 +59,8 @@
37.15 const SageGraph& G;
37.16 std::vector<T> container;
37.17 public:
37.18 - typedef T ValueType;
37.19 - typedef Edge KeyType;
37.20 + typedef T Value;
37.21 + typedef Edge Key;
37.22 EdgeMap(const SageGraph& _G) : G(_G), container(G.edge_id) { }
37.23 EdgeMap(const SageGraph& _G, T a) :
37.24 G(_G), container(G.edge_id, a) { }