// file: $SPEECH_HOMEWORK4/hw4/class/snr_ratio/v1.0/snr_pdf_1.cc // // isip include files // #include "signal_noise_ratio.h" #include "signal_noise_ratio_constants.h" // method: calculate_pdf_cc // // arguments: // float_4** energy (input) the energy signal // int_4 num_energy (input) the total number of energy signals // int_4** pdf (output) the output location for the pdf values // float_4** mean (output) the mean of the channel // float_4* min (input) the minimum value of each channel // float_4* max (input) the maximum value of each channel // // return: a logical_1 indicating status // logical_1 Signal::calculate_pdf_cc (float_4** energy_a, int_4 num_energy_a, int_4** pdf_a, float_4** mean_a, float_4* min_a, float_4* max_a) { // check argument // if (pdf_a == (int_4**)NULL) { error_handler_cc((char_1*)"calculate_pdf_cc", (char_1*)"output memory is not allocated"); } // loop over channels // for (int_4 channel=0;channel 1) { for (int_4 i=0; i