gmGeostats (version 0.10-6)

gsi.calcCgram: Compute covariance matrix oout of locations

Description

internal function to compute the variogram model for all combinations of two

Usage

gsi.calcCgram(X, Y, vgram, ijEqual = FALSE)

Arguments

X

matrix, coordinates of the first set of locations

Y

matrix, coordinates of the first set of locations (often Y=X, and ijEqual=TR)

vgram

covariogram model, of format "gmCgram"

ijEqual

logical, are X==Y? if you put TRUE, the function will only compute half of the points, so be sure that this is right!

Value

a matrix of elements of the covariance, in NxM blocks of DxD elements (being N and M resp. the nr. of rows of X and Y, and D the nr of variables)