Fast map matching
0.1.0
|
Transition graph class in HMM. More...
#include <transition_graph.hpp>
Public Member Functions | |
TransitionGraph (const Traj_Candidates &tc, double gps_error) | |
Transition graph constructor. More... | |
void | reset_layer (TGLayer *layer) |
Reset all the proability data stored in a layer of the transition graph. More... | |
const TGNode * | find_optimal_candidate (const TGLayer &layer) |
Find the optimal candidate in a layer with the highest accumulative probability. More... | |
TGOpath | backtrack () |
Backtrack the transition graph to find an optimal path. More... | |
std::vector< TGLayer > & | get_layers () |
Get a reference to the inner layers of the transition graph. | |
Static Public Member Functions | |
static double | calc_tp (double sp_dist, double eu_dist) |
Calculate transition probability. More... | |
static double | calc_ep (double dist, double error) |
Calculate emission probability. More... | |
Transition graph class in HMM.
The class stores the underlying transition graph of a HMM, which stores the probabilities of candidates matched to a trajectories.
Definition at line 54 of file transition_graph.hpp.
TransitionGraph::TransitionGraph | ( | const Traj_Candidates & | tc, |
double | gps_error | ||
) |
Transition graph constructor.
A transition graph is created to store the probability of emission and transition in HMM model where optimal path will be infered.
tc | Trajectory candidates |
gps_error | GPS error |
Definition at line 19 of file transition_graph.cpp.
TGOpath TransitionGraph::backtrack | ( | ) |
Backtrack the transition graph to find an optimal path.
Definition at line 62 of file transition_graph.cpp.
|
static |
Calculate emission probability.
dist | The actual gps error from observed point to matched point |
error | The GPS sensor's accuracy |
Definition at line 37 of file transition_graph.cpp.
|
static |
Calculate transition probability.
sp_dist | Shortest path distance between two candidates |
eu_dist | Euclidean distance between two candidates |
Definition at line 33 of file transition_graph.cpp.
Find the optimal candidate in a layer with the highest accumulative probability.
layer | [description] |
Definition at line 50 of file transition_graph.cpp.
void TransitionGraph::reset_layer | ( | TGLayer * | layer | ) |
Reset all the proability data stored in a layer of the transition graph.
layer | A layer in the transition graph |
Definition at line 43 of file transition_graph.cpp.