10 #include <unordered_map>    16         size_t h1 = std::hash<double>()(p.
x());
    17         size_t h2 = std::hash<double>()(p.
y());
    18         return h1 ^ (h2 << 1);
    36 class Grid : 
public QObject {
    55     void setTrackBoundingBox(
double xMin, 
double xMax, 
double yMin, 
double yMax);
    61     void readFromCSV(QString filename);
    66     void addRoad(
const std::vector<std::vector<double> >& listOfCoordinates, 
long edgeId);
    74     bool inFootPrint(
double x, 
double y);
    81     void updateGrid(
double x, 
double y);
    99     void buildMarkovMatrix();
   101     double computeDistanceFraction(
PointGPS* prevPoint, 
PointGPS* curPoint, 
long prevRoadId, 
long curRoadId);
   102     std::vector<double> getProjectedPointAndDistance(
PointGPS* p, 
Road* r);
   104     double getDistanceBetweenProjections(
Point* projR1, 
Point* projR2, 
Road* r1);
   105     double getDistanceToExtremity(
Point* projR1, 
int node, 
Road* r1);
   106     int getSegmentCounter(
Point* p, 
Road* r);
   111     AllRoadMap::iterator getRoadEntry(
long id); 
   113     std::vector<PointRoad>* 
getPoints() { 
return &m_vectorOfPoints; }
   120     double xMin()
 const { 
return m_xMin; }
   121     double xMax()
 const { 
return m_xMax; }
   122     double yMin()
 const { 
return m_yMin; }
   123     double yMax()
 const { 
return m_yMax; }
   133     void signalMessage(QString);
 std::string m_gridFullName
 
int getNoOfPoints() const 
 
bool operator()(const PointRoad &p1, const PointRoad &p2) const 
 
size_t operator()(const PointRoad &p) const 
 
double m_xMin
The coordinates of the track. 
 
bool samePointAs(const Point &p) const 
Check if two points share the same coordinates. 
 
AllRoadMap m_mapOfAllRoads
 
Road is an element of a network. Road are strongly linked with Points. 
 
int getNoOfRoads() const 
Getters. 
 
std::vector< PointRoad > m_vectorOfPoints
 
ExtremityPointMap m_mapOfExtPoints
 
std::unordered_map< long, Road > AllRoadMap
 
std::vector< PointRoad > * getPoints()
 
Grid embedded roads. This describes the network. 
 
std::unordered_map< PointRoad, int, hashFunc, equalsFunc > ExtremityPointMap