22 #ifndef __StochHMM__new_trellis__
23 #define __StochHMM__new_trellis__
49 typedef std::vector<std::vector<int16_t> >
int_2D;
50 typedef std::vector<std::vector<float> >
float_2D;
51 typedef std::vector<std::vector<double> >
double_2D;
54 typedef std::vector<std::vector<std::vector<uint16_t> > >
int_3D;
55 typedef std::vector<std::vector<std::vector<float> > >
float_3D;
56 typedef std::vector<std::vector<std::vector<double> > >
double_3D;
79 std::map<int32_t,int32_t>
tb;
81 inline void assign(int16_t st, int16_t n_score, int16_t tb_ptr, int16_t tb_sc){
82 tb[(((int32_t) st) << 16 | n_score)] = (((int32_t)tb_ptr) << 16) | tb_sc;
85 inline void get(int16_t& st, int16_t& n_score){
86 int32_t key_val = (((int32_t) st) << 16 | n_score);
87 if (
tb.count(key_val)){
90 int32_t val =
tb[key_val];
91 st = (val >> 16) & 0xFFFF;
92 n_score = val & 0xFFFF;
384 void sort_scores(std::vector<nthScore>& nth_scores);