spde.sampling {RGeostats}R Documentation

Sampling a data set from Q matrix

Description

Sampling a data set from Q matrix

Usage

spde.sampling(Qrows, Qcols, Qvals, nrow=0, ncol=0, type = 0,
              flag.norm = TRUE, flag.inter = TRUE, flag.color=FALSE,
              flag.sparse = FALSE)

Arguments

Qrows,Qcols,Qvals,nrow,ncol

If Qrows (first argument) is a sparse matrix (from 'Matrix' package), then the following arguments ('Qcols', 'Qvals', 'nrow' and 'ncol') are useless.

Otherwise the arguments 'Qrows', 'Qcols' and 'Qvals' must correspond to three arrays (same dimension) which provide respectively the row, the column indices, as well as the value for the corresponding cell element. If the arguments 'nrow' and 'ncol' are not provided, they are calculated automatically from the contents of the sparse matrix

type

Coarsening mode. It may be either 0 for the standard coarsening. When strictly positive, a coarse sample is kept only if at least 'type' pathes exist between two coarse samples of the standard coarsening algorithme.

flag.norm

When TRUE, the input matrix is normalized prior to performing the interpolation

flag.inter

When TRUE, the interpolation is performed after coarsening.

flag.color

When TRUE, an array of colors (per mesh node) is calculated.

flag.sparse

When TRUE (if the package 'Matrix' is loaded), the resulting matrices are returned as a sparse matrix.

Value

The output is a list composed of:

If flag.sparse is set to TRUE, the resulting elements 'L', 'IhH', 'Q' and 'A' are returned as sparse matrix (of the 'Matrix' package).


[Package RGeostats version 12.0.0 Index]