1 #ifndef LIBR2C2_TRAINROUTEMETRIC_H_
2 #define LIBR2C2_TRAINROUTEMETRIC_H_
6 #include "trackchain.h"
13 // Metrics store iterators facing away from the goal
14 class TrainRouteMetric
17 typedef std::pair<const Track *, unsigned> Key;
25 Goal(const TrackIter &);
34 Data(float, const Goal *);
37 std::vector<Goal> goals;
38 std::map<Key, Data> tracks;
41 TrainRouteMetric() { }
42 TrainRouteMetric(const TrackChain &, TrackChain::Direction = TrackChain::UNSPECIFIED);
44 void chain_to(const TrainRouteMetric &);
45 float get_distance_from(const Track &) const;
46 float get_distance_from(const Track &, unsigned) const;
47 float get_travel_multiplier(const Track &, unsigned) const;