// file: ts_tree_5.cc
//

// isip include files
//
#include "tie_state.h"
#include "tie_state_constants.h"

// method: set_states_cc
//
// arguments:
// 
// return: an integer of tree index 
//
// this is the method to map the central phones and state position in the hmm
// to a tree index
//
int_4 map_tr_index_cc(int_4 cph_index_a, int_4 num_special_model_a,
		      int_4 st_pos_a) {

  // local variables
  //
  int_4 tree_index;

  // compute the tree index
  //      
  tree_index = (cph_index_a - num_special_model_a)* TS_NUM_STATE_SIZE
               + st_pos_a - 1;

  // exit gracefully
  //
  return tree_index;  
}

