example.cc

来自「这是一个从音频信号里提取特征参量的程序」· CC 代码 · 共 46 行

CC
46 行
字号
// file: $isip/doc/examples/class/stat/stat_example_00/example.cc// version: $Id: example.cc,v 1.1 2001/01/09 23:50:42 peng Exp $//// isip include files//#include <GaussianModel.h>// main program starts here://  this example demonstrates the several simple steps to compute the//  Mahalanobis distance for a input vector from a GaussianModel//int main() {  // declare the GaussianModel object  //  GaussianModel gauss;    // declare mean and covariance matrix to define gaussian  //  VectorFloat mean(L"1.0, 1.0, 1.0");  MatrixFloat cov(3, 3, L"0.1, 0.1, 0.1", Integral::DIAGONAL);    // set gaussian  //  gauss.setMean(mean);  gauss.setCovariance(cov);  // declare the input vector   //  VectorFloat input;  input.assign(L"-1, -1, -1");    // get the distance  //  Float distance = gauss.getLogLikelihood(input);    // output the result to the console output  //  distance.debug(L"Mahalanobis Distance:");   // exit gracefully  //  Integral::exit();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?