dctFunction2D: Calculate linear combinations of orthonormal cosine basis...

View source: R/univariateExpansions.R

dctFunction2DR Documentation

Calculate linear combinations of orthonormal cosine basis functions on two- or three-dimensional domains

Description

Given scores (coefficients), these functions calculate a linear combination of two- or three-dimensional cosine tensor basis functions on two- or three-dimensional domains using the C-library fftw3 (see http://www.fftw.org/).

Usage

dctFunction2D(scores, argvals, parallel = FALSE)

dctFunction3D(scores, argvals, parallel = FALSE)

Arguments

scores

A sparse matrix of dimension N x L, representing the L scores (coefficients), where N is the number of observations.

argvals

A list containing two or three numeric vectors, corresponding to the domain grid (x and y values for two-dimensional domains; x,y and z values fro three-dimensional domains.)

parallel

Logical. If TRUE, the coefficients for the basis functions are calculated in parallel. The implementation is based on the foreach function and requires a parallel backend that must be registered before; see foreach for details. Defaults to FALSE.

Value

An object of class funData with N observations on the two- or threedimensional domain specified by argvals, corresponding to the linear combination of orthonormal cosine basis functions.

Warning

If the C-library fftw3 is not available when the package MFPCA is installed, the functions are disabled an will throw an error. For full functionality install the C-library fftw3 from http://www.fftw.org/ and reinstall MFPCA. This function has not been tested with ATLAS/MKL/OpenBLAS.

See Also

univExpansion, idct2D, idct3D, dctBasis2D, dctBasis3D


MFPCA documentation built on Sept. 15, 2022, 9:07 a.m.