0
2
0
| ... | ... |
@@ -202,18 +202,18 @@ |
| 202 | 202 |
typedef std::vector<Cost> CostVector; |
| 203 | 203 |
typedef std::vector<LargeCost> LargeCostVector; |
| 204 | 204 |
|
| 205 | 205 |
private: |
| 206 | 206 |
|
| 207 | 207 |
template <typename KT, typename VT> |
| 208 |
class |
|
| 208 |
class StaticVectorMap {
|
|
| 209 | 209 |
public: |
| 210 | 210 |
typedef KT Key; |
| 211 | 211 |
typedef VT Value; |
| 212 | 212 |
|
| 213 |
|
|
| 213 |
StaticVectorMap(std::vector<Value>& v) : _v(v) {}
|
|
| 214 | 214 |
|
| 215 | 215 |
const Value& operator[](const Key& key) const {
|
| 216 | 216 |
return _v[StaticDigraph::id(key)]; |
| 217 | 217 |
} |
| 218 | 218 |
|
| 219 | 219 |
Value& operator[](const Key& key) {
|
| ... | ... |
@@ -225,14 +225,14 @@ |
| 225 | 225 |
} |
| 226 | 226 |
|
| 227 | 227 |
private: |
| 228 | 228 |
std::vector<Value>& _v; |
| 229 | 229 |
}; |
| 230 | 230 |
|
| 231 |
typedef VectorMap<StaticDigraph::Node, LargeCost> LargeCostNodeMap; |
|
| 232 |
typedef VectorMap<StaticDigraph::Arc, LargeCost> LargeCostArcMap; |
|
| 231 |
typedef StaticVectorMap<StaticDigraph::Node, LargeCost> LargeCostNodeMap; |
|
| 232 |
typedef StaticVectorMap<StaticDigraph::Arc, LargeCost> LargeCostArcMap; |
|
| 233 | 233 |
|
| 234 | 234 |
private: |
| 235 | 235 |
|
| 236 | 236 |
// Data related to the underlying digraph |
| 237 | 237 |
const GR &_graph; |
| 238 | 238 |
int _node_num; |
| ... | ... |
@@ -149,18 +149,18 @@ |
| 149 | 149 |
typedef std::vector<Value> ValueVector; |
| 150 | 150 |
typedef std::vector<Cost> CostVector; |
| 151 | 151 |
|
| 152 | 152 |
private: |
| 153 | 153 |
|
| 154 | 154 |
template <typename KT, typename VT> |
| 155 |
class |
|
| 155 |
class StaticVectorMap {
|
|
| 156 | 156 |
public: |
| 157 | 157 |
typedef KT Key; |
| 158 | 158 |
typedef VT Value; |
| 159 | 159 |
|
| 160 |
|
|
| 160 |
StaticVectorMap(std::vector<Value>& v) : _v(v) {}
|
|
| 161 | 161 |
|
| 162 | 162 |
const Value& operator[](const Key& key) const {
|
| 163 | 163 |
return _v[StaticDigraph::id(key)]; |
| 164 | 164 |
} |
| 165 | 165 |
|
| 166 | 166 |
Value& operator[](const Key& key) {
|
| ... | ... |
@@ -172,14 +172,14 @@ |
| 172 | 172 |
} |
| 173 | 173 |
|
| 174 | 174 |
private: |
| 175 | 175 |
std::vector<Value>& _v; |
| 176 | 176 |
}; |
| 177 | 177 |
|
| 178 |
typedef VectorMap<StaticDigraph::Node, Cost> CostNodeMap; |
|
| 179 |
typedef VectorMap<StaticDigraph::Arc, Cost> CostArcMap; |
|
| 178 |
typedef StaticVectorMap<StaticDigraph::Node, Cost> CostNodeMap; |
|
| 179 |
typedef StaticVectorMap<StaticDigraph::Arc, Cost> CostArcMap; |
|
| 180 | 180 |
|
| 181 | 181 |
private: |
| 182 | 182 |
|
| 183 | 183 |
|
| 184 | 184 |
// Data related to the underlying digraph |
| 185 | 185 |
const GR &_graph; |
| ... | ... |
@@ -797,15 +797,15 @@ |
| 797 | 797 |
// Execute the "Simple Cycle Canceling" method |
| 798 | 798 |
void startSimpleCycleCanceling() {
|
| 799 | 799 |
// Constants for computing the iteration limits |
| 800 | 800 |
const int BF_FIRST_LIMIT = 2; |
| 801 | 801 |
const double BF_LIMIT_FACTOR = 1.5; |
| 802 | 802 |
|
| 803 |
typedef |
|
| 803 |
typedef StaticVectorMap<StaticDigraph::Arc, Value> FilterMap; |
|
| 804 | 804 |
typedef FilterArcs<StaticDigraph, FilterMap> ResDigraph; |
| 805 |
typedef |
|
| 805 |
typedef StaticVectorMap<StaticDigraph::Node, StaticDigraph::Arc> PredMap; |
|
| 806 | 806 |
typedef typename BellmanFord<ResDigraph, CostArcMap> |
| 807 | 807 |
::template SetDistMap<CostNodeMap> |
| 808 | 808 |
::template SetPredMap<PredMap>::Create BF; |
| 809 | 809 |
|
| 810 | 810 |
// Build the residual network |
| 811 | 811 |
_arc_vec.clear(); |
0 comments (0 inline)