Changeset 987:87f7c54892df in lemon-0.x for src/work/alpar
- Timestamp:
- 11/13/04 18:07:10 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1377
- Location:
- src/work/alpar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/alpar/boolmap_iter.cc
r986 r987 14 14 typedef typename GG::Edge Edge; 15 15 16 typedef Edge Key Type;17 typedef bool Value Type;16 typedef Edge Key; 17 typedef bool Value; 18 18 19 19 friend class RefType; … … 68 68 RefType(BoolIterEdgeMap &_M,Edge _e) : M(_M), e(_e) { } 69 69 70 operator Value Type() const70 operator Value() const 71 71 { 72 72 return M.isTrue(e); 73 73 74 74 } 75 Value Type operator = (ValueType v) const75 Value operator = (Value v) const 76 76 { 77 77 if(v) M.setTrue(e); -
src/work/alpar/dijkstra.h
r986 r987 47 47 typedef LM LengthMap; 48 48 //The type of the length of the edges. 49 typedef typename LM::Value Type ValueType;49 typedef typename LM::Value Value; 50 50 ///The heap type used by Dijkstra algorithm. 51 51 … … 55 55 ///\sa Dijkstra 56 56 typedef BinHeap<typename Graph::Node, 57 typename LM::Value Type,57 typename LM::Value, 58 58 typename GR::template NodeMap<int>, 59 std::less<Value Type> > Heap;59 std::less<Value> > Heap; 60 60 61 61 ///\brief The type of the map that stores the last … … 91 91 ///It must meet the \ref concept::WriteMap "WriteMap" concept. 92 92 /// 93 typedef typename Graph::template NodeMap<typename LM::Value Type> DistMap;93 typedef typename Graph::template NodeMap<typename LM::Value> DistMap; 94 94 ///Instantiates a DistMap. 95 95 … … 110 110 /// 111 111 ///The type of the length is determined by the 112 ///\ref concept::ReadMap::Value Type "ValueType" of the length map.112 ///\ref concept::ReadMap::Value "Value" of the length map. 113 113 /// 114 114 ///It is also possible to change the underlying priority heap. … … 159 159 160 160 ///The type of the length of the edges. 161 typedef typename TR::LengthMap::Value Type ValueType;161 typedef typename TR::LengthMap::Value Value; 162 162 ///The type of the map that stores the edge lengths. 163 163 typedef typename TR::LengthMap LengthMap; … … 388 388 389 389 Node v=heap.top(); 390 Value Typeoldvalue=heap[v];390 Value oldvalue=heap[v]; 391 391 heap.pop(); 392 392 distance->set(v, oldvalue); … … 421 421 ///\warning If node \c v in unreachable from the root the return value 422 422 ///of this funcion is undefined. 423 Value Typedist(Node v) const { return (*distance)[v]; }423 Value dist(Node v) const { return (*distance)[v]; } 424 424 425 425 ///Returns the 'previous edge' of the shortest path tree. … … 498 498 typedef typename TR::LengthMap LengthMap; 499 499 ///The type of the length of the edges. 500 typedef typename LengthMap::Value Type ValueType;500 typedef typename LengthMap::Value Value; 501 501 ///\brief The type of the map that stores the last 502 502 ///edges of the shortest paths. -
src/work/alpar/f_ed_ka.h
r986 r987 14 14 namespace lemon { 15 15 template <typename Graph, typename FlowMap, typename CapacityMap> 16 typename FlowMap::Value TypemaxFlow(Graph &G,16 typename FlowMap::Value maxFlow(Graph &G, 17 17 FlowMap &f, 18 18 CapacityMap &c, … … 26 26 typedef typename Graph::OutEdgeIt OutEdgeIt; 27 27 typedef typename Graph::InEdgeIt InEdgeIt; 28 typedef typename FlowMap::Value TypeT;28 typedef typename FlowMap::Value T; 29 29 30 30 T flow_val = 0; -
src/work/alpar/rw_nonref_map.cc
r986 r987 11 11 typedef typename GG::Edge Edge; 12 12 13 typedef Edge Key Type;14 typedef TT Value Type;13 typedef Edge Key; 14 typedef TT Value; 15 15 16 16 class RefType … … 21 21 RefType(Graph &_G,Edge _e) : G(_G), e(_e) { } 22 22 23 operator Value Type() const23 operator Value() const 24 24 { 25 Value Typetmp;25 Value tmp; 26 26 std::cout << G.id(G.source(e)) << "->" 27 27 << G.id(G.target(e)) << ": "; … … 29 29 return tmp; 30 30 } 31 Value Type operator = (ValueType v) const31 Value operator = (Value v) const 32 32 { 33 33 std::cout << G.id(G.source(e)) << "->" … … 48 48 { 49 49 public: 50 typedef K Key Type;51 typedef T Value Type;50 typedef K Key; 51 typedef T Value; 52 52 53 53 class RefType 54 54 { 55 Value Typeval;55 Value val; 56 56 public: 57 RefType(Value Typev) : val(v) { }58 operator Value Type() const { return val; }59 Value Type operator = (ValueType v) const { return val; }57 RefType(Value v) : val(v) { } 58 operator Value() const { return val; } 59 Value operator = (Value v) const { return val; } 60 60 }; 61 61 62 62 private: 63 Value Typeval;63 Value val; 64 64 public: 65 NullMap(Value Typev) : val(v) { }66 RefType operator[] (Key Typee) const { return RefType(v);}65 NullMap(Value v) : val(v) { } 66 RefType operator[] (Key e) const { return RefType(v);} 67 67 }; 68 68
Note: See TracChangeset
for help on using the changeset viewer.