Skip to contents

method = "gauss" (gstat's default for krige(block = c(bx, by))): n-point Gauss-Legendre nodes \(b_j x_i / 2\) per dimension with product weights \(\prod w_i / 2\) (gstat keeps these in single precision, so its block kriging differs in the eighth digit); "regular": the \(n^d\) cell centres \(b_j((i + 1/2)/n - 1/2)\) with equal weights.

Usage

BlockDiscretize(block, n = 4L, method = "gauss")

Arguments

block

Block sides (1 to 3 values).

n

Points per dimension.

method

"gauss" or "regular".

Value

List with offsets (matrix) and weights.

Examples

BlockDiscretize(c(2, 2), 2, "regular")
#> $offsets
#>      [,1] [,2]
#> [1,] -0.5 -0.5
#> [2,] -0.5  0.5
#> [3,]  0.5 -0.5
#> [4,]  0.5  0.5
#> 
#> $weights
#> [1] 0.25 0.25 0.25 0.25
#>