Changeset 987:87f7c54892df in lemon0.x for src/work/athos
 Timestamp:
 11/13/04 18:07:10 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1377
 Location:
 src/work/athos
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

src/work/athos/mincostflow.h
r986 r987 44 44 class MinCostFlow { 45 45 46 typedef typename CostMap::Value TypeCost;47 48 49 typedef typename SupplyDemandMap::Value TypeSupplyDemand;46 typedef typename CostMap::Value Cost; 47 48 49 typedef typename SupplyDemandMap::Value SupplyDemand; 50 50 51 51 typedef typename Graph::Node Node; … … 69 69 const NodeMap &pot; 70 70 public : 71 typedef typename CostMap::Key Type KeyType;72 typedef typename CostMap::Value Type ValueType;71 typedef typename CostMap::Key Key; 72 typedef typename CostMap::Value Value; 73 73 74 Value Typeoperator[](typename ResGraph::Edge e) const {74 Value operator[](typename ResGraph::Edge e) const { 75 75 if (res_graph.forward(e)) 76 76 return ol[e](pot[res_graph.target(e)]pot[res_graph.source(e)]); 
src/work/athos/old/minlengthpaths.h
r986 r987 31 31 class MinLengthPaths { 32 32 33 typedef typename LengthMap::Value TypeLength;33 typedef typename LengthMap::Value Length; 34 34 35 35 typedef typename Graph::Node Node; … … 50 50 const NodeMap &pot; 51 51 public : 52 typedef typename LengthMap::Key Type KeyType;53 typedef typename LengthMap::Value Type ValueType;54 55 Value Typeoperator[](typename ResGraphType::Edge e) const {52 typedef typename LengthMap::Key Key; 53 typedef typename LengthMap::Value Value; 54 55 Value operator[](typename ResGraphType::Edge e) const { 56 56 //if ( (12*rev[e])*ol[e](pot[G.target(e)]pot[G.source(e)] ) <0 ){ 57 57 // std::cout<<"Negative length!!"<<std::endl; 
src/work/athos/union_find.h
r921 r987 16 16 namespace lemon { 17 17 18 template <typename Key Type, typename KeyIntMap>18 template <typename Key, typename KeyIntMap> 19 19 class UnionFind { 20 20 KeyIntMap& pointmap; … … 35 35 36 36 //Give a component of one point to the structure 37 int addPoint(Key Typeu){37 int addPoint(Key u){ 38 38 int _index = container.size(); 39 39 VectorElementType buf(_index,1); … … 44 44 45 45 //Finds the big boss of u 46 int find(Key Typeu){46 int find(Key u){ 47 47 if (pointmap.get(u)==1){ 48 48 int whoami = addPoint(u); … … 62 62 63 63 //Finds u and v in the structures and merges the comopnents, if not equal 64 bool findAndMerge(Key Type u,KeyTypev){64 bool findAndMerge(Key u,Key v){ 65 65 int bu = find(u); 66 66 int bv = find(v);
Note: See TracChangeset
for help on using the changeset viewer.