Learn R Programming

mrf2d (version 1.0)

basis_functions: Creation of basis functions

Description

fourier_2d() and polynomial_2d() creates a list of basis functions to be used as the fixed effect in fit_ghm.

Usage

fourier_2d(max_freqs, lattice_dim)

polynomial_2d(poly_deg, lattice_dim)

Arguments

max_freqs

A length 2 numeric vector with maximum frequencies considered (x-axis and y-axis direction, respectively).

lattice_dim

A length 2 numeric vector with lattice dimensions (N,M) to be used.

poly_deg

A length 2 numeric vector with degrees of the bivariate polynomial to be considered.

Value

A list of functions.

Details

fourier_2d() is for 2-dimensional Fourier transform.

See Also

A paper with detailed description of the package can be found at 10.18637/jss.v101.i08.

Examples

Run this code
# NOT RUN {
fourier_2d(c(10,10), dim(Z_potts))
polynomial_2d(c(3,3), dim(Z_potts))
# }

Run the code above in your browser using DataLab