// file: $isip/class/stat/GaussianModel/gaus_05.cc // version: $Id: gaus_05.cc 8043 2002-04-02 17:09:56Z alphonso $ // // system include files // #include // isip include files // #include "GaussianModel.h" // method: assign // // arguments: // const GaussianModel& arg: (input) data to copy // // return: a bool8 value indicating status // // copy the input model to current model // bool8 GaussianModel::assign(const GaussianModel& arg_a) { // assign the mean vector and covariance matrix // mean_d.assign(arg_a.mean_d); covariance_d.assign(arg_a.covariance_d); orig_covar_d.assign(arg_a.orig_covar_d); // assign the accumulators // occ_accum_d = arg_a.occ_accum_d; access_accum_d = arg_a.access_accum_d; mean_accum_d.assign(arg_a.mean_accum_d); covar_accum_d.assign(arg_a.covar_accum_d); // assign the scale factor // scale_d = arg_a.scale_d; // assign the computation mode // mode_d = arg_a.mode_d; is_valid_d = arg_a.is_valid_d; // exit gracefully // return true; } // method: assign // // arguments: // const StatisticalModelBase& arg: (input) object to assign // // return: a bool8 value // // this method assigns input argument to current argument // bool8 GaussianModel::assign(const StatisticalModelBase& arg_a) { if (typeid(arg_a) == typeid(GaussianModel)) { return assign((GaussianModel&)arg_a); } else { return Error::handle(name(), L"assign", Error::ARG, __FILE__, __LINE__); } }