All pairs of basis-function indices, 1..m1 x 1..m2, with the first
index varying fastest, as used by the Stan models.
Usage
denmark_hsgp_indices(basis)
Arguments
- basis
Number of basis functions per axis, or c(m1, m2).
Value
Integer matrix with m1 * m2 rows and two columns, without
dimnames.
Examples
denmark_hsgp_indices(3)
#> [,1] [,2]
#> [1,] 1 1
#> [2,] 2 1
#> [3,] 3 1
#> [4,] 1 2
#> [5,] 2 2
#> [6,] 3 2
#> [7,] 1 3
#> [8,] 2 3
#> [9,] 3 3
dim(denmark_hsgp_indices(c(10, 8)))
#> [1] 80 2