#include <util.H>
Public Member Functions | |
Arc () | |
Ctor; initializes fields to default values. | |
Arc (unsigned dst, int gmmIdx, int wordIdx, double logProb) | |
Ctor; explicitly initializes all fields. | |
void | assign (unsigned dst, int gmmIdx, int wordIdx, double logProb) |
Sets all values in arc. | |
unsigned | get_dst_state () const |
Returns dest state index. | |
int | get_gmm () const |
Returns assoc GMM index, or -1 if not present. | |
unsigned | get_word () const |
Returns assoc word index, or 0 if not present/epsilon. | |
double | get_log_prob () const |
Returns assoc log prob base e. |
Holds a single arc in a graph/FSM. With each graph, there is an implicitly associated GmmSet and an explicitly associated SymbolTable (see Graph::get_word_sym_table()). An arc holds a destination state; an optional GMM index (corresponding to a GMM in the GmmSet); an optional word index (corresponding to a word in the SymbolTable); and a log prob (base e). Source state information is not present; if you have the arc ID (see Graph::get_first_arc_id(), Graph::get_arc()), you can look this up using Graph::get_src_state().
Arc::Arc | ( | ) | [inline] |
Ctor; initializes fields to default values.
Arc::Arc | ( | unsigned | dst, | |
int | gmmIdx, | |||
int | wordIdx, | |||
double | logProb | |||
) | [inline] |
void Arc::assign | ( | unsigned | dst, | |
int | gmmIdx, | |||
int | wordIdx, | |||
double | logProb | |||
) | [inline] |
Sets all values in arc.
The argument dst
should be the destination state; gmmIdx
should be the index of the associated GMM (or -1 if not present); wordIdx
should be the index of the associated word (or -1 if not present); and logProb
should be the log prob base e of the arc.
unsigned Arc::get_dst_state | ( | ) | const [inline] |
Returns dest state index.
To find src state, see Graph::get_src_state().
int Arc::get_gmm | ( | ) | const [inline] |
Returns assoc GMM index, or -1 if not present.
unsigned Arc::get_word | ( | ) | const [inline] |
Returns assoc word index, or 0 if not present/epsilon.
To find the corresponding word spelling, see Graph::get_word_sym_table().
double Arc::get_log_prob | ( | ) | const [inline] |
Returns assoc log prob base e.