Transit Planner  1.0
An experiment on transfer patterns robustness
src/Statistics.h
00001 // Copyright 2011: Eugen Sawin, Philip Stahl, Jonas Sternisko
00002 #ifndef SRC_STATISTICS_H_
00003 #define SRC_STATISTICS_H_
00004 
00005 #include <vector>
00006 #include "./Dijkstra.h"
00007 
00008 using std::vector;
00009 
00010 class QueryCompare {
00011  public:
00012   // Constructor
00013   QueryCompare() : _hubs(NULL) {}
00014   // Sets the hub set used for path evaluation.
00015   void hubs(const HubSet* hubs);
00016   // Compares two set of of paths with each other. ResultDijkstra should be a
00017   // a subset of resultTp. Returns the type of the query compare:
00018   // 0: dijkstra result is empty
00019   // 1: dijkstra is a true subset of Tp
00020   // 2: dijkstra is almost a subset of Tp (paths costs vary not more than 10%)
00021   // 3: dijkstra is not a subset of Tp
00022   // 4: Tp found a path without a hub that has larger penalty than the penalty
00023   //    limit between some station and a hub. Caused by suboptimal query graphs.
00024   int compare(const vector<QueryResult::Path>& resultDi,
00025               const vector<QueryResult::Path>& resultTp);
00026  private:
00027   const HubSet* _hubs;
00028 };
00029 
00030 #endif  // SRC_STATISTICS_H_
 All Classes