R Under development (unstable) (2024-10-08 r87214 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > suppressMessages(library( LatticeKrig)) > #options( echo=FALSE) > > ########################################## > test.for.zero.flag<- 1 > > n<-500 > set.seed(121) > x<- cbind(runif(n, -1,1), runif(n,-1,1)) > r<- ((x[,1]^2 + x[,2]^2)/2) > y<- exp(-r*2) + .01*rnorm( n) > > > NC<- 5 > a.wght<- 4.01 > obj <- LatticeKrig( x, y, NC=NC, a.wght=a.wght, nlevel=1, + alpha=1.0, + normalize=TRUE) > > objFFT <- LatticeKrig( x, y, NC=NC, a.wght=a.wght, + alpha=1.0, + normalize=TRUE, + normalizeMethod = "both", + nlevel=1) > > gHat<- predictSurface( obj, nx=100, ny=100 ) > gHatFFT <- predictSurface( objFFT, nx=100, ny=100 ) > > pred_diffs <- abs(c(gHat$z - gHatFFT$z)) > errorStats<- stats( pred_diffs) > > > test.for.zero(errorStats["mean",] , 0, + relative = FALSE, tol = 8.5e-4) PASSED test at tolerance 0.00085 > test.for.zero(errorStats["median",] , 0, + relative = FALSE, tol = 6e-4) PASSED test at tolerance 6e-04 > test.for.zero(errorStats["max",] , 0, + relative = FALSE, tol = 7.8e-3) PASSED test at tolerance 0.0078 > test.for.zero(errorStats["min",] , 0, + relative = FALSE, tol = 3e-8) PASSED test at tolerance 3e-08 > > > > > proc.time() user system elapsed 16.42 0.25 16.64