// file: mod_debug_0.cc
//
 
// isip include files
//
#include "model.h"
#include "model_constants.h"

// method: debug_cc
//
// arguments:
//  FILE* fp: (input) file pointer used for output
//  char_1* message: (input) a message concatenated to each debug message
//
// return: a logical_1 value indicating status
//
// this method displays the values of all internal data
//
logical_1 Model::debug_cc(FILE* fp_a, char_1* message_a) {

  // dump the number of states
  //
  fprintf(fp_a, "%s::%s: num_states_d = %ld\n", MODEL_CLASS_NAME, message_a,
	  num_states_d);

  // output the transition matrix
  //
  fprintf(fp_a, "%s::%s: trans_prob_d = %p\n", MODEL_CLASS_NAME, message_a,
	  trans_prob_d);
  for (int_4 i = 0; i < num_states_d; i++) {
    for (int_4 j = 0; j < num_states_d; j++) {
      fprintf(fp_a, "%s::%s: trans_prob_d[%ld][%ld] = %f\n",
	      MODEL_CLASS_NAME, message_a, i, j,
	      trans_prob_d[i*num_states_d + j]);
    }
  }

  // output the states
  //
  fprintf(fp_a, "%s::%s: states_d = %p\n", MODEL_CLASS_NAME, message_a,
	  states_d);
  for (int_4 i = 0; i < num_states_d; i++) {
    states_d[i]->debug_cc(fp_a, message_a);
  }
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
