13 #ifndef FMM_TRANSITION_GRAPH_HPP
14 #define FMM_TRANSITION_GRAPH_HPP
16 #include "network/type.hpp"
17 #include "mm/mm_type.hpp"
46 typedef std::vector<const TGNode*>
TGOpath;
75 static double calc_tp(
double sp_dist,
double eu_dist);
83 static double calc_ep(
double dist,
double error);
110 std::vector<TGLayer> layers;
Transition graph class in HMM.
std::vector< Point_Candidates > Traj_Candidates
trajectory candidates
std::vector< const TGNode * > TGOpath
The optimal path of nodes in the transition graph.
double tp
transition probability from previous optimal candidate
const TGNode * find_optimal_candidate(const TGLayer &layer)
Find the optimal candidate in a layer with the highest accumulative probability.
TGOpath backtrack()
Backtrack the transition graph to find an optimal path.
void reset_layer(TGLayer *layer)
Reset all the proability data stored in a layer of the transition graph.
TransitionGraph(const Traj_Candidates &tc, double gps_error)
Transition graph constructor.
static double calc_tp(double sp_dist, double eu_dist)
Calculate transition probability.
double cumu_prob
current node's accumulative probability
double ep
emission probability
Candidate edge matched to a GPS point
static double calc_ep(double dist, double error)
Calculate emission probability.
double sp_dist
shorest path distance from previous optimal candidate to current node
std::vector< TGLayer > & get_layers()
Get a reference to the inner layers of the transition graph.
A node in the transition graph.
std::vector< TGNode > TGLayer
A layer of nodes in the transition graph.
const Candidate * c
Candidate.
TGNode * prev
previous optimal candidate