标签:
//k阶样本矩
int varK(double* dList,int nCount,int k,double* pdRes)
{
if((NULL == dList) || (NULL == pdRes)) return -1;
if(nDataCount<1) return -2;
if(k<1) return -3;
if(k>10) return -4;
double dRes=0.0.dTmp=0.0;
for(int i=0;i<nCount;i++)
{
dTmp=1.0;
for(int j=0;j<k;j++)
dTmp *= dList[i];
dRes+=dTmp;
}
return dRes;
}
标签:
原文地址:http://www.cnblogs.com/JkReader/p/4355517.html