00001 00013 #ifndef NOGANE_PATHFINDER_H_INCLUDED 00014 #define NOGANE_PATHFINDER_H_INCLUDED 00015 00016 #include <boost/unordered_map.hpp> 00017 #include <boost/unordered_set.hpp> 00018 #include "IPathFinder.h" 00019 #include "BPF/types.h" 00020 00022 class NoganePathFinder : public IPathFinder 00023 { 00025 BPF::TimeBetweenStationOnLineMap stationStationTimeInLine_; 00026 00028 BPF::IntSetVect stationsFromLineMap_; 00029 00031 BPF::IntSetVect linesFromStationMap_; 00032 00035 BPF::IntSetVect crossingFromLineMap_; 00036 00038 int stepDuration_; 00040 int changeLineDuration_; 00041 00042 00044 void findBestPathForTwoStation( 00045 int stationID, 00046 int destID, 00047 int &bestTime, 00048 std::vector<BPF::Step> &bestWay) const; 00049 00051 void findBestPathForStationList( 00052 const std::vector<int>&, 00053 int &bestTime, 00054 std::vector<BPF::Step> &bestWay) const; 00055 00056 public: 00057 NoganePathFinder(); 00058 00059 virtual void init( 00060 const StationsDB &stationDB, 00061 int stepDuration, 00062 int changeLineDuration); 00063 00064 virtual boost::shared_ptr<PathResult> find( 00065 const StationsDB &stationDB, 00066 SharedConstStation X, 00067 const std::vector<SharedConstStation> &stepList, 00068 SharedConstStation Y, 00069 bool optimizeStep) const; 00070 }; 00071 00072 #endif // NOGANE_PATHFINDER_H_INCLUDED