summaryrefslogtreecommitdiff
path: root/src/history.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-09 03:26:11 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-09 03:26:11 -0600
commitef478079e7836a9817992a8f8982b40ce97eef55 (patch)
tree39ee4d244035d258118dd707c0b8c9618654ed57 /src/history.h
parentca8f702a1b18f2f114cd580abe59f03fb85e4803 (diff)
downloadfork-ledger-ef478079e7836a9817992a8f8982b40ce97eef55.tar.gz
fork-ledger-ef478079e7836a9817992a8f8982b40ce97eef55.tar.bz2
fork-ledger-ef478079e7836a9817992a8f8982b40ce97eef55.zip
Defend against Dijkstra returning reverse paths
Diffstat (limited to 'src/history.h')
-rw-r--r--src/history.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/history.h b/src/history.h
index 16d552ab..63550ff5 100644
--- a/src/history.h
+++ b/src/history.h
@@ -156,13 +156,8 @@ public:
typedef graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef graph_traits<Graph>::edge_descriptor edge_descriptor;
- typedef property_map<Graph, vertex_index_t>::type IndexMap;
typedef property_map<Graph, vertex_name_t>::type NameMap;
-
- typedef iterator_property_map<vertex_descriptor*, IndexMap,
- vertex_descriptor,
- vertex_descriptor&> PredecessorMap;
- typedef iterator_property_map<long*, IndexMap, long, long&> DistanceMap;
+ typedef property_map<Graph, vertex_index_t>::type IndexMap;
typedef property_map<Graph, edge_weight_t>::type EdgeWeightMap;
typedef property_map<Graph, edge_price_point_t>::type PricePointMap;
@@ -175,7 +170,13 @@ public:
typedef filtered_graph<Graph, recent_edge_weight<EdgeWeightMap,
PricePointMap,
PriceRatioMap> > FGraph;
+
typedef property_map<FGraph, vertex_name_t>::type FNameMap;
+ typedef property_map<FGraph, vertex_index_t>::type FIndexMap;
+ typedef iterator_property_map<vertex_descriptor*, FIndexMap,
+ vertex_descriptor,
+ vertex_descriptor&> FPredecessorMap;
+ typedef iterator_property_map<long*, FIndexMap, long, long&> FDistanceMap;
commodity_history_t()
: indexmap(get(vertex_index, price_graph)),