lib/Statistics.hh
00001 // 統計処理
00002 // 2011/02/14 Yuki YOKOKURA
00003 //
00004 // 平均,分散,標準偏差,共分散,相関係数の計算
00005 //
00006 // Copyright (C) 2011 Yuki YOKOKURA
00007 // This program is free software;
00008 // you can redistribute it and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 3 of the License, or any later version.
00010 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00011 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00012 // See the GNU General Public License for more details <http://www.gnu.org/licenses/>.
00013 // Besides, you can negotiate about other options of licenses instead of GPL.
00014 // If you would like to get other licenses, please contact us<yuki@katsura.sd.keio.ac.jp>.
00015 
00016 #ifndef STATISTICS
00017 #define STATISTICS
00018 
00019 #include <math.h>
00020 
00021 double Average(const double *u, unsigned long N);                                                       // 信号uの平均を計算する
00022 double Variance(const double *u, unsigned long N);                                                      // 信号uの分散を求める
00023 double StandardDev(const double *u, unsigned long N);                                           // 信号uの標準偏差を求める
00024 double Covariance(const double *u1, const double *u2, unsigned long N);         // 信号u1と信号u2の間の共分散を計算する
00025 double Correlation(const double *u1, const double *u2, unsigned long N);        // 信号u1と信号u2の間の相関係数を求める
00026 
00027 #endif
00028 
 All Classes Files