// file: dec_hist_1.cc
//

// isip include files
//
#include "decoder.h"
#include "decoder_constants.h"
 
// method: set_hist_length_cc
//
// arguments:

//
// return: logical_1 indicating status
//
// this method determines and sets the length of each history,
// this has to be done after the function mode and the ngram_order_d being set
//
logical_1 Decoder::set_hist_length_cc() {

   if ((function_mode_d == DEC_LATTICE_RESCORE_FUNCTION) ||
       (function_mode_d == DEC_LATTICE_LATTICE_FUNCTION) ||
       (function_mode_d == DEC_FORCE_ALIGN_FUNCTION)) {
     
     History::set_hist_len_cc((int_4)1);
   }
   else {
     History::set_hist_len_cc(ngram_order_d - 1);
   }
   
   // exit gracefully
   //
   return ISIP_TRUE;
}
