// file: cmmf_read_0.cc
//
 
// isip include files
//
#include "convert_mmf.h"
#include "convert_mmf_constants.h"
 
// method: read_states_ascii_cc
//
// arguments:
//  int_4 read_mode : (input) read ascii or binary file
//  int_4& num_st : (output) number of states
//  int_4& num_feat : (output) number of features in data vector
//  char_1* st_file : (input) data file name
//  
// return: a State** pointing to a list of States
//
// this method reads the State models from file --- each mixture
// component in the States is assumed to have a diagonal covariance
// matrix
//
Train_State** read_states_cc(int_4 read_mode_a, int_4& num_st_a, int_4& num_feat_a,
			     char_1* st_file_a) {
  

  // define state list
  //
  Train_State** state_list = (Train_State**)NULL;

  // determine read mode
  //
  if (read_mode_a == CMMF_ASCII) {
    state_list = read_states_ascii_cc(num_st_a, num_feat_a, st_file_a);
  }
  else if (read_mode_a == CMMF_BINARY) {
    state_list = read_states_bin_cc(num_st_a, num_feat_a, st_file_a);
  }
  
  // exit gracefully
  //
  return state_list;
}
