Exemplo n.º 1
0
void DACE::build_R(double **ax, MyMatrix& R)
{
    // takes the array of x vectors, theta, and p, and returns the correlation matrix R.
    for(int i=0;i<fCorrelationSize;i++)
    {
        for(int j=0;j<fCorrelationSize;j++)
        {
            if(Debug)
                fprintf(stdout,"%.5lf %.5lf %.5lf  %.5lf %d\n", ax[i][1],ax[j][1],gtheta[1], gp[1], daceSpace->fSearchSpaceDim);
            R.insert(i,j,correlation(ax[i+1],ax[j+1], gtheta, gp, fCorrelationSize));
            if(Debug)
                fprintf(stdout,"%.5lf\n", R(i,j));
        }
        if(Debug)
            fprintf(stdout,"\n");
    }
    
}