https://github.com/cran/RandomFields
Revision f19c5f1146d16fe5a87883e4d7cc55abcc445d0f authored by Martin Schlather on 05 September 2005, 00:00:00 UTC, committed by Gabor Csardi on 05 September 2005, 00:00:00 UTC
1 parent c72cbea
Tip revision: f19c5f1146d16fe5a87883e4d7cc55abcc445d0f authored by Martin Schlather on 05 September 2005, 00:00:00 UTC
version 1.3.3
version 1.3.3
Tip revision: f19c5f1
addownfctns.cc
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/timeb.h>
#include <assert.h>
#include <string.h>
#include "RFsimu.h"
#include "RFCovFcts.h"
#include "MPPFcts.h"
#include <unistd.h>
#include "addownfctns.h"
/* In the following an example is given for an extension of
a current implementation of a covariance function.
If stablelocal and stableS are coded correctly, then
a stable random field can be generated by Stein's
(2002) local circulant embedding method using
GaussRF(...., model="stable", method="local")
Probably, newcheckstable should also be changed.
*/
void addownfunctions() {
/* compare with InitModelList() in RFinitNerror.cc!
actually the definition of "stable" in InitModelList is overwritten,
cf. GetModelNr(char **name, int *n, int *nr) in RFgetNset.cc
Note that models with overwritten names may be called only by *full* name.
If unhappy, choose any new name instead of overwritting an old one!
See RFgetNset.cc or RFsimu.h for the definition of IncludeModel, addCov,
addTBM, etc.
*/
// NEW !!! the following line make the call of PrintModelList()
// unnecessary, so
// library(RandomFields); .C("addownfunctions")
// is sufficient.
if (currentNrCov==-1) InitModelList();
// new stable
/*
int nr;
nr=IncludeModel("stable", // name that can also be chosen freely
1,
newcheckstable, // NEW
FULLISOTROPIC, false,
infostable, rangestable);
addCov(nr,stable, Dstable, Scalestable);
// addLocal(...);
addTBM(nr, NULL,TBM3stable, CircEmbed, NULL);
*/
/*
int nr, i=1;
char stable[]="stable";
// new stable
GetModelNr(&stable, &i, &nr); // implicit call of InitModelList
ModifyModel(nr, newcheckstable, // NEW
infostable, rangestable);
addCov(nr,stable,Scalestable,
stablelocal, // NEW
stableS // NEW
);
*/
}
Computing file changes ...