File: helmholz.R

package info (click to toggle)
r-cran-randomfields 3.3.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,916 kB
  • sloc: cpp: 52,159; ansic: 3,015; makefile: 2; sh: 1
file content (71 lines) | stat: -rw-r--r-- 2,438 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71


xRMderivative <- function(phi, partial, var, scale, Aniso, proj) {
  cl <- match.call()
  submodels <- par.general <- par.model <- list() 
  if (hasArg(phi)) submodels[['phi']] <- phi
  
  if (hasArg('partial') && !is.null(subst <- substitute(partial))) 
	par.model[['partial']] <- CheckArg(partial, subst, TRUE)
    if (hasArg('var') && !is.null(subst <- substitute(var))) 
	par.general[['var']] <- CheckArg(var, subst, TRUE)
    if (hasArg('scale') && !is.null(subst <- substitute(scale))) 
	par.general[['scale']] <- CheckArg(scale, subst, TRUE)
    if (hasArg('Aniso') && !is.null(subst <- substitute(Aniso))) 
	par.general[['Aniso']] <- CheckArg(Aniso, subst, TRUE)
    if (hasArg('proj') && !is.null(subst <- substitute(proj))) 
	par.general[['proj']] <- CheckProj(proj, subst)
  model <- new(CLASS_CLIST, call = cl, name = 'RMderivative', 
  		submodels = submodels, 
  		par.model = par.model, par.general = par.general)
  return(model)
}

xRMderivative <- new(CLASS_RM,
	.Data = xRMderivative,
	type = c('positive definite'),
	isotropy = c('zero-space-isotropic'),
	domain = 'single variable',
	operator = TRUE,
	monotone = 'not monotone',
	finiterange = NA,
	simpleArguments = TRUE,
	maxdim = -3,
	vdim = -3
	)



xRMhelmholtz <- function(phi, component, var, scale, Aniso, proj) {
  cl <- match.call()
  submodels <- par.general <- par.model <- list() 
  if (hasArg(phi)) submodels[['phi']] <- phi
  
  if (hasArg('component') && !is.null(subst <- substitute(component))) 
	par.model[['component']] <- CheckArg(component, subst, TRUE)
  if (hasArg('Aniso') && !is.null(subst <- substitute(Aniso))) 
	par.model[['Aniso']] <- CheckArg(Aniso, subst, TRUE)
    if (hasArg('var') && !is.null(subst <- substitute(var))) 
	par.general[['var']] <- CheckArg(var, subst, TRUE)
    if (hasArg('scale') && !is.null(subst <- substitute(scale))) 
	par.general[['scale']] <- CheckArg(scale, subst, TRUE)
    if (hasArg('proj') && !is.null(subst <- substitute(proj))) 
	par.general[['proj']] <- CheckProj(proj, subst)
  model <- new(CLASS_CLIST, call = cl, name = 'RMhelmholtz', 
  		submodels = submodels, 
  		par.model = par.model, par.general = par.general)
  return(model)
}

xRMhelmholtz <- new(CLASS_RM,
	.Data = xRMhelmholtz,
	type = c('positive definite'),
	isotropy = c('symmetric'),
	domain = 'single variable',
	operator = TRUE,
	monotone = 'not monotone',
	finiterange = NA,
	simpleArguments = TRUE,
	maxdim = -3,
	vdim = -1
	)