[Lemon-commits] [lemon_svn] alpar: r1377 - in hugo/trunk: . doc src/lemon src/lemon/concept src/test src/work src/work/alpar src/work/athos src/work/athos/old src/work/deba src/work/klao src/work/marci src/work/marci/experiment src/work/marci/leda src/work/peter
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:44:58 CET 2006
Author: alpar
Date: Sat Nov 13 18:07:10 2004
New Revision: 1377
Modified:
hugo/trunk/ChangeLog
hugo/trunk/doc/maps.dox
hugo/trunk/src/lemon/array_map.h
hugo/trunk/src/lemon/concept/graph.h
hugo/trunk/src/lemon/concept/graph_component.h
hugo/trunk/src/lemon/concept/maps.h
hugo/trunk/src/lemon/default_map.h
hugo/trunk/src/lemon/dijkstra.h
hugo/trunk/src/lemon/dimacs.h
hugo/trunk/src/lemon/graph_wrapper.h
hugo/trunk/src/lemon/kruskal.h
hugo/trunk/src/lemon/map_defines.h
hugo/trunk/src/lemon/map_iterator.h
hugo/trunk/src/lemon/maps.h
hugo/trunk/src/lemon/min_cost_flow.h
hugo/trunk/src/lemon/suurballe.h
hugo/trunk/src/lemon/vector_map.h
hugo/trunk/src/lemon/xy.h
hugo/trunk/src/test/sym_graph_test.h
hugo/trunk/src/work/alpar/boolmap_iter.cc
hugo/trunk/src/work/alpar/dijkstra.h
hugo/trunk/src/work/alpar/f_ed_ka.h
hugo/trunk/src/work/alpar/rw_nonref_map.cc
hugo/trunk/src/work/athos/mincostflow.h
hugo/trunk/src/work/athos/old/minlengthpaths.h
hugo/trunk/src/work/athos/union_find.h
hugo/trunk/src/work/deba/dijkstra.h
hugo/trunk/src/work/klao/iter_map.h
hugo/trunk/src/work/marci/augmenting_flow.h
hugo/trunk/src/work/marci/bfs_mm.h
hugo/trunk/src/work/marci/bipartite_graph_wrapper.h
hugo/trunk/src/work/marci/experiment/list_graph.h
hugo/trunk/src/work/marci/graph_concept.h
hugo/trunk/src/work/marci/leda/leda_graph_wrapper.h
hugo/trunk/src/work/peter/edgepathgraph.h
hugo/trunk/src/work/peter/hierarchygraph.h
hugo/trunk/src/work/sage_graph.h
Log:
Naming changes:
- ValueType -> Value
- KeyType -> Key
- ReferenceType ->Reference
- PointerType -> Pointer
Modified: hugo/trunk/ChangeLog
==============================================================================
--- hugo/trunk/ChangeLog (original)
+++ hugo/trunk/ChangeLog Sat Nov 13 18:07:10 2004
@@ -1,3 +1,9 @@
+ * ValueType -> Value, KeyType -> Key, ReferenceType ->Reference,
+ PointerType -> Pointer
+ * target() -> target(), source() -> source()
+ * Graph factory
+ * Right include paths in documentation
+
2004-09-30 Alpar Juttner <alpar at cs.elte.hu>
* Version 0.2 released
Modified: hugo/trunk/doc/maps.dox
==============================================================================
--- hugo/trunk/doc/maps.dox (original)
+++ hugo/trunk/doc/maps.dox Sat Nov 13 18:07:10 2004
@@ -9,8 +9,8 @@
<tt>typedef</tt>'s to determine the types of keys and values, like this:
\code
- typedef Edge KeyType;
- typedef double ValueType;
+ typedef Edge Key;
+ typedef double Value;
\endcode
A map can \e readable (ReadMap, for short), \e writable (WriteMap) or both
@@ -52,7 +52,7 @@
length[e]=3.5;
\endcode
- <em>Writable maps</em> have
-a member function \c set(KeyType,const ValueType &)
+a member function \c set(Key,const Value &)
for this purpose.
\code
length.set(e,3.5);
@@ -82,9 +82,9 @@
\code
struct MyMap
{
- typedef double ValueType;
- typedef Graph::Edge KeyType;
- double operator[](KeyType e) const { return M_PI;}
+ typedef double Value;
+ typedef Graph::Edge Key;
+ double operator[](Key e) const { return M_PI;}
};
\endcode
@@ -95,7 +95,7 @@
\code
struct MyMap : public MapBase<Graph::Edge,double>
{
- ValueType operator[](KeyType e) const { return M_PI;}
+ Value operator[](Key e) const { return M_PI;}
};
\endcode
@@ -111,7 +111,7 @@
const Graph::NodeMap<double> &pot;
public:
- ValueType operator[](KeyType e) const {
+ Value operator[](Key e) const {
return orig_len.get(e)-pot.get(G.target(e))-pot.get(G.source(e));
}
Modified: hugo/trunk/src/lemon/array_map.h
==============================================================================
--- hugo/trunk/src/lemon/array_map.h (original)
+++ hugo/trunk/src/lemon/array_map.h Sat Nov 13 18:07:10 2004
@@ -38,7 +38,7 @@
* the container functionality.
*
* The template parameter is the MapRegistry that the maps
- * will belong to and the ValueType.
+ * will belong to and the Value.
*/
template <typename _Graph,
@@ -52,7 +52,7 @@
/// The graph type of the maps.
typedef _Graph Graph;
/// The key type of the maps.
- typedef _Item KeyType;
+ typedef _Item Key;
typedef AlterationObserverRegistry<_Item> Registry;
@@ -60,8 +60,6 @@
/// The iterator to iterate on the keys.
typedef _ItemIt KeyIt;
- typedef _Value Value;
-
/// The MapBase of the Map which imlements the core regisitry function.
typedef typename Registry::ObserverBase Parent;
@@ -69,18 +67,18 @@
public:
/// The value type of the map.
- typedef Value ValueType;
+ typedef _Value Value;
/// The reference type of the map;
- typedef Value& ReferenceType;
+ typedef Value& Reference;
/// The pointer type of the map;
- typedef Value* PointerType;
+ typedef Value* Pointer;
/// The const value type of the map.
- typedef const Value ConstValueType;
+ typedef const Value ConstValue;
/// The const reference type of the map;
- typedef const Value& ConstReferenceType;
+ typedef const Value& ConstReference;
/// The pointer type of the map;
- typedef const Value* ConstPointerType;
+ typedef const Value* ConstPointer;
private:
@@ -172,7 +170,7 @@
* The subscript operator. The map can be subscripted by the
* actual keys of the graph.
*/
- ReferenceType operator[](const KeyType& key) {
+ Reference operator[](const Key& key) {
int id = graph->id(key);
return values[id];
}
@@ -181,7 +179,7 @@
* The const subscript operator. The map can be subscripted by the
* actual keys of the graph.
*/
- ConstReferenceType operator[](const KeyType& key) const {
+ ConstReference operator[](const Key& key) const {
int id = graph->id(key);
return values[id];
}
@@ -189,13 +187,13 @@
/** Setter function of the map. Equivalent with map[key] = val.
* This is a compatibility feature with the not dereferable maps.
*/
- void set(const KeyType& key, const ValueType& val) {
+ void set(const Key& key, const Value& val) {
(*this)[key] = val;
}
/** Add a new key to the map. It called by the map registry.
*/
- void add(const KeyType& key) {
+ void add(const Key& key) {
int id = graph->id(key);
if (id >= capacity) {
int new_capacity = (capacity == 0 ? 1 : capacity);
@@ -219,7 +217,7 @@
/** Erase a key from the map. It called by the map registry.
*/
- void erase(const KeyType& key) {
+ void erase(const Key& key) {
int id = graph->id(key);
allocator.destroy(&(values[id]));
}
@@ -321,13 +319,13 @@
// // STL compatibility typedefs.
// typedef Iterator iterator;
// typedef ConstIterator const_iterator;
-// typedef typename Iterator::PairValueType value_type;
-// typedef typename Iterator::KeyType key_type;
-// typedef typename Iterator::ValueType data_type;
-// typedef typename Iterator::PairReferenceType reference;
-// typedef typename Iterator::PairPointerType pointer;
-// typedef typename ConstIterator::PairReferenceType const_reference;
-// typedef typename ConstIterator::PairPointerType const_pointer;
+// typedef typename Iterator::PairValue value_type;
+// typedef typename Iterator::Key key_type;
+// typedef typename Iterator::Value data_type;
+// typedef typename Iterator::PairReference reference;
+// typedef typename Iterator::PairPointer pointer;
+// typedef typename ConstIterator::PairReference const_reference;
+// typedef typename ConstIterator::PairPointer const_pointer;
// typedef int difference_type;
};
Modified: hugo/trunk/src/lemon/concept/graph.h
==============================================================================
--- hugo/trunk/src/lemon/concept/graph.h (original)
+++ hugo/trunk/src/lemon/concept/graph.h Sat Nov 13 18:07:10 2004
@@ -567,9 +567,9 @@
// em=cm; //Copy to more complex type
// {
// //Check the typedef's
-// typename Graph::template NodeMap<int>::ValueType val;
+// typename Graph::template NodeMap<int>::Value val;
// val=1;
-// typename Graph::template NodeMap<int>::KeyType key;
+// typename Graph::template NodeMap<int>::Key key;
// key = typename Graph::NodeIt(G);
// }
// }
@@ -591,9 +591,9 @@
// {
// //Check the typedef's
-// typename Graph::template NodeMap<bool>::ValueType val;
+// typename Graph::template NodeMap<bool>::Value val;
// val=true;
-// typename Graph::template NodeMap<bool>::KeyType key;
+// typename Graph::template NodeMap<bool>::Key key;
// key= typename Graph::NodeIt(G);
// }
// }
@@ -614,9 +614,9 @@
// dm=cm; //Copy from another type
// {
// //Check the typedef's
-// typename Graph::template EdgeMap<int>::ValueType val;
+// typename Graph::template EdgeMap<int>::Value val;
// val=1;
-// typename Graph::template EdgeMap<int>::KeyType key;
+// typename Graph::template EdgeMap<int>::Key key;
// key= typename Graph::EdgeIt(G);
// }
// }
@@ -637,9 +637,9 @@
// m=dm; //Copy to another type
// {
// //Check the typedef's
-// typename Graph::template EdgeMap<bool>::ValueType val;
+// typename Graph::template EdgeMap<bool>::Value val;
// val=true;
-// typename Graph::template EdgeMap<bool>::KeyType key;
+// typename Graph::template EdgeMap<bool>::Key key;
// key= typename Graph::EdgeIt(G);
// }
// }
Modified: hugo/trunk/src/lemon/concept/graph_component.h
==============================================================================
--- hugo/trunk/src/lemon/concept/graph_component.h (original)
+++ hugo/trunk/src/lemon/concept/graph_component.h Sat Nov 13 18:07:10 2004
@@ -677,22 +677,22 @@
typedef BaseGraphComponent::Node Node;
typedef BaseGraphComponent::Edge Edge;
- template <typename Value>
- class NodeMap : public ReferenceMap<Node, Value> {
+ template <typename _Value>
+ class NodeMap : public ReferenceMap<Node, _Value> {
public:
NodeMap(const Graph&) {}
- NodeMap(const Graph&, const Value&) {}
+ NodeMap(const Graph&, const _Value&) {}
NodeMap(const NodeMap&) {}
NodeMap& operator=(const NodeMap&) { return *this;}
};
- template <typename Value>
- class EdgeMap : public ReferenceMap<Edge, Value> {
+ template <typename _Value>
+ class EdgeMap : public ReferenceMap<Edge, _Value> {
public:
EdgeMap(const Graph&) {}
- EdgeMap(const Graph&, const Value&) {}
+ EdgeMap(const Graph&, const _Value&) {}
EdgeMap(const EdgeMap&) {}
EdgeMap& operator=(const EdgeMap&) { return *this;}
Modified: hugo/trunk/src/lemon/concept/maps.h
==============================================================================
--- hugo/trunk/src/lemon/concept/maps.h (original)
+++ hugo/trunk/src/lemon/concept/maps.h Sat Nov 13 18:07:10 2004
@@ -36,12 +36,12 @@
{
public:
/// Map's key type.
- typedef K KeyType;
+ typedef K Key;
/// Map's value type. (The type of objects associated with the keys).
- typedef T ValueType;
+ typedef T Value;
/// Returns the value associated with a key.
- ValueType operator[](const KeyType &k) const {return ValueType();}
+ Value operator[](const Key &k) const {return Value();}
///Default constructor
ReadMap() {}
@@ -54,12 +54,12 @@
{
public:
/// Map's key type.
- typedef K KeyType;
+ typedef K Key;
/// Map's value type. (The type of objects associated with the keys).
- typedef T ValueType;
+ typedef T Value;
/// Sets the value associated with a key.
- void set(const KeyType &k,const ValueType &t) {}
+ void set(const Key &k,const Value &t) {}
///Default constructor
WriteMap() {}
@@ -72,14 +72,14 @@
{
public:
/// Map's key type.
- typedef K KeyType;
+ typedef K Key;
/// Map's value type. (The type of objects associated with the keys).
- typedef T ValueType;
+ typedef T Value;
/// Returns the value associated with a key.
- ValueType operator[](const KeyType &k) const {return ValueType();}
+ Value operator[](const Key &k) const {return Value();}
/// Sets the value associated with a key.
- void set(const KeyType &k,const ValueType &t) {}
+ void set(const Key &k,const Value &t) {}
///Default constructor
ReadWriteMap() {}
@@ -92,24 +92,24 @@
{
public:
/// Map's key type.
- typedef K KeyType;
+ typedef K Key;
/// Map's value type. (The type of objects associated with the keys).
- typedef T ValueType;
+ typedef T Value;
protected:
- ValueType tmp;
+ Value tmp;
public:
- typedef ValueType& ReferenceType;
+ typedef Value& Reference;
/// Map's const reference type.
- typedef const ValueType& ConstReferenceType;
+ typedef const Value& ConstReference;
///Returns a reference to the value associated to a key.
- ReferenceType operator[](const KeyType &i) { return tmp; }
+ Reference operator[](const Key &i) { return tmp; }
///Returns a const reference to the value associated to a key.
- ConstReferenceType operator[](const KeyType &i) const
+ ConstReference operator[](const Key &i) const
{ return tmp; }
/// Sets the value associated with a key.
- void set(const KeyType &k,const ValueType &t) { operator[](k)=t; }
+ void set(const Key &k,const Value &t) { operator[](k)=t; }
///Default constructor
ReferenceMap() {}
@@ -149,15 +149,15 @@
template<typename ReadMap>
struct ReadMapConcept {
- typedef typename ReadMap::KeyType KeyType;
- typedef typename ReadMap::ValueType ValueType;
+ typedef typename ReadMap::Key Key;
+ typedef typename ReadMap::Value Value;
void constraints() {
// No constraints for constructor.
- // What are the requirement for the ValueType?
+ // What are the requirement for the Value?
// CopyConstructible? Assignable? None of these?
- ValueType v = m[k];
+ Value v = m[k];
v = m[k];
// FIXME:
@@ -165,13 +165,13 @@
}
ReadMap m;
- KeyType k;
+ Key k;
};
template<typename WriteMap>
struct WriteMapConcept {
- typedef typename WriteMap::KeyType KeyType;
- typedef typename WriteMap::ValueType ValueType;
+ typedef typename WriteMap::Key Key;
+ typedef typename WriteMap::Value Value;
void constraints() {
// No constraints for constructor.
@@ -180,8 +180,8 @@
}
WriteMap m;
- KeyType k;
- ValueType v;
+ Key k;
+ Value v;
};
template<typename ReadWriteMap>
@@ -194,12 +194,12 @@
template<typename ReferenceMap>
struct ReferenceMapConcept {
- typedef typename ReferenceMap::KeyType KeyType;
- typedef typename ReferenceMap::ValueType ValueType;
- typedef typename ReferenceMap::ReferenceType ReferenceType;
+ typedef typename ReferenceMap::Key Key;
+ typedef typename ReferenceMap::Value Value;
+ typedef typename ReferenceMap::Reference Reference;
// What for is this?
- typedef typename ReferenceMap::ConstReferenceType ConstReferenceType;
+ typedef typename ReferenceMap::ConstReference ConstReference;
void constraints() {
function_requires< ReadWriteMapConcept<ReferenceMap> >();
@@ -207,13 +207,13 @@
m[k] = v;
// Or should we require real reference?
// Like this:
- // ValueType &vv = m[k];
+ // Value &vv = m[k];
// ignore_unused_variable_warning(vv);
}
ReferenceMap m;
- KeyType k;
- ValueType v;
+ Key k;
+ Value v;
};
/// \todo GraphMapConceptCheck
@@ -235,7 +235,7 @@
}
const GraphMap &c;
const Graph &g;
- const typename GraphMap::ValueType &t;
+ const typename GraphMap::Value &t;
};
Modified: hugo/trunk/src/lemon/default_map.h
==============================================================================
--- hugo/trunk/src/lemon/default_map.h (original)
+++ hugo/trunk/src/lemon/default_map.h Sat Nov 13 18:07:10 2004
@@ -33,11 +33,11 @@
/** The ArrayMap template class is graph map structure what
* automatically updates the map when a key is added to or erased from
- * the map. This map uses the VectorMap if the ValueType is a primitive
+ * the map. This map uses the VectorMap if the Value is a primitive
* type and the ArrayMap for the other cases.
*
* The template parameter is the MapRegistry that the maps
- * will belong to and the ValueType.
+ * will belong to and the Value.
*/
@@ -147,10 +147,10 @@
typedef DefaultMap<_Graph, _Item, _ItemIt, _Value> Map;
typedef typename Parent::Graph Graph;
- typedef typename Parent::ValueType ValueType;
+ typedef typename Parent::Value Value;
DefaultMap(const Graph& _g) : Parent(_g) {}
- DefaultMap(const Graph& _g, const ValueType& _v) : Parent(_g, _v) {}
+ DefaultMap(const Graph& _g, const Value& _v) : Parent(_g, _v) {}
};
@@ -180,11 +180,11 @@
typedef DefaultMap<Graph, Node, NodeIt, _Value> Parent;
//typedef typename Parent::Graph Graph;
- typedef typename Parent::ValueType ValueType;
+ typedef typename Parent::Value Value;
NodeMap(const Graph& _g)
: Parent(_g) {}
- NodeMap(const Graph& _g, const ValueType& _v)
+ NodeMap(const Graph& _g, const Value& _v)
: Parent(_g, _v) {}
};
@@ -200,11 +200,11 @@
typedef DefaultMap<Graph, Edge, EdgeIt, _Value> Parent;
//typedef typename Parent::Graph Graph;
- typedef typename Parent::ValueType ValueType;
+ typedef typename Parent::Value Value;
EdgeMap(const Graph& _g)
: Parent(_g) {}
- EdgeMap(const Graph& _g, const ValueType& _v)
+ EdgeMap(const Graph& _g, const Value& _v)
: Parent(_g, _v) {}
};
Modified: hugo/trunk/src/lemon/dijkstra.h
==============================================================================
--- hugo/trunk/src/lemon/dijkstra.h (original)
+++ hugo/trunk/src/lemon/dijkstra.h Sat Nov 13 18:07:10 2004
@@ -37,7 +37,7 @@
///so it is easy to change it to any kind of length.
///
///The type of the length is determined by the
- ///\ref concept::ReadMap::ValueType "ValueType" of the length map.
+ ///\ref concept::ReadMap::Value "Value" of the length map.
///
///It is also possible to change the underlying priority heap.
///
@@ -81,7 +81,7 @@
typedef typename Graph::OutEdgeIt OutEdgeIt;
///The type of the length of the edges.
- typedef typename LM::ValueType ValueType;
+ typedef typename LM::Value Value;
///The type of the map that stores the edge lengths.
typedef LM LengthMap;
///\brief The type of the map that stores the last
@@ -91,7 +91,7 @@
///nodes of the shortest paths.
typedef typename Graph::template NodeMap<Node> PredNodeMap;
///The type of the map that stores the dists of the nodes.
- typedef typename Graph::template NodeMap<ValueType> DistMap;
+ typedef typename Graph::template NodeMap<Value> DistMap;
private:
/// Pointer to the underlying graph.
@@ -237,8 +237,8 @@
typename GR::template NodeMap<int> heap_map(*G,-1);
- typedef Heap<Node, ValueType, typename GR::template NodeMap<int>,
- std::less<ValueType> >
+ typedef Heap<Node, Value, typename GR::template NodeMap<int>,
+ std::less<Value> >
HeapType;
HeapType heap(heap_map);
@@ -248,7 +248,7 @@
while ( !heap.empty() ) {
Node v=heap.top();
- ValueType oldvalue=heap[v];
+ Value oldvalue=heap[v];
heap.pop();
distance->set(v, oldvalue);
@@ -281,7 +281,7 @@
///\pre \ref run() must be called before using this function.
///\warning If node \c v in unreachable from the root the return value
///of this funcion is undefined.
- ValueType dist(Node v) const { return (*distance)[v]; }
+ Value dist(Node v) const { return (*distance)[v]; }
///Returns the 'previous edge' of the shortest path tree.
Modified: hugo/trunk/src/lemon/dimacs.h
==============================================================================
--- hugo/trunk/src/lemon/dimacs.h (original)
+++ hugo/trunk/src/lemon/dimacs.h Sat Nov 13 18:07:10 2004
@@ -50,8 +50,8 @@
typename Graph::Node &s, typename Graph::Node &t,
CostMap& cost) {
g.clear();
- typename CapacityMap::ValueType _cap;
- typename CostMap::ValueType _cost;
+ typename CapacityMap::Value _cap;
+ typename CostMap::Value _cost;
char d;
std::string problem;
char c;
Modified: hugo/trunk/src/lemon/graph_wrapper.h
==============================================================================
--- hugo/trunk/src/lemon/graph_wrapper.h (original)
+++ hugo/trunk/src/lemon/graph_wrapper.h Sat Nov 13 18:07:10 2004
@@ -1121,8 +1121,8 @@
template <typename TT> friend class EdgeMap;
typename Graph::template EdgeMap<T> forward_map, backward_map;
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMap(const SubBidirGraphWrapper<Graph,
ForwardFilterMap, BackwardFilterMap>& g) :
@@ -1150,7 +1150,7 @@
backward_map.set(e, a);
}
- typename Graph::template EdgeMap<T>::ConstReferenceType
+ typename Graph::template EdgeMap<T>::ConstReference
operator[](Edge e) const {
if (!e.backward)
return forward_map[e];
@@ -1158,7 +1158,7 @@
return backward_map[e];
}
- typename Graph::template EdgeMap<T>::ReferenceType
+ typename Graph::template EdgeMap<T>::Reference
operator[](Edge e) {
if (!e.backward)
return forward_map[e];
@@ -1345,8 +1345,8 @@
protected:
const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>* res_graph;
public:
- typedef Number ValueType;
- typedef Edge KeyType;
+ typedef Number Value;
+ typedef Edge Key;
ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>&
_res_graph) : res_graph(&_res_graph) { }
Number operator[](const Edge& e) const {
Modified: hugo/trunk/src/lemon/kruskal.h
==============================================================================
--- hugo/trunk/src/lemon/kruskal.h (original)
+++ hugo/trunk/src/lemon/kruskal.h Sat Nov 13 18:07:10 2004
@@ -112,12 +112,12 @@
class NonConstMapWr {
const Map &m;
public:
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
NonConstMapWr(const Map &_m) : m(_m) {}
- template<class KeyType>
- void set(KeyType const& k, ValueType const &v) const { m.set(k,v); }
+ template<class Key>
+ void set(Key const& k, Value const &v) const { m.set(k,v); }
};
template <class GR, class IN, class OUT>
@@ -150,11 +150,11 @@
template<class GR, class Map>
class KruskalMapInput
: public std::vector< std::pair<typename GR::Edge,
- typename Map::ValueType> > {
+ typename Map::Value> > {
public:
typedef std::vector< std::pair<typename GR::Edge,
- typename Map::ValueType> > Parent;
+ typename Map::Value> > Parent;
typedef typename Parent::value_type value_type;
private:
@@ -235,19 +235,19 @@
/// map and the output is a sequence of the tree edges, a special
/// wrapper function exists: \ref kruskalEdgeMap_IteratorOut().
///
- /// \warning Not a regular property map, as it doesn't know its KeyType
+ /// \warning Not a regular property map, as it doesn't know its Key
template<class Iterator>
class KruskalSequenceOutput {
mutable Iterator it;
public:
- typedef bool ValueType;
+ typedef bool Value;
KruskalSequenceOutput(Iterator const &_it) : it(_it) {}
- template<typename KeyType>
- void set(KeyType const& k, bool v) const { if(v) {*it=k; ++it;} }
+ template<typename Key>
+ void set(Key const& k, bool v) const { if(v) {*it=k; ++it;} }
};
template<class Iterator>
@@ -287,7 +287,7 @@
template <class GR, class IN, class RET>
inline
- typename IN::ValueType
+ typename IN::Value
kruskalEdgeMap(GR const& G,
IN const& in,
RET &out) {
@@ -332,7 +332,7 @@
template <class GR, class IN, class RET>
inline
- typename IN::ValueType
+ typename IN::Value
kruskalEdgeMap_IteratorOut(const GR& G,
const IN& in,
RET out)
Modified: hugo/trunk/src/lemon/map_defines.h
==============================================================================
--- hugo/trunk/src/lemon/map_defines.h (original)
+++ hugo/trunk/src/lemon/map_defines.h Sat Nov 13 18:07:10 2004
@@ -51,13 +51,13 @@
* supports this feature it should be fixed.
*/
#define CREATE_NODE_MAP(DynMap) \
-template <typename Value> \
-class NodeMap : public DynMap<NodeMapRegistry, Value> { \
+template <typename _Value> \
+class NodeMap : public DynMap<NodeMapRegistry, _Value> { \
public: \
-typedef DynMap<NodeMapRegistry, Value> Parent; \
+typedef DynMap<NodeMapRegistry, _Value> Parent; \
NodeMap(const typename Parent::Graph& g) \
: Parent(g, g.node_maps) {} \
-NodeMap(const typename Parent::Graph& g, const Value& v) \
+NodeMap(const typename Parent::Graph& g, const _Value& v) \
: Parent(g, g.node_maps, v) {} \
NodeMap(const NodeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
template <typename TT> \
@@ -81,14 +81,14 @@
* supports this feature it should be fixed.
*/
#define CREATE_EDGE_MAP(DynMap) \
-template <typename Value> \
-class EdgeMap : public DynMap<EdgeMapRegistry, Value> { \
+template <typename _Value> \
+class EdgeMap : public DynMap<EdgeMapRegistry, _Value> { \
public: \
-typedef DynMap<EdgeMapRegistry, Value> Parent; \
+typedef DynMap<EdgeMapRegistry, _Value> Parent; \
\
EdgeMap(const typename Parent::Graph& g) \
: Parent(g, g.edge_maps) {} \
-EdgeMap(const typename Parent::Graph& g, const Value& v) \
+EdgeMap(const typename Parent::Graph& g, const _Value& v) \
: Parent(g, g.edge_maps, v) {} \
EdgeMap(const EdgeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
template <typename TT> \
@@ -125,14 +125,14 @@
* supports this feature it should be fixed.
*/
#define CREATE_SYM_EDGE_MAP(DynMap) \
-template <typename Value> \
-class SymEdgeMap : public DynMap<SymEdgeMapRegistry, Value> { \
+template <typename _Value> \
+class SymEdgeMap : public DynMap<SymEdgeMapRegistry, _Value> { \
public: \
-typedef DynMap<SymEdgeMapRegistry, Value> Parent; \
+typedef DynMap<SymEdgeMapRegistry, _Value> Parent; \
\
SymEdgeMap(const typename Parent::Graph& g) \
: Parent(g, g.sym_edge_maps) {} \
-SymEdgeMap(const typename Parent::Graph& g, const Value& v) \
+SymEdgeMap(const typename Parent::Graph& g, const _Value& v) \
: Parent(g, g.sym_edge_maps, v) {} \
SymEdgeMap(const SymEdgeMap& copy) \
: Parent(static_cast<const Parent&>(copy)) {} \
@@ -153,15 +153,15 @@
/** This is a macro to import an node map into a graph class.
*/
#define IMPORT_NODE_MAP(From, from, To, to) \
-template <typename Value> \
-class NodeMap : public From::template NodeMap<Value> { \
+template <typename _Value> \
+class NodeMap : public From::template NodeMap<_Value> { \
\
public: \
-typedef typename From::template NodeMap<Value> Parent; \
+typedef typename From::template NodeMap<_Value> Parent; \
\
NodeMap(const To& to) \
: Parent(static_cast<const From&>(from)) { } \
-NodeMap(const To& to, const Value& value) \
+NodeMap(const To& to, const _Value& value) \
: Parent(static_cast<const From&>(from), value) { } \
NodeMap(const NodeMap& copy) \
: Parent(static_cast<const Parent&>(copy)) {} \
@@ -182,15 +182,15 @@
/** This is a macro to import an edge map into a graph class.
*/
#define IMPORT_EDGE_MAP(From, from, To, to) \
-template <typename Value> \
-class EdgeMap : public From::template EdgeMap<Value> { \
+template <typename _Value> \
+class EdgeMap : public From::template EdgeMap<_Value> { \
\
public: \
-typedef typename From::template EdgeMap<Value> Parent; \
+typedef typename From::template EdgeMap<_Value> Parent; \
\
EdgeMap(const To& to) \
: Parent(static_cast<const From&>(from)) { } \
-EdgeMap(const To& to, const Value& value) \
+EdgeMap(const To& to, const _Value& value) \
: Parent(static_cast<const From&>(from), value) { } \
EdgeMap(const EdgeMap& copy) \
: Parent(static_cast<const Parent&>(copy)) {} \
Modified: hugo/trunk/src/lemon/map_iterator.h
==============================================================================
--- hugo/trunk/src/lemon/map_iterator.h (original)
+++ hugo/trunk/src/lemon/map_iterator.h Sat Nov 13 18:07:10 2004
@@ -41,23 +41,23 @@
public:
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
protected:
@@ -104,33 +104,33 @@
typedef MapIteratorBase<Map> Base;
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
public:
/// The value type of the iterator.
- typedef extended_pair<KeyType, const KeyType&,
- ValueType, const ValueType&> PairValueType;
+ typedef extended_pair<Key, const Key&,
+ Value, const Value&> PairValue;
/// The reference type of the iterator.
- typedef extended_pair<const KeyType&, const KeyType&,
- ReferenceType, ReferenceType> PairReferenceType;
+ typedef extended_pair<const Key&, const Key&,
+ Reference, Reference> PairReference;
/// Default constructor.
MapIterator() {}
@@ -140,24 +140,24 @@
MapIterator(Map& pmap, const KeyIt& pit) : Base(pit), map(&pmap) {}
/// Dereference operator for the iterator.
- PairReferenceType operator*() {
- return PairReferenceType(Base::it, (*map)[Base::it]);
+ PairReference operator*() {
+ return PairReference(Base::it, (*map)[Base::it]);
}
/// The pointer type of the iterator.
- class PairPointerType {
+ class PairPointer {
friend class MapIterator;
private:
- PairReferenceType data;
- PairPointerType(const KeyType& key, ReferenceType val)
+ PairReference data;
+ PairPointer(const Key& key, Reference val)
: data(key, val) {}
public:
- PairReferenceType* operator->() {return &data;}
+ PairReference* operator->() {return &data;}
};
/// Arrow operator for the iterator.
- PairPointerType operator->() {
- return PairPointerType(Base::it, ((*map)[Base::it]));
+ PairPointer operator->() {
+ return PairPointer(Base::it, ((*map)[Base::it]));
}
/// The pre increment operator of the iterator.
@@ -180,9 +180,9 @@
// STL compatibility typedefs.
typedef std::forward_iterator_tag iterator_category;
typedef int difference_type;
- typedef PairValueType value_type;
- typedef PairReferenceType reference;
- typedef PairPointerType pointer;
+ typedef PairValue value_type;
+ typedef PairReference reference;
+ typedef PairPointer pointer;
};
/** Compatible iterator with the stl maps' iterators.
@@ -197,23 +197,23 @@
typedef MapIteratorBase<Map> Base;
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
public:
@@ -232,32 +232,32 @@
}
/// The value type of the iterator.
- typedef extended_pair<KeyType, const KeyType&,
- ValueType, const ValueType&> PairValueType;
+ typedef extended_pair<Key, const Key&,
+ Value, const Value&> PairValue;
/// The reference type of map.
- typedef extended_pair<const KeyType&, const KeyType&,
- ConstReferenceType, ConstReferenceType> PairReferenceType;
+ typedef extended_pair<const Key&, const Key&,
+ ConstReference, ConstReference> PairReference;
/// Dereference operator for the iterator.
- PairReferenceType operator*() {
- return PairReferenceType(Base::it, (*map)[Base::it]);
+ PairReference operator*() {
+ return PairReference(Base::it, (*map)[Base::it]);
}
/// The pointer type of the iterator.
- class PairPointerType {
+ class PairPointer {
friend class MapConstIterator;
private:
- PairReferenceType data;
- PairPointerType(const KeyType& key, ConstReferenceType val)
+ PairReference data;
+ PairPointer(const Key& key, ConstReference val)
: data(key, val) {}
public:
- PairReferenceType* operator->() {return &data;}
+ PairReference* operator->() {return &data;}
};
/// Arrow operator for the iterator.
- PairPointerType operator->() {
- return PairPointerType(Base::it, (*map)[Base::it]);
+ PairPointer operator->() {
+ return PairPointer(Base::it, (*map)[Base::it]);
}
/// The pre increment operator of the iterator.
@@ -280,9 +280,9 @@
// STL compatibility typedefs.
typedef std::input_iterator_tag iterator_category;
typedef int difference_type;
- typedef PairValueType value_type;
- typedef PairReferenceType reference;
- typedef PairPointerType pointer;
+ typedef PairValue value_type;
+ typedef PairReference reference;
+ typedef PairPointer pointer;
};
/** The class makes the KeyIt to an stl compatible iterator
@@ -297,7 +297,7 @@
typedef MapIteratorBase<Map> Base;
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
@@ -323,17 +323,17 @@
}
/// The dereferencing operator of the iterator.
- KeyType operator*() const {
- return static_cast<KeyType>(Base::it);
+ Key operator*() const {
+ return static_cast<Key>(Base::it);
}
public:
// STL compatibility typedefs.
typedef std::input_iterator_tag iterator_category;
typedef int difference_type;
- typedef KeyType value_type;
- typedef const KeyType& reference;
- typedef const KeyType* pointer;
+ typedef Key value_type;
+ typedef const Key& reference;
+ typedef const Key* pointer;
};
template <typename Map> class MapConstValueIterator;
@@ -352,24 +352,24 @@
typedef MapIteratorBase<Map> Base;
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
private:
@@ -399,12 +399,12 @@
}
/// The dereferencing operator of the iterator.
- ReferenceType operator*() const {
+ Reference operator*() const {
return (*map)[Base::it];
}
/// The arrow operator of the iterator.
- PointerType operator->() const {
+ Pointer operator->() const {
return &(operator*());
}
@@ -412,9 +412,9 @@
// STL compatibility typedefs.
typedef std::forward_iterator_tag iterator_category;
typedef int difference_type;
- typedef ValueType value_type;
- typedef ReferenceType reference;
- typedef PointerType pointer;
+ typedef Value value_type;
+ typedef Reference reference;
+ typedef Pointer pointer;
};
/** MapValueIterator creates an stl compatible iterator
@@ -430,23 +430,23 @@
typedef MapIteratorBase<Map> Base;
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
private:
@@ -481,12 +481,12 @@
}
/// The dereferencing operator of the iterator.
- ConstReferenceType operator*() const {
+ ConstReference operator*() const {
return (*map)[Base::it];
}
/// The arrow operator of the iterator.
- ConstPointerType operator->() const {
+ ConstPointer operator->() const {
return &(operator*());
}
@@ -494,9 +494,9 @@
// STL compatibility typedefs.
typedef std::input_iterator_tag iterator_category;
typedef int difference_type;
- typedef ValueType value_type;
- typedef ConstReferenceType reference;
- typedef ConstPointerType pointer;
+ typedef Value value_type;
+ typedef ConstReference reference;
+ typedef ConstPointer pointer;
};
@@ -511,24 +511,24 @@
public:
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
/// The map initialized const key set.
MapConstKeySet(const Map& pmap) : map(&pmap) {}
@@ -548,10 +548,10 @@
public:
// STL compatibility typedefs.
- typedef ValueType value_type;
+ typedef Value value_type;
typedef ConstIterator const_iterator;
- typedef ConstReferenceType const_reference;
- typedef ConstPointerType const_pointer;
+ typedef ConstReference const_reference;
+ typedef ConstPointer const_pointer;
typedef int difference_type;
};
@@ -567,24 +567,24 @@
public:
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
/// The map initialized const value set.
MapConstValueSet(const Map& pmap) : map(&pmap) {}
@@ -604,10 +604,10 @@
public:
// STL compatibility typedefs.
- typedef ValueType value_type;
+ typedef Value value_type;
typedef ConstIterator const_iterator;
- typedef ConstReferenceType const_reference;
- typedef ConstPointerType const_pointer;
+ typedef ConstReference const_reference;
+ typedef ConstPointer const_pointer;
typedef int difference_type;
};
@@ -624,24 +624,24 @@
public:
/// The key type of the iterator.
- typedef typename Map::KeyType KeyType;
+ typedef typename Map::Key Key;
/// The iterator to iterate on the keys.
typedef typename Map::KeyIt KeyIt;
/// The value type of the iterator.
- typedef typename Map::ValueType ValueType;
+ typedef typename Map::Value Value;
/// The reference type of the iterator.
- typedef typename Map::ReferenceType ReferenceType;
+ typedef typename Map::Reference Reference;
/// The pointer type of the iterator.
- typedef typename Map::PointerType PointerType;
+ typedef typename Map::Pointer Pointer;
/// The const value type of the iterator.
- typedef typename Map::ConstValueType ConstValueType;
+ typedef typename Map::ConstValue ConstValue;
/// The const reference type of the iterator.
- typedef typename Map::ConstReferenceType ConstReferenceType;
+ typedef typename Map::ConstReference ConstReference;
/// The pointer type of the iterator.
- typedef typename Map::ConstPointerType ConstPointerType;
+ typedef typename Map::ConstPointer ConstPointer;
/// The map initialized value set.
MapValueSet(Map& pmap) : map(&pmap) {}
@@ -674,13 +674,13 @@
public:
// STL compatibility typedefs.
- typedef ValueType value_type;
+ typedef Value value_type;
typedef Iterator iterator;
typedef ConstIterator const_iterator;
- typedef ReferenceType reference;
- typedef ConstReferenceType const_reference;
- typedef PointerType pointer;
- typedef ConstPointerType const_pointer;
+ typedef Reference reference;
+ typedef ConstReference const_reference;
+ typedef Pointer pointer;
+ typedef ConstPointer const_pointer;
typedef int difference_type;
};
Modified: hugo/trunk/src/lemon/maps.h
==============================================================================
--- hugo/trunk/src/lemon/maps.h (original)
+++ hugo/trunk/src/lemon/maps.h Sat Nov 13 18:07:10 2004
@@ -36,9 +36,9 @@
{
public:
///\e
- typedef K KeyType;
+ typedef K Key;
///\e
- typedef T ValueType;
+ typedef T Value;
};
/// Null map. (a.k.a. DoNothingMap)
@@ -108,20 +108,20 @@
/// \c std::map wrapper
/// This is essentially a wrapper for \c std::map. With addition that
- /// you can specify a default value different from \c ValueType() .
+ /// you can specify a default value different from \c Value() .
///
/// \todo Provide allocator parameter...
- template <typename Key, typename T, typename Compare = std::less<Key> >
- class StdMap : public std::map<Key,T,Compare> {
- typedef std::map<Key,T,Compare> parent;
+ template <typename K, typename T, typename Compare = std::less<K> >
+ class StdMap : public std::map<K,T,Compare> {
+ typedef std::map<K,T,Compare> parent;
T v;
typedef typename parent::value_type PairType;
public:
- typedef Key KeyType;
- typedef T ValueType;
- typedef T& ReferenceType;
- typedef const T& ConstReferenceType;
+ typedef K Key;
+ typedef T Value;
+ typedef T& Reference;
+ typedef const T& ConstReference;
StdMap() : v() {}
@@ -143,10 +143,10 @@
//FIXME;
}
- ReferenceType operator[](const Key &k) {
+ Reference operator[](const Key &k) {
return insert(PairType(k,v)).first -> second;
}
- ConstReferenceType operator[](const Key &k) const {
+ ConstReference operator[](const Key &k) const {
typename parent::iterator i = lower_bound(k);
if (i == parent::end() || parent::key_comp()(k, (*i).first))
return v;
Modified: hugo/trunk/src/lemon/min_cost_flow.h
==============================================================================
--- hugo/trunk/src/lemon/min_cost_flow.h (original)
+++ hugo/trunk/src/lemon/min_cost_flow.h Sat Nov 13 18:07:10 2004
@@ -59,10 +59,10 @@
template <typename Graph, typename LengthMap, typename CapacityMap>
class MinCostFlow {
- typedef typename LengthMap::ValueType Length;
+ typedef typename LengthMap::Value Length;
//Warning: this should be integer type
- typedef typename CapacityMap::ValueType Capacity;
+ typedef typename CapacityMap::Value Capacity;
typedef typename Graph::Node Node;
typedef typename Graph::NodeIt NodeIt;
@@ -94,14 +94,14 @@
const LengthMap &length;
const NodeMap &pot;
public :
- typedef typename LengthMap::KeyType KeyType;
- typedef typename LengthMap::ValueType ValueType;
+ typedef typename LengthMap::Key Key;
+ typedef typename LengthMap::Value Value;
ModLengthMap(const ResGW& _g,
const LengthMap &_length, const NodeMap &_pot) :
g(_g), /*rev(_rev),*/ length(_length), pot(_pot) { }
- ValueType operator[](typename ResGW::Edge e) const {
+ Value operator[](typename ResGW::Edge e) const {
if (g.forward(e))
return length[e]-(pot[g.target(e)]-pot[g.source(e)]);
else
Modified: hugo/trunk/src/lemon/suurballe.h
==============================================================================
--- hugo/trunk/src/lemon/suurballe.h (original)
+++ hugo/trunk/src/lemon/suurballe.h Sat Nov 13 18:07:10 2004
@@ -58,7 +58,7 @@
class Suurballe{
- typedef typename LengthMap::ValueType Length;
+ typedef typename LengthMap::Value Length;
typedef typename Graph::Node Node;
typedef typename Graph::NodeIt NodeIt;
Modified: hugo/trunk/src/lemon/vector_map.h
==============================================================================
--- hugo/trunk/src/lemon/vector_map.h (original)
+++ hugo/trunk/src/lemon/vector_map.h Sat Nov 13 18:07:10 2004
@@ -53,7 +53,7 @@
/// The graph type of the map.
typedef _Graph Graph;
/// The key type of the map.
- typedef _Item KeyType;
+ typedef _Item Key;
/// The id map type of the map.
typedef AlterationObserverRegistry<_Item> Registry;
/// The value type of the map.
@@ -71,19 +71,17 @@
public:
- /// The value type of the map.
- typedef Value ValueType;
/// The reference type of the map;
- typedef typename Container::reference ReferenceType;
+ typedef typename Container::reference Reference;
/// The pointer type of the map;
- typedef typename Container::pointer PointerType;
+ typedef typename Container::pointer Pointer;
/// The const value type of the map.
- typedef const Value ConstValueType;
+ typedef const Value ConstValue;
/// The const reference type of the map;
- typedef typename Container::const_reference ConstReferenceType;
+ typedef typename Container::const_reference ConstReference;
/// The pointer type of the map;
- typedef typename Container::const_pointer ConstPointerType;
+ typedef typename Container::const_pointer ConstPointer;
/// Constructor to attach the new map into the registry.
@@ -150,7 +148,7 @@
/// The subscript operator. The map can be subscripted by the
/// actual items of the graph.
- ReferenceType operator[](const KeyType& key) {
+ Reference operator[](const Key& key) {
return container[graph->id(key)];
}
@@ -159,7 +157,7 @@
/// The const subscript operator. The map can be subscripted by the
/// actual items of the graph.
- ConstReferenceType operator[](const KeyType& key) const {
+ ConstReference operator[](const Key& key) const {
return container[graph->id(key)];
}
@@ -169,7 +167,7 @@
/// It the same as operator[](key) = value expression.
///
- void set(const KeyType& key, const ValueType& value) {
+ void set(const Key& key, const Value& value) {
(*this)[key] = value;
}
@@ -178,7 +176,7 @@
/// It adds a new key to the map. It called by the observer registry
/// and it overrides the add() member function of the observer base.
- void add(const KeyType& key) {
+ void add(const Key& key) {
int id = graph->id(key);
if (id >= (int)container.size()) {
container.resize(id + 1);
@@ -189,7 +187,7 @@
/// Erase a key from the map. It called by the observer registry
/// and it overrides the erase() member function of the observer base.
- void erase(const KeyType&) {}
+ void erase(const Key&) {}
/// Buildes the map.
Modified: hugo/trunk/src/lemon/xy.h
==============================================================================
--- hugo/trunk/src/lemon/xy.h (original)
+++ hugo/trunk/src/lemon/xy.h Sat Nov 13 18:07:10 2004
@@ -50,7 +50,7 @@
public:
- typedef T ValueType;
+ typedef T Value;
T x,y;
Modified: hugo/trunk/src/test/sym_graph_test.h
==============================================================================
--- hugo/trunk/src/test/sym_graph_test.h (original)
+++ hugo/trunk/src/test/sym_graph_test.h Sat Nov 13 18:07:10 2004
@@ -95,9 +95,9 @@
dm=cm; //Copy from another type
{
//Check the typedef's
- typename Graph::template SymEdgeMap<int>::ValueType val;
+ typename Graph::template SymEdgeMap<int>::Value val;
val = 1;
- typename Graph::template SymEdgeMap<int>::KeyType key;
+ typename Graph::template SymEdgeMap<int>::Key key;
key = typename Graph::SymEdgeIt(G);
}
}
@@ -118,9 +118,9 @@
m=dm; //Copy to another type
{
//Check the typedef's
- typename Graph::template SymEdgeMap<bool>::ValueType val;
+ typename Graph::template SymEdgeMap<bool>::Value val;
val=true;
- typename Graph::template SymEdgeMap<bool>::KeyType key;
+ typename Graph::template SymEdgeMap<bool>::Key key;
key= typename Graph::SymEdgeIt(G);
}
}
Modified: hugo/trunk/src/work/alpar/boolmap_iter.cc
==============================================================================
--- hugo/trunk/src/work/alpar/boolmap_iter.cc (original)
+++ hugo/trunk/src/work/alpar/boolmap_iter.cc Sat Nov 13 18:07:10 2004
@@ -13,8 +13,8 @@
typedef GG Graph;
typedef typename GG::Edge Edge;
- typedef Edge KeyType;
- typedef bool ValueType;
+ typedef Edge Key;
+ typedef bool Value;
friend class RefType;
friend class FalseIterator;
@@ -67,12 +67,12 @@
public:
RefType(BoolIterEdgeMap &_M,Edge _e) : M(_M), e(_e) { }
- operator ValueType() const
+ operator Value() const
{
return M.isTrue(e);
}
- ValueType operator = (ValueType v) const
+ Value operator = (Value v) const
{
if(v) M.setTrue(e);
else M.setFalse(e);
Modified: hugo/trunk/src/work/alpar/dijkstra.h
==============================================================================
--- hugo/trunk/src/work/alpar/dijkstra.h (original)
+++ hugo/trunk/src/work/alpar/dijkstra.h Sat Nov 13 18:07:10 2004
@@ -46,7 +46,7 @@
///
typedef LM LengthMap;
//The type of the length of the edges.
- typedef typename LM::ValueType ValueType;
+ typedef typename LM::Value Value;
///The heap type used by Dijkstra algorithm.
///The heap type used by Dijkstra algorithm.
@@ -54,9 +54,9 @@
///\sa BinHeap
///\sa Dijkstra
typedef BinHeap<typename Graph::Node,
- typename LM::ValueType,
+ typename LM::Value,
typename GR::template NodeMap<int>,
- std::less<ValueType> > Heap;
+ std::less<Value> > Heap;
///\brief The type of the map that stores the last
///edges of the shortest paths.
@@ -90,7 +90,7 @@
///It must meet the \ref concept::WriteMap "WriteMap" concept.
///
- typedef typename Graph::template NodeMap<typename LM::ValueType> DistMap;
+ typedef typename Graph::template NodeMap<typename LM::Value> DistMap;
///Instantiates a DistMap.
///\todo Please document...
@@ -109,7 +109,7 @@
///so it is easy to change it to any kind of length.
///
///The type of the length is determined by the
- ///\ref concept::ReadMap::ValueType "ValueType" of the length map.
+ ///\ref concept::ReadMap::Value "Value" of the length map.
///
///It is also possible to change the underlying priority heap.
///
@@ -158,7 +158,7 @@
typedef typename Graph::OutEdgeIt OutEdgeIt;
///The type of the length of the edges.
- typedef typename TR::LengthMap::ValueType ValueType;
+ typedef typename TR::LengthMap::Value Value;
///The type of the map that stores the edge lengths.
typedef typename TR::LengthMap LengthMap;
///\brief The type of the map that stores the last
@@ -387,7 +387,7 @@
while ( !heap.empty() ) {
Node v=heap.top();
- ValueType oldvalue=heap[v];
+ Value oldvalue=heap[v];
heap.pop();
distance->set(v, oldvalue);
@@ -420,7 +420,7 @@
///\pre \ref run() must be called before using this function.
///\warning If node \c v in unreachable from the root the return value
///of this funcion is undefined.
- ValueType dist(Node v) const { return (*distance)[v]; }
+ Value dist(Node v) const { return (*distance)[v]; }
///Returns the 'previous edge' of the shortest path tree.
@@ -497,7 +497,7 @@
///The type of the map that stores the edge lengths.
typedef typename TR::LengthMap LengthMap;
///The type of the length of the edges.
- typedef typename LengthMap::ValueType ValueType;
+ typedef typename LengthMap::Value Value;
///\brief The type of the map that stores the last
///edges of the shortest paths.
typedef typename TR::PredMap PredMap;
Modified: hugo/trunk/src/work/alpar/f_ed_ka.h
==============================================================================
--- hugo/trunk/src/work/alpar/f_ed_ka.h (original)
+++ hugo/trunk/src/work/alpar/f_ed_ka.h Sat Nov 13 18:07:10 2004
@@ -13,7 +13,7 @@
namespace lemon {
template <typename Graph, typename FlowMap, typename CapacityMap>
- typename FlowMap::ValueType maxFlow(Graph &G,
+ typename FlowMap::Value maxFlow(Graph &G,
FlowMap &f,
CapacityMap &c,
typename Graph::NodeIt s,
@@ -25,7 +25,7 @@
typedef typename Graph::EachEdgeIt EachEdgeIt;
typedef typename Graph::OutEdgeIt OutEdgeIt;
typedef typename Graph::InEdgeIt InEdgeIt;
- typedef typename FlowMap::ValueType T;
+ typedef typename FlowMap::Value T;
T flow_val = 0;
T aug_val;
Modified: hugo/trunk/src/work/alpar/rw_nonref_map.cc
==============================================================================
--- hugo/trunk/src/work/alpar/rw_nonref_map.cc (original)
+++ hugo/trunk/src/work/alpar/rw_nonref_map.cc Sat Nov 13 18:07:10 2004
@@ -10,8 +10,8 @@
typedef GG Graph;
typedef typename GG::Edge Edge;
- typedef Edge KeyType;
- typedef TT ValueType;
+ typedef Edge Key;
+ typedef TT Value;
class RefType
{
@@ -20,15 +20,15 @@
public:
RefType(Graph &_G,Edge _e) : G(_G), e(_e) { }
- operator ValueType() const
+ operator Value() const
{
- ValueType tmp;
+ Value tmp;
std::cout << G.id(G.source(e)) << "->"
<< G.id(G.target(e)) << ": ";
std::cin >> tmp;
return tmp;
}
- ValueType operator = (ValueType v) const
+ Value operator = (Value v) const
{
std::cout << G.id(G.source(e)) << "->"
<< G.id(G.target(e)) << ": " << v << '\n';
@@ -47,23 +47,23 @@
class NullMap
{
public:
- typedef K KeyType;
- typedef T ValueType;
+ typedef K Key;
+ typedef T Value;
class RefType
{
- ValueType val;
+ Value val;
public:
- RefType(ValueType v) : val(v) { }
- operator ValueType() const { return val; }
- ValueType operator = (ValueType v) const { return val; }
+ RefType(Value v) : val(v) { }
+ operator Value() const { return val; }
+ Value operator = (Value v) const { return val; }
};
private:
- ValueType val;
+ Value val;
public:
- NullMap(ValueType v) : val(v) { }
- RefType operator[] (KeyType e) const { return RefType(v);}
+ NullMap(Value v) : val(v) { }
+ RefType operator[] (Key e) const { return RefType(v);}
};
int main()
Modified: hugo/trunk/src/work/athos/mincostflow.h
==============================================================================
--- hugo/trunk/src/work/athos/mincostflow.h (original)
+++ hugo/trunk/src/work/athos/mincostflow.h Sat Nov 13 18:07:10 2004
@@ -43,10 +43,10 @@
template <typename Graph, typename CostMap, typename SupplyDemandMap>
class MinCostFlow {
- typedef typename CostMap::ValueType Cost;
+ typedef typename CostMap::Value Cost;
- typedef typename SupplyDemandMap::ValueType SupplyDemand;
+ typedef typename SupplyDemandMap::Value SupplyDemand;
typedef typename Graph::Node Node;
typedef typename Graph::NodeIt NodeIt;
@@ -68,10 +68,10 @@
const CostMap &ol;
const NodeMap &pot;
public :
- typedef typename CostMap::KeyType KeyType;
- typedef typename CostMap::ValueType ValueType;
+ typedef typename CostMap::Key Key;
+ typedef typename CostMap::Value Value;
- ValueType operator[](typename ResGraph::Edge e) const {
+ Value operator[](typename ResGraph::Edge e) const {
if (res_graph.forward(e))
return ol[e]-(pot[res_graph.target(e)]-pot[res_graph.source(e)]);
else
Modified: hugo/trunk/src/work/athos/old/minlengthpaths.h
==============================================================================
--- hugo/trunk/src/work/athos/old/minlengthpaths.h (original)
+++ hugo/trunk/src/work/athos/old/minlengthpaths.h Sat Nov 13 18:07:10 2004
@@ -30,7 +30,7 @@
template <typename Graph, typename LengthMap>
class MinLengthPaths {
- typedef typename LengthMap::ValueType Length;
+ typedef typename LengthMap::Value Length;
typedef typename Graph::Node Node;
typedef typename Graph::NodeIt NodeIt;
@@ -49,10 +49,10 @@
const LengthMap &ol;
const NodeMap &pot;
public :
- typedef typename LengthMap::KeyType KeyType;
- typedef typename LengthMap::ValueType ValueType;
+ typedef typename LengthMap::Key Key;
+ typedef typename LengthMap::Value Value;
- ValueType operator[](typename ResGraphType::Edge e) const {
+ Value operator[](typename ResGraphType::Edge e) const {
//if ( (1-2*rev[e])*ol[e]-(pot[G.target(e)]-pot[G.source(e)] ) <0 ){
// std::cout<<"Negative length!!"<<std::endl;
//}
Modified: hugo/trunk/src/work/athos/union_find.h
==============================================================================
--- hugo/trunk/src/work/athos/union_find.h (original)
+++ hugo/trunk/src/work/athos/union_find.h Sat Nov 13 18:07:10 2004
@@ -15,7 +15,7 @@
namespace lemon {
- template <typename KeyType, typename KeyIntMap>
+ template <typename Key, typename KeyIntMap>
class UnionFind {
KeyIntMap& pointmap;
struct VectorElementType {
@@ -34,7 +34,7 @@
}
//Give a component of one point to the structure
- int addPoint(KeyType u){
+ int addPoint(Key u){
int _index = container.size();
VectorElementType buf(_index,1);
container.push_back(buf);
@@ -43,7 +43,7 @@
//Finds the big boss of u
- int find(KeyType u){
+ int find(Key u){
if (pointmap.get(u)==-1){
int whoami = addPoint(u);
pointmap.set(u, whoami);
@@ -61,7 +61,7 @@
}
//Finds u and v in the structures and merges the comopnents, if not equal
- bool findAndMerge(KeyType u,KeyType v){
+ bool findAndMerge(Key u,Key v){
int bu = find(u);
int bv = find(v);
if (bu != bv){
Modified: hugo/trunk/src/work/deba/dijkstra.h
==============================================================================
--- hugo/trunk/src/work/deba/dijkstra.h (original)
+++ hugo/trunk/src/work/deba/dijkstra.h Sat Nov 13 18:07:10 2004
@@ -21,7 +21,7 @@
///\ref ReadMap "readable map",
///so it is easy to change it to any kind of length.
///
- ///The type of the length is determined by the \c ValueType of the length map.
+ ///The type of the length is determined by the \c Value of the length map.
///
///It is also possible to change the underlying priority heap.
///
@@ -59,7 +59,7 @@
typedef typename Graph::OutEdgeIt OutEdgeIt;
///The type of the length of the edges.
- typedef typename LM::ValueType ValueType;
+ typedef typename LM::Value Value;
///The type of the map that stores the edge lengths.
typedef LM LengthMap;
///\brief The type of the map that stores the last
@@ -69,7 +69,7 @@
///nodes of the shortest paths.
typedef typename Graph::template NodeMap<Node> PredNodeMap;
///The type of the map that stores the dists of the nodes.
- typedef typename Graph::template NodeMap<ValueType> DistMap;
+ typedef typename Graph::template NodeMap<Value> DistMap;
private:
const Graph *G;
@@ -216,8 +216,8 @@
typename GR::template NodeMap<int> heap_map(*G,-1);
- typedef Heap<Node, ValueType, typename GR::template NodeMap<int>,
- std::less<ValueType> >
+ typedef Heap<Node, Value, typename GR::template NodeMap<int>,
+ std::less<Value> >
HeapType;
HeapType heap(heap_map);
@@ -227,7 +227,7 @@
while ( !heap.empty() ) {
Node v=heap.top();
- ValueType oldvalue=heap[v];
+ Value oldvalue=heap[v];
heap.pop();
distance->set(v, oldvalue);
@@ -261,7 +261,7 @@
///\pre \ref run() must be called before using this function.
///\warning If node \c v in unreachable from the root the return value
///of this funcion is undefined.
- ValueType dist(Node v) const { return (*distance)[v]; }
+ Value dist(Node v) const { return (*distance)[v]; }
///Returns the 'previous edge' of the shortest path tree.
Modified: hugo/trunk/src/work/klao/iter_map.h
==============================================================================
--- hugo/trunk/src/work/klao/iter_map.h (original)
+++ hugo/trunk/src/work/klao/iter_map.h Sat Nov 13 18:07:10 2004
@@ -25,14 +25,14 @@
class IterableMap {
public:
- typedef typename KeyIntMap::KeyType KeyType;
- typedef Val ValueType;
+ typedef typename KeyIntMap::Key Key;
+ typedef Val Value;
- typedef typename std::vector<KeyType>::const_iterator iterator;
+ typedef typename std::vector<Key>::const_iterator iterator;
protected:
KeyIntMap &base;
- std::vector<KeyType> data;
+ std::vector<Key> data;
size_t bounds[N];
Val def_val;
@@ -55,7 +55,7 @@
size_t move(size_t a, uint8_t m, uint8_t n) {
if(m != n) {
size_t orig_a = a;
- KeyType orig_key = data[a];
+ Key orig_key = data[a];
while(m > n) {
--m;
half_swap(a, bounds[m]++);
@@ -80,11 +80,11 @@
// for(int i=0; i<N; ++i) { bounds[i]=0; }
}
- Val operator[](const KeyType& k) const {
+ Val operator[](const Key& k) const {
return find(base[k]);
}
- void set(const KeyType& k, Val n) {
+ void set(const Key& k, Val n) {
// FIXME: range check?
size_t a = base[k];
if(a < bounds[N-1]) {
@@ -95,14 +95,14 @@
}
}
- void insert(const KeyType& k, Val n) {
+ void insert(const Key& k, Val n) {
data.push_back(k);
base.set(k, move(bounds[N-1]++, N-1, n));
}
/// This func is not very usable, but necessary to implement
/// dynamic map behaviour.
- void remove(const KeyType& k) {
+ void remove(const Key& k) {
size_t a = base[k];
if(a < bounds[N-1]) {
move(a, find(a), N);
@@ -130,7 +130,7 @@
/// For use as an iterator...
- KeyType& first(KeyType &k, Val n) {
+ Key& first(Key &k, Val n) {
size_t i = (n ? bounds[n-1] : 0);
if( i < bounds[n] ) {
k = data[i];
@@ -142,7 +142,7 @@
}
/// For use as an iterator...
- KeyType& next(KeyType &k) {
+ Key& next(Key &k) {
size_t i = base[k];
uint8_t n = find(i);
++i;
Modified: hugo/trunk/src/work/marci/augmenting_flow.h
==============================================================================
--- hugo/trunk/src/work/marci/augmenting_flow.h (original)
+++ hugo/trunk/src/work/marci/augmenting_flow.h Sat Nov 13 18:07:10 2004
@@ -112,8 +112,8 @@
IntMap* map;
int* number_of_augmentations;
public:
- typedef Node KeyType;
- typedef bool ValueType;
+ typedef Node Key;
+ typedef bool Value;
TrickyReachedMap(IntMap& _map, int& _number_of_augmentations) :
map(&_map), number_of_augmentations(&_number_of_augmentations) { }
void set(const Node& n, bool b) {
Modified: hugo/trunk/src/work/marci/bfs_mm.h
==============================================================================
--- hugo/trunk/src/work/marci/bfs_mm.h (original)
+++ hugo/trunk/src/work/marci/bfs_mm.h Sat Nov 13 18:07:10 2004
@@ -140,7 +140,7 @@
const ReachedMap& reachedMap() const { return *reached_map; }
/// Guess what?
/// \deprecated
- typename ReachedMap::ValueType reached(const Node& n) const {
+ typename ReachedMap::Value reached(const Node& n) const {
return (*reached_map)[n];
}
/// Guess what?
@@ -242,7 +242,7 @@
const PredMap& predMap() const { return *pred_map; }
/// Guess what?
/// \deprecated
- typename PredMap::ValueType pred(const Node& n) const {
+ typename PredMap::Value pred(const Node& n) const {
return (*pred_map)[n];
}
/// Guess what?
@@ -250,7 +250,7 @@
const PredNodeMap& predNodeMap() const { return *pred_node_map; }
/// Guess what?
/// \deprecated
- typename PredNodeMap::ValueType predNode(const Node& n) const {
+ typename PredNodeMap::Value predNode(const Node& n) const {
return (*pred_node_map)[n];
}
/// Guess what?
@@ -258,7 +258,7 @@
const DistMap& distMap() const { return *dist_map; }
/// Guess what?
/// \deprecated
- typename DistMap::ValueType dist(const Node& n) const {
+ typename DistMap::Value dist(const Node& n) const {
return (*dist_map)[n];
}
};
Modified: hugo/trunk/src/work/marci/bipartite_graph_wrapper.h
==============================================================================
--- hugo/trunk/src/work/marci/bipartite_graph_wrapper.h (original)
+++ hugo/trunk/src/work/marci/bipartite_graph_wrapper.h Sat Nov 13 18:07:10 2004
@@ -794,15 +794,15 @@
/// stGraphWrapper<Graph, sIterableMap, tIterableMap>.
template<typename NM> class NodeMapWrapper {
public:
- typedef Node KeyType;
- typedef typename NM::ValueType ValueType;
+ typedef Node Key;
+ typedef typename NM::Value Value;
protected:
NM* nm;
- ValueType* s_value, t_value;
+ Value* s_value, t_value;
public:
- NodeMapWrapper(NM& _nm, ValueType& _s_value, ValueType& _t_value) :
+ NodeMapWrapper(NM& _nm, Value& _s_value, Value& _t_value) :
nm(&_nm), s_value(&_s_value), t_value(&_t_value) { }
- ValueType operator[](const Node& n) const {
+ Value operator[](const Node& n) const {
switch (n.getSpec()) {
case 0:
return (*nm)[n];
@@ -813,7 +813,7 @@
return *t_value;
}
}
- void set(const Node& n, ValueType t) {
+ void set(const Node& n, Value t) {
switch (n.getSpec()) {
case 0:
nm->set(n, t);
@@ -873,14 +873,14 @@
template<typename EM, typename NM>
class EdgeMapWrapper {
public:
- typedef Edge KeyType;
- typedef typename EM::ValueType ValueType;
+ typedef Edge Key;
+ typedef typename EM::Value Value;
protected:
EM* em;
NM* nm;
public:
EdgeMapWrapper(EM& _em, NM& _nm) : em(&_em), nm(&_nm) { }
- ValueType operator[](const Edge& e) const {
+ Value operator[](const Edge& e) const {
switch (e.getSpec()) {
case 0:
return (*em)[e];
@@ -891,7 +891,7 @@
return (*nm)[e.getNode()];
}
}
- void set(const Edge& e, ValueType t) {
+ void set(const Edge& e, Value t) {
switch (e.getSpec()) {
case 0:
em->set(e, t);
Modified: hugo/trunk/src/work/marci/experiment/list_graph.h
==============================================================================
--- hugo/trunk/src/work/marci/experiment/list_graph.h (original)
+++ hugo/trunk/src/work/marci/experiment/list_graph.h Sat Nov 13 18:07:10 2004
@@ -38,8 +38,8 @@
const ListGraph& G;
std::vector<T> container;
public:
- typedef T ValueType;
- typedef Node KeyType;
+ typedef T Value;
+ typedef Node Key;
NodeMap(const ListGraph& _G) : G(_G), container(G.node_id) { }
NodeMap(const ListGraph& _G, T a) :
G(_G), container(G.node_id, a) { }
@@ -59,8 +59,8 @@
const ListGraph& G;
std::vector<T> container;
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMap(const ListGraph& _G) : G(_G), container(G.edge_id) { }
EdgeMap(const ListGraph& _G, T a) :
G(_G), container(G.edge_id, a) { }
Modified: hugo/trunk/src/work/marci/graph_concept.h
==============================================================================
--- hugo/trunk/src/work/marci/graph_concept.h (original)
+++ hugo/trunk/src/work/marci/graph_concept.h Sat Nov 13 18:07:10 2004
@@ -167,8 +167,8 @@
template<class T> class NodeMap
{
public:
- typedef T ValueType;
- typedef Node KeyType;
+ typedef T Value;
+ typedef Node Key;
NodeMap(const GraphConcept& g) { }
NodeMap(const GraphConcept& g, T t) { }
@@ -205,8 +205,8 @@
template<class T> class EdgeMap
{
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMap(const GraphConcept& g) {}
EdgeMap(const GraphConcept& g, T t) {}
Modified: hugo/trunk/src/work/marci/leda/leda_graph_wrapper.h
==============================================================================
--- hugo/trunk/src/work/marci/leda/leda_graph_wrapper.h (original)
+++ hugo/trunk/src/work/marci/leda/leda_graph_wrapper.h Sat Nov 13 18:07:10 2004
@@ -261,8 +261,8 @@
{
leda_node_map<T> leda_stuff;
public:
- typedef T ValueType;
- typedef Node KeyType;
+ typedef T Value;
+ typedef Node Key;
NodeMap(const LedaGraphWrapper &G) : leda_stuff(*(G.l_graph)) {}
NodeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G.l_graph), t) {}
@@ -281,8 +281,8 @@
{
leda_edge_map<T> leda_stuff;
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMap(const LedaGraphWrapper &G) : leda_stuff(*(G.l_graph)) {}
EdgeMap(const LedaGraphWrapper &G, T t) : leda_stuff(*(G.l_graph), t) {}
@@ -303,8 +303,8 @@
{
leda_node_array<T>* leda_stuff;
public:
- typedef T ValueType;
- typedef Node KeyType;
+ typedef T Value;
+ typedef Node Key;
NodeMapWrapper(leda_node_array<T>& _leda_stuff) :
leda_stuff(&_leda_stuff) { }
@@ -325,8 +325,8 @@
{
leda_edge_array<T>* leda_stuff;
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMapWrapper(leda_edge_array<T>& _leda_stuff) :
leda_stuff(_leda_stuff) { }
Modified: hugo/trunk/src/work/peter/edgepathgraph.h
==============================================================================
--- hugo/trunk/src/work/peter/edgepathgraph.h (original)
+++ hugo/trunk/src/work/peter/edgepathgraph.h Sat Nov 13 18:07:10 2004
@@ -306,8 +306,8 @@
template<class T> class NodeMap
{
public:
- typedef T ValueType;
- typedef Node KeyType;
+ typedef T Value;
+ typedef Node Key;
NodeMap(const EdgePathGraph &) {}
NodeMap(const EdgePathGraph &, T) {}
@@ -344,8 +344,8 @@
template<class T> class EdgeMap
{
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMap(const EdgePathGraph &) {}
EdgeMap(const EdgePathGraph &, T ) {}
Modified: hugo/trunk/src/work/peter/hierarchygraph.h
==============================================================================
--- hugo/trunk/src/work/peter/hierarchygraph.h (original)
+++ hugo/trunk/src/work/peter/hierarchygraph.h Sat Nov 13 18:07:10 2004
@@ -433,8 +433,8 @@
template < class T > class NodeMap
{
public:
- typedef T ValueType;
- typedef Node KeyType;
+ typedef T Value;
+ typedef Node Key;
NodeMap (const HierarchyGraph &)
{
@@ -489,8 +489,8 @@
template < class T > class EdgeMap
{
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMap (const HierarchyGraph &)
{
Modified: hugo/trunk/src/work/sage_graph.h
==============================================================================
--- hugo/trunk/src/work/sage_graph.h (original)
+++ hugo/trunk/src/work/sage_graph.h Sat Nov 13 18:07:10 2004
@@ -38,8 +38,8 @@
const SageGraph& G;
std::vector<T> container;
public:
- typedef T ValueType;
- typedef Node KeyType;
+ typedef T Value;
+ typedef Node Key;
NodeMap(const SageGraph& _G) : G(_G), container(G.node_id) { }
NodeMap(const SageGraph& _G, T a) :
G(_G), container(G.node_id, a) { }
@@ -59,8 +59,8 @@
const SageGraph& G;
std::vector<T> container;
public:
- typedef T ValueType;
- typedef Edge KeyType;
+ typedef T Value;
+ typedef Edge Key;
EdgeMap(const SageGraph& _G) : G(_G), container(G.edge_id) { }
EdgeMap(const SageGraph& _G, T a) :
G(_G), container(G.edge_id, a) { }
More information about the Lemon-commits
mailing list