|
|
// Algorithm.h: interface for the Algorithm class.
|
|
|
//
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
#ifndef __MATH_H__
|
|
|
#define __MATH_H__
|
|
|
/**@file Algorithm.h
|
|
|
* @brief 算法类
|
|
|
* @author remit
|
|
|
* @version 1.0
|
|
|
* @date 2009-12
|
|
|
*/
|
|
|
namespace Plate
|
|
|
{
|
|
|
class Algorithm
|
|
|
{
|
|
|
public:
|
|
|
Algorithm();
|
|
|
virtual ~Algorithm();
|
|
|
|
|
|
//* 线性回归拟合*/
|
|
|
void LinerFitting(double *x,double *y,int n,double *a,double *dt);
|
|
|
|
|
|
//*拟合相关系数 */
|
|
|
double Relation(double *cValue,double *lValue,int nums);
|
|
|
|
|
|
//* 正态分布函数(a:数学期望值,d:标准方差,x:随机变量值)*/
|
|
|
double ligas(double a,double d,double x);
|
|
|
|
|
|
//* 反算(迭代法),根据概率值求x(z:概率值,dz:误差控制值)*/
|
|
|
double xligas(double a,double d,double z,double dz);
|
|
|
|
|
|
//* 误差函数*/
|
|
|
double lcerf(double x);
|
|
|
|
|
|
//* 实数冒泡排序*/
|
|
|
void mbbub(double p[],int n);
|
|
|
|
|
|
|
|
|
//* 求矩阵相乘*/
|
|
|
int Dcinv(double a[], int n);
|
|
|
|
|
|
//* 求逆矩阵值*/
|
|
|
void Damul(double a[], double b[], int m, int n, int k, double c[]);
|
|
|
|
|
|
//* 求二元全区间插值(3点)*/
|
|
|
double Apslg(double x[],double y[],double z[],int n,int m,double u,double v);
|
|
|
|
|
|
//* 求二元全区间插值(4点)*/
|
|
|
double Aqslg(double x[],double y[],double z[],int n,int m,double u,double v);
|
|
|
|
|
|
//* 不完全加码函数*/
|
|
|
double lbgam(double a,double x);
|
|
|
|
|
|
//* 加码函数*/
|
|
|
double lagam(double x);
|
|
|
|
|
|
};
|
|
|
}
|
|
|
|
|
|
|
|
|
#endif //__ MATH_H__
|