// file: $isip/class/stat/GaussianModel/gaus_09.cc // version: $Id: gaus_09.cc 8972 2003-01-11 15:51:19Z jelinek $ // // isip include files // #include "GaussianModel.h" // method: adapt // // arguments: // const Vector& transform: (input) transformation matrix // // return: a bool8 value indicating status // // this method transform the model using the input transformation matrix // bool8 GaussianModel::adapt(const Vector& transform_a) { // get the number of features // int32 num_feat = mean_d.length(); // form the extended mean vector // VectorFloat emean(num_feat + 1); for (int32 i = num_feat; i > 0; i--) { emean(i) = mean_d(i - 1); } emean(0) = 1; // compute transformed mean vector // VectorFloat out_mean(num_feat); for (int32 i = 0; i < num_feat; i++) { out_mean(i) = transform_a(i).dotProduct(emean); } // set the new mean vector // setMean(out_mean); // exit gracefully // return true; }