// file: cdm_cstr_1.cc
//

// isip include files
//
#include "cd_model.h"
#include "cd_model_constants.h"

// method: constructor
//
// arguments:
//    Cd_mode& model_a: (input) the cd_model to be copied
//
// return: none
//
// this is the copy constructor
//
Cd_model::Cd_model(Cd_model& model_a){
  
  // copy the state indices
  //
  num_states_d = model_a.num_states_d;
  
  states_ind_d = new int_4[num_states_d];
  memcpy(states_ind_d, model_a.states_ind_d, num_states_d*sizeof(int_4));

  // copy the phones
  //
  phones_d = new char_1*[CDM_DEFAULT_PH_SIZE];

  for (int_4 i = 0; i < CDM_DEFAULT_PH_SIZE; i++) {
    phones_d[i] = new char_1[CDM_PH_LENGTH];
    strcpy((char*)phones_d[i], (char*)model_a.phones_d[i]);
  }

  // copy the physical model flag
  //
  yesphy_d = model_a.yesphy_d;

  // exit gracefully
  //
}
