}
System.out.println("Testing RBF_interp with multiquadric function");
scale=3.0;
RBF_multiquadric multiquadric = new RBF_multiquadric(scale);
RBF_interp myRBFmqf = new RBF_interp(pts,y,multiquadric,false);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFmqf.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** RBF_interp,multiquadric: Inaccurate multquadric interpolation with no normalization.");
}
System.out.println("Testing RBF_interp with thinplate function");
scale=2.0;
RBF_thinplate thinplate = new RBF_thinplate(scale);
RBF_interp myRBFtpf = new RBF_interp(pts,y,thinplate,false);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFtpf.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** RBF_interp,thinplate: Inaccurate thinplate interpolation with no normalization.");
}
System.out.println("Testing RBF_interp with gauss function");
scale=5.0;
RBF_gauss gauss = new RBF_gauss(scale);
RBF_interp myRBFgf = new RBF_interp (pts,y,gauss,false);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFgf.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** RBF_interp,gauss: Inaccurate gauss interpolation with no normalization.");
}
System.out.println("Testing RBF_interp with inversemultiquadric function");
scale=3.0;
RBF_inversemultiquadric inversemultiquadric = new RBF_inversemultiquadric(scale);
RBF_interp myRBFimqf =new RBF_interp(pts,y,inversemultiquadric,false);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFimqf.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** RBF_interp,inversemultiquadric: Inaccurate inversemultiquadric interpolation with no normalization.");
}
// Test same interpolators with normalization turned on
scale=3.0;
System.out.println("Testing RBF_interp with multiquadric function");
RBF_interp myRBFmqt = new RBF_interp(pts,y,multiquadric,true);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFmqt.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** RBF_interp,multiquadric: Inaccurate multiquadric interpolation with normalization.");
}
System.out.println("Testing RBF_interp with thinplate function");
scale=2.0;
RBF_interp myRBFtpt =new RBF_interp(pts,y,thinplate,true);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFtpt.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** RBF_interp,thinplate: Inaccurate thinplate interpolation with normalization.");
}
System.out.println("Testing RBF_interp with gauss function");
scale=5.0;
RBF_interp myRBFgt = new RBF_interp(pts,y,gauss,true);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFgt.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** RBF_interp,gauss: Inaccurate gauss interpolation with normalization.");
}
System.out.println("Testing RBF_interp with inversemultiquadric function");
scale=2.0;
RBF_interp myRBFimqt = new RBF_interp(pts,y,inversemultiquadric,true);
for (i=0;i<M;i++) {
ppt[0]=pt[i][0];
ppt[1]=pt[i][1];
estim[i]=myRBFimqt.interp(ppt);
}
System.out.printf(" Discrepancy: %f\n", maxel(vecsub(actual,estim)));
localflag = maxel(vecsub(actual,estim)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {