Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
2997 lines (2898 sloc) 84.6 KB
## Generated by RcppR6: do not edit by hand
## Version: 0.2.4
## Hash: 83824569029edf55e39027a3501888e2
##' @importFrom Rcpp evalCpp
##' @importFrom R6 R6Class
##' @useDynLib plant
NULL
## This section of code is only included where templated classes are
## included. Don't rely on the approach taken here, as it may change
## soon.
check_type <- function(type, valid) {
i <- match(list(type), valid, nomatch=NA)
if (is.na(i)) {
choices <- paste(sprintf("\t%s", sapply(valid, paste, collapse=", ")),
collapse="\n")
stop(sprintf("Invalid type '%s'; expected one of:\n%s",
paste(type, collapse=", "), choices))
}
names(valid)[[i]]
}
`Lorenz` <- function(sigma, R, b) {
Lorenz__ctor(sigma, R, b)
}
.R6_Lorenz <-
R6::R6Class(
"Lorenz",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
}),
active=list(
ode_size = function(value) {
if (missing(value)) {
Lorenz__ode_size__get(self)
} else {
stop("Lorenz$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Lorenz__ode_state__get(self)
} else {
Lorenz__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
Lorenz__ode_rates__get(self)
} else {
stop("Lorenz$ode_rates is read-only")
}
},
pars = function(value) {
if (missing(value)) {
Lorenz__pars__get(self)
} else {
stop("Lorenz$pars is read-only")
}
}))
`OdeR` <- function(derivs, state, time) {
OdeR__ctor(derivs, state, time)
}
.R6_OdeR <-
R6::R6Class(
"OdeR",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
update_state = function() {
OdeR__update_state(self)
}),
active=list())
OdeRunner <- function(T) {
type <- c(T)
valid <- list("OdeRunner<Lorenz>"="Lorenz", "OdeRunner<OdeR>"="OdeR", "OdeRunner<FF16>"="FF16", "OdeRunner<FF16r>"="FF16r")
constructors <- list("OdeRunner<Lorenz>"=`OdeRunner<Lorenz>`, "OdeRunner<OdeR>"=`OdeRunner<OdeR>`, "OdeRunner<FF16>"=`OdeRunner<FF16>`, "OdeRunner<FF16r>"=`OdeRunner<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_OdeRunner <- R6::R6Class("OdeRunner")
`OdeRunner<Lorenz>` <- function(obj, control=OdeControl()) {
OdeRunner___Lorenz__ctor(obj, control)
}
.R6_OdeRunner___Lorenz <-
R6::R6Class(
"OdeRunner<Lorenz>",
inherit=.R6_OdeRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
advance = function(time) {
OdeRunner___Lorenz__advance(self, time)
},
advance_fixed = function(time) {
OdeRunner___Lorenz__advance_fixed(self, time)
},
step = function() {
OdeRunner___Lorenz__step(self)
},
step_to = function(time) {
OdeRunner___Lorenz__step_to(self, time)
},
set_state = function(y, time) {
OdeRunner___Lorenz__set_state(self, y, time)
},
set_state_from_system = function() {
OdeRunner___Lorenz__set_state_from_system(self)
}),
active=list(
time = function(value) {
if (missing(value)) {
OdeRunner___Lorenz__time__get(self)
} else {
stop("OdeRunner<Lorenz>$time is read-only")
}
},
state = function(value) {
if (missing(value)) {
OdeRunner___Lorenz__state__get(self)
} else {
stop("OdeRunner<Lorenz>$state is read-only")
}
},
times = function(value) {
if (missing(value)) {
OdeRunner___Lorenz__times__get(self)
} else {
stop("OdeRunner<Lorenz>$times is read-only")
}
},
object = function(value) {
if (missing(value)) {
OdeRunner___Lorenz__object__get(self)
} else {
stop("OdeRunner<Lorenz>$object is read-only")
}
}))
`OdeRunner<OdeR>` <- function(obj, control=OdeControl()) {
OdeRunner___OdeR__ctor(obj, control)
}
.R6_OdeRunner___OdeR <-
R6::R6Class(
"OdeRunner<OdeR>",
inherit=.R6_OdeRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
advance = function(time) {
OdeRunner___OdeR__advance(self, time)
},
advance_fixed = function(time) {
OdeRunner___OdeR__advance_fixed(self, time)
},
step = function() {
OdeRunner___OdeR__step(self)
},
step_to = function(time) {
OdeRunner___OdeR__step_to(self, time)
},
set_state = function(y, time) {
OdeRunner___OdeR__set_state(self, y, time)
},
set_state_from_system = function() {
OdeRunner___OdeR__set_state_from_system(self)
}),
active=list(
time = function(value) {
if (missing(value)) {
OdeRunner___OdeR__time__get(self)
} else {
stop("OdeRunner<OdeR>$time is read-only")
}
},
state = function(value) {
if (missing(value)) {
OdeRunner___OdeR__state__get(self)
} else {
stop("OdeRunner<OdeR>$state is read-only")
}
},
times = function(value) {
if (missing(value)) {
OdeRunner___OdeR__times__get(self)
} else {
stop("OdeRunner<OdeR>$times is read-only")
}
},
object = function(value) {
if (missing(value)) {
OdeRunner___OdeR__object__get(self)
} else {
stop("OdeRunner<OdeR>$object is read-only")
}
}))
`OdeRunner<FF16>` <- function(obj, control=OdeControl()) {
OdeRunner___FF16__ctor(obj, control)
}
.R6_OdeRunner___FF16 <-
R6::R6Class(
"OdeRunner<FF16>",
inherit=.R6_OdeRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
advance = function(time) {
OdeRunner___FF16__advance(self, time)
},
advance_fixed = function(time) {
OdeRunner___FF16__advance_fixed(self, time)
},
step = function() {
OdeRunner___FF16__step(self)
},
step_to = function(time) {
OdeRunner___FF16__step_to(self, time)
},
set_state = function(y, time) {
OdeRunner___FF16__set_state(self, y, time)
},
set_state_from_system = function() {
OdeRunner___FF16__set_state_from_system(self)
}),
active=list(
time = function(value) {
if (missing(value)) {
OdeRunner___FF16__time__get(self)
} else {
stop("OdeRunner<FF16>$time is read-only")
}
},
state = function(value) {
if (missing(value)) {
OdeRunner___FF16__state__get(self)
} else {
stop("OdeRunner<FF16>$state is read-only")
}
},
times = function(value) {
if (missing(value)) {
OdeRunner___FF16__times__get(self)
} else {
stop("OdeRunner<FF16>$times is read-only")
}
},
object = function(value) {
if (missing(value)) {
OdeRunner___FF16__object__get(self)
} else {
stop("OdeRunner<FF16>$object is read-only")
}
}))
`OdeRunner<FF16r>` <- function(obj, control=OdeControl()) {
OdeRunner___FF16r__ctor(obj, control)
}
.R6_OdeRunner___FF16r <-
R6::R6Class(
"OdeRunner<FF16r>",
inherit=.R6_OdeRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
advance = function(time) {
OdeRunner___FF16r__advance(self, time)
},
advance_fixed = function(time) {
OdeRunner___FF16r__advance_fixed(self, time)
},
step = function() {
OdeRunner___FF16r__step(self)
},
step_to = function(time) {
OdeRunner___FF16r__step_to(self, time)
},
set_state = function(y, time) {
OdeRunner___FF16r__set_state(self, y, time)
},
set_state_from_system = function() {
OdeRunner___FF16r__set_state_from_system(self)
}),
active=list(
time = function(value) {
if (missing(value)) {
OdeRunner___FF16r__time__get(self)
} else {
stop("OdeRunner<FF16r>$time is read-only")
}
},
state = function(value) {
if (missing(value)) {
OdeRunner___FF16r__state__get(self)
} else {
stop("OdeRunner<FF16r>$state is read-only")
}
},
times = function(value) {
if (missing(value)) {
OdeRunner___FF16r__times__get(self)
} else {
stop("OdeRunner<FF16r>$times is read-only")
}
},
object = function(value) {
if (missing(value)) {
OdeRunner___FF16r__object__get(self)
} else {
stop("OdeRunner<FF16r>$object is read-only")
}
}))
`CohortScheduleEvent` <- function(introduction, species_index) {
CohortScheduleEvent__ctor(introduction, species_index)
}
.R6_CohortScheduleEvent <-
R6::R6Class(
"CohortScheduleEvent",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
}),
active=list(
species_index = function(value) {
if (missing(value)) {
CohortScheduleEvent__species_index__get(self)
} else {
CohortScheduleEvent__species_index__set(self, value)
}
},
times = function(value) {
if (missing(value)) {
CohortScheduleEvent__times__get(self)
} else {
stop("CohortScheduleEvent$times is read-only")
}
},
time_introduction = function(value) {
if (missing(value)) {
CohortScheduleEvent__time_introduction__get(self)
} else {
stop("CohortScheduleEvent$time_introduction is read-only")
}
},
time_end = function(value) {
if (missing(value)) {
CohortScheduleEvent__time_end__get(self)
} else {
stop("CohortScheduleEvent$time_end is read-only")
}
},
species_index_raw = function(value) {
if (missing(value)) {
CohortScheduleEvent__species_index_raw__get(self)
} else {
stop("CohortScheduleEvent$species_index_raw is read-only")
}
}))
##' Schedule of cohort introduction times
##' @param n_species number of species
##' @export
`CohortSchedule` <- function(n_species) {
CohortSchedule__ctor(n_species)
}
.R6_CohortSchedule <-
R6::R6Class(
"CohortSchedule",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
expand = function(n_extra, times) {
CohortSchedule__expand(self, n_extra, times)
},
clear_times = function(species_index) {
CohortSchedule__clear_times(self, species_index)
},
clear_ode_times = function() {
CohortSchedule__clear_ode_times(self)
},
set_times = function(times, species_index) {
CohortSchedule__set_times(self, times, species_index)
},
times = function(species_index) {
CohortSchedule__times(self, species_index)
},
reset = function() {
CohortSchedule__reset(self)
},
pop = function() {
CohortSchedule__pop(self)
},
copy = function() {
CohortSchedule__copy(self)
}),
active=list(
size = function(value) {
if (missing(value)) {
CohortSchedule__size__get(self)
} else {
stop("CohortSchedule$size is read-only")
}
},
n_species = function(value) {
if (missing(value)) {
CohortSchedule__n_species__get(self)
} else {
stop("CohortSchedule$n_species is read-only")
}
},
next_event = function(value) {
if (missing(value)) {
CohortSchedule__next_event__get(self)
} else {
stop("CohortSchedule$next_event is read-only")
}
},
remaining = function(value) {
if (missing(value)) {
CohortSchedule__remaining__get(self)
} else {
stop("CohortSchedule$remaining is read-only")
}
},
max_time = function(value) {
if (missing(value)) {
CohortSchedule__max_time__get(self)
} else {
CohortSchedule__max_time__set(self, value)
}
},
ode_times = function(value) {
if (missing(value)) {
CohortSchedule__ode_times__get(self)
} else {
CohortSchedule__ode_times__set(self, value)
}
},
use_ode_times = function(value) {
if (missing(value)) {
CohortSchedule__use_ode_times__get(self)
} else {
CohortSchedule__use_ode_times__set(self, value)
}
},
all_times = function(value) {
if (missing(value)) {
CohortSchedule__all_times__get(self)
} else {
CohortSchedule__all_times__set(self, value)
}
}))
##' Disturbance control object
##' @param mean_interval Mean disturbance interval in years
##' @export
`Disturbance` <- function(mean_interval) {
Disturbance__ctor(mean_interval)
}
.R6_Disturbance <-
R6::R6Class(
"Disturbance",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
density = function(time) {
Disturbance__density(self, time)
},
pr_survival = function(time) {
Disturbance__pr_survival(self, time)
},
pr_survival_conditional = function(time, time_start) {
Disturbance__pr_survival_conditional(self, time, time_start)
},
cdf = function(time) {
Disturbance__cdf(self, time)
}),
active=list(
mean_interval = function(value) {
if (missing(value)) {
Disturbance__mean_interval__get(self)
} else {
stop("Disturbance$mean_interval is read-only")
}
}))
##' Control parameters that tune various aspects of the numerical solvers.
##' @title Control parameters
##' @param ...,values Values to initialise the struct with (either as
##' variadic arguments, or as a list, but not both).
##' @export
`Control` <- function(..., values=list(...)) {
ret <- Control__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
ret
}
##' Control parameters for the ode system
##' @title ODE Control parameters
##' @param ...,values Values to initialise the struct with (either as
##' variadic arguments, or as a list, but not both).
##' @export
`OdeControl` <- function(..., values=list(...)) {
ret <- OdeControl__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
ret
}
##' Gauss-Kronrod Quadrature
##' @param rule Degree of the rule; valid sizes are 15, 21, 31, 41, 51, 61.
`QK` <- function(rule) {
QK__ctor(rule)
}
.R6_QK <-
R6::R6Class(
"QK",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
integrate = function(f, a, b) {
QK__integrate(self, f, a, b)
},
integrate_vector_x = function(a, b) {
QK__integrate_vector_x(self, a, b)
},
integrate_vector = function(y, a, b) {
QK__integrate_vector(self, y, a, b)
}),
active=list(
last_area = function(value) {
if (missing(value)) {
QK__last_area__get(self)
} else {
stop("QK$last_area is read-only")
}
},
last_error = function(value) {
if (missing(value)) {
QK__last_error__get(self)
} else {
stop("QK$last_error is read-only")
}
},
last_area_abs = function(value) {
if (missing(value)) {
QK__last_area_abs__get(self)
} else {
stop("QK$last_area_abs is read-only")
}
},
last_area_asc = function(value) {
if (missing(value)) {
QK__last_area_asc__get(self)
} else {
stop("QK$last_area_asc is read-only")
}
}))
`QAG` <- function(rule, max_iterations, atol, rtol) {
QAG__ctor(rule, max_iterations, atol, rtol)
}
.R6_QAG <-
R6::R6Class(
"QAG",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
integrate = function(f, a, b) {
QAG__integrate(self, f, a, b)
},
integrate_with_intervals = function(f, intervals) {
QAG__integrate_with_intervals(self, f, intervals)
},
integrate_with_last_intervals = function(f, a, b) {
QAG__integrate_with_last_intervals(self, f, a, b)
}),
active=list(
last_area = function(value) {
if (missing(value)) {
QAG__last_area__get(self)
} else {
stop("QAG$last_area is read-only")
}
},
last_error = function(value) {
if (missing(value)) {
QAG__last_error__get(self)
} else {
stop("QAG$last_error is read-only")
}
},
last_iterations = function(value) {
if (missing(value)) {
QAG__last_iterations__get(self)
} else {
stop("QAG$last_iterations is read-only")
}
},
last_intervals = function(value) {
if (missing(value)) {
QAG__last_intervals__get(self)
} else {
stop("QAG$last_intervals is read-only")
}
},
is_adaptive = function(value) {
if (missing(value)) {
QAG__is_adaptive__get(self)
} else {
stop("QAG$is_adaptive is read-only")
}
}))
##' Spline interpolation
##' @export
`Interpolator` <- function() {
Interpolator__ctor()
}
.R6_Interpolator <-
R6::R6Class(
"Interpolator",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
init = function(x, y) {
Interpolator__init(self, x, y)
},
eval = function(x) {
Interpolator__eval(self, x)
}),
active=list(
x = function(value) {
if (missing(value)) {
Interpolator__x__get(self)
} else {
stop("Interpolator$x is read-only")
}
},
y = function(value) {
if (missing(value)) {
Interpolator__y__get(self)
} else {
stop("Interpolator$y is read-only")
}
},
xy = function(value) {
if (missing(value)) {
Interpolator__xy__get(self)
} else {
stop("Interpolator$xy is read-only")
}
},
size = function(value) {
if (missing(value)) {
Interpolator__size__get(self)
} else {
stop("Interpolator$size is read-only")
}
},
min = function(value) {
if (missing(value)) {
Interpolator__min__get(self)
} else {
stop("Interpolator$min is read-only")
}
},
max = function(value) {
if (missing(value)) {
Interpolator__max__get(self)
} else {
stop("Interpolator$max is read-only")
}
}))
##' Environment object
##' @param disturbance_mean_interval mean disturbance interval in years
##' @param seed_rain vector of seed rains
##' @param control A Control object
##' @export
`Environment` <- function(disturbance_mean_interval, seed_rain, control) {
Environment__ctor(disturbance_mean_interval, seed_rain, control)
}
.R6_Environment <-
R6::R6Class(
"Environment",
inherit=,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
canopy_openness = function(height) {
Environment__canopy_openness(self, height)
},
patch_survival_conditional = function(time_at_birth) {
Environment__patch_survival_conditional(self, time_at_birth)
},
clear = function() {
Environment__clear(self)
},
set_seed_rain_index = function(x) {
Environment__set_seed_rain_index(self, x)
}),
active=list(
patch_survival = function(value) {
if (missing(value)) {
Environment__patch_survival__get(self)
} else {
stop("Environment$patch_survival is read-only")
}
},
seed_rain_dt = function(value) {
if (missing(value)) {
Environment__seed_rain_dt__get(self)
} else {
stop("Environment$seed_rain_dt is read-only")
}
},
disturbance_regime = function(value) {
if (missing(value)) {
Environment__disturbance_regime__get(self)
} else {
Environment__disturbance_regime__set(self, value)
}
},
time = function(value) {
if (missing(value)) {
Environment__time__get(self)
} else {
Environment__time__set(self, value)
}
},
light_environment = function(value) {
if (missing(value)) {
Environment__light_environment__get(self)
} else {
Environment__light_environment__set(self, value)
}
}))
`Plant_internals` <- function(..., values=list(...)) {
ret <- Plant_internals__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
ret
}
##' Plant object
##' @param T String containing class of plant to create; currently
##' must be \code{"FF16"}. See \code{\link{FF16_Plant}} for more
##' details.
##' @export
Plant <- function(T) {
type <- c(T)
valid <- list("Plant<FF16>"="FF16", "Plant<FF16r>"="FF16r")
constructors <- list("Plant<FF16>"=`Plant<FF16>`, "Plant<FF16r>"=`Plant<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_Plant <- R6::R6Class("Plant")
`Plant<FF16>` <- function(s) {
Plant___FF16__ctor(s)
}
.R6_Plant___FF16 <-
R6::R6Class(
"Plant<FF16>",
inherit=.R6_Plant,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(h) {
Plant___FF16__area_leaf_above(self, h)
},
compute_vars_phys = function(environment) {
Plant___FF16__compute_vars_phys(self, environment)
},
germination_probability = function(environment) {
Plant___FF16__germination_probability(self, environment)
},
reset_mortality = function() {
Plant___FF16__reset_mortality(self)
}),
active=list(
height = function(value) {
if (missing(value)) {
Plant___FF16__height__get(self)
} else {
Plant___FF16__height__set(self, value)
}
},
mortality = function(value) {
if (missing(value)) {
Plant___FF16__mortality__get(self)
} else {
Plant___FF16__mortality__set(self, value)
}
},
fecundity = function(value) {
if (missing(value)) {
Plant___FF16__fecundity__get(self)
} else {
Plant___FF16__fecundity__set(self, value)
}
},
strategy = function(value) {
if (missing(value)) {
Plant___FF16__strategy__get(self)
} else {
stop("Plant<FF16>$strategy is read-only")
}
},
internals = function(value) {
if (missing(value)) {
Plant___FF16__internals__get(self)
} else {
stop("Plant<FF16>$internals is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Plant___FF16__ode_size__get(self)
} else {
stop("Plant<FF16>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Plant___FF16__ode_state__get(self)
} else {
Plant___FF16__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
Plant___FF16__ode_rates__get(self)
} else {
stop("Plant<FF16>$ode_rates is read-only")
}
},
ode_names = function(value) {
if (missing(value)) {
Plant___FF16__ode_names__get(self)
} else {
stop("Plant<FF16>$ode_names is read-only")
}
},
mortality_probability = function(value) {
if (missing(value)) {
Plant___FF16__mortality_probability__get(self)
} else {
stop("Plant<FF16>$mortality_probability is read-only")
}
},
strategy_name = function(value) {
if (missing(value)) {
Plant___FF16__strategy_name__get(self)
} else {
stop("Plant<FF16>$strategy_name is read-only")
}
}))
`Plant<FF16r>` <- function(s) {
Plant___FF16r__ctor(s)
}
.R6_Plant___FF16r <-
R6::R6Class(
"Plant<FF16r>",
inherit=.R6_Plant,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(h) {
Plant___FF16r__area_leaf_above(self, h)
},
compute_vars_phys = function(environment) {
Plant___FF16r__compute_vars_phys(self, environment)
},
germination_probability = function(environment) {
Plant___FF16r__germination_probability(self, environment)
},
reset_mortality = function() {
Plant___FF16r__reset_mortality(self)
}),
active=list(
height = function(value) {
if (missing(value)) {
Plant___FF16r__height__get(self)
} else {
Plant___FF16r__height__set(self, value)
}
},
mortality = function(value) {
if (missing(value)) {
Plant___FF16r__mortality__get(self)
} else {
Plant___FF16r__mortality__set(self, value)
}
},
fecundity = function(value) {
if (missing(value)) {
Plant___FF16r__fecundity__get(self)
} else {
Plant___FF16r__fecundity__set(self, value)
}
},
strategy = function(value) {
if (missing(value)) {
Plant___FF16r__strategy__get(self)
} else {
stop("Plant<FF16r>$strategy is read-only")
}
},
internals = function(value) {
if (missing(value)) {
Plant___FF16r__internals__get(self)
} else {
stop("Plant<FF16r>$internals is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Plant___FF16r__ode_size__get(self)
} else {
stop("Plant<FF16r>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Plant___FF16r__ode_state__get(self)
} else {
Plant___FF16r__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
Plant___FF16r__ode_rates__get(self)
} else {
stop("Plant<FF16r>$ode_rates is read-only")
}
},
ode_names = function(value) {
if (missing(value)) {
Plant___FF16r__ode_names__get(self)
} else {
stop("Plant<FF16r>$ode_names is read-only")
}
},
mortality_probability = function(value) {
if (missing(value)) {
Plant___FF16r__mortality_probability__get(self)
} else {
stop("Plant<FF16r>$mortality_probability is read-only")
}
},
strategy_name = function(value) {
if (missing(value)) {
Plant___FF16r__strategy_name__get(self)
} else {
stop("Plant<FF16r>$strategy_name is read-only")
}
}))
PlantRunner <- function(T) {
type <- c(T)
valid <- list("PlantRunner<FF16>"="FF16", "PlantRunner<FF16r>"="FF16r")
constructors <- list("PlantRunner<FF16>"=`PlantRunner<FF16>`, "PlantRunner<FF16r>"=`PlantRunner<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_PlantRunner <- R6::R6Class("PlantRunner")
`PlantRunner<FF16>` <- function(plant, environment) {
PlantRunner___FF16__ctor(plant, environment)
}
.R6_PlantRunner___FF16 <-
R6::R6Class(
"PlantRunner<FF16>",
inherit=.R6_PlantRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
}),
active=list(
plant = function(value) {
if (missing(value)) {
PlantRunner___FF16__plant__get(self)
} else {
PlantRunner___FF16__plant__set(self, value)
}
}))
`PlantRunner<FF16r>` <- function(plant, environment) {
PlantRunner___FF16r__ctor(plant, environment)
}
.R6_PlantRunner___FF16r <-
R6::R6Class(
"PlantRunner<FF16r>",
inherit=.R6_PlantRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
}),
active=list(
plant = function(value) {
if (missing(value)) {
PlantRunner___FF16r__plant__get(self)
} else {
PlantRunner___FF16r__plant__set(self, value)
}
}))
##' Strategy parameters that tune various aspects of the biological model.
##' @title Strategy parameters
##' @param ...,values Values to initialise the struct with (either as
##' variadic arguments, or as a list, but not both).
##' @export
`FF16_Strategy` <- function(..., values=list(...)) {
ret <- FF16_Strategy__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
ret
}
##' Strategy parameters that tune various aspects of the biological model.
##' @title Strategy parameters
##' @param ...,values Values to initialise the struct with (either as
##' variadic arguments, or as a list, but not both).
##' @export
`FF16r_Strategy` <- function(..., values=list(...)) {
ret <- FF16r_Strategy__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
ret
}
Parameters <- function(T) {
type <- c(T)
valid <- list("Parameters<FF16>"="FF16", "Parameters<FF16r>"="FF16r")
constructors <- list("Parameters<FF16>"=`Parameters<FF16>`, "Parameters<FF16r>"=`Parameters<FF16r>`)
constructors[[check_type(type, valid)]]
}
`Parameters<FF16>` <- function(..., values=list(...)) {
ret <- Parameters___FF16__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
Parameters___FF16__vdor(ret)
}
`Parameters<FF16r>` <- function(..., values=list(...)) {
ret <- Parameters___FF16r__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
Parameters___FF16r__vdor(ret)
}
##' PlantPlus object
##' @param T String containing class of plant to create; currently
##' must be \code{"FF16"}. See \code{\link{FF16_Plant}} for more
##' details.
##' @export
PlantPlus <- function(T) {
type <- c(T)
valid <- list("PlantPlus<FF16>"="FF16", "PlantPlus<FF16r>"="FF16r")
constructors <- list("PlantPlus<FF16>"=`PlantPlus<FF16>`, "PlantPlus<FF16r>"=`PlantPlus<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_PlantPlus <- R6::R6Class("PlantPlus")
`PlantPlus<FF16>` <- function(strategy) {
PlantPlus___FF16__ctor(strategy)
}
.R6_PlantPlus___FF16 <-
R6::R6Class(
"PlantPlus<FF16>",
inherit=.R6_PlantPlus,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(h) {
PlantPlus___FF16__area_leaf_above(self, h)
},
compute_vars_phys = function(environment) {
PlantPlus___FF16__compute_vars_phys(self, environment)
},
compute_vars_growth = function() {
PlantPlus___FF16__compute_vars_growth(self)
},
germination_probability = function(environment) {
PlantPlus___FF16__germination_probability(self, environment)
},
to_plant = function() {
PlantPlus___FF16__to_plant(self)
}),
active=list(
height = function(value) {
if (missing(value)) {
PlantPlus___FF16__height__get(self)
} else {
PlantPlus___FF16__height__set(self, value)
}
},
mortality = function(value) {
if (missing(value)) {
PlantPlus___FF16__mortality__get(self)
} else {
PlantPlus___FF16__mortality__set(self, value)
}
},
fecundity = function(value) {
if (missing(value)) {
PlantPlus___FF16__fecundity__get(self)
} else {
PlantPlus___FF16__fecundity__set(self, value)
}
},
area_heartwood = function(value) {
if (missing(value)) {
PlantPlus___FF16__area_heartwood__get(self)
} else {
PlantPlus___FF16__area_heartwood__set(self, value)
}
},
mass_heartwood = function(value) {
if (missing(value)) {
PlantPlus___FF16__mass_heartwood__get(self)
} else {
PlantPlus___FF16__mass_heartwood__set(self, value)
}
},
area_leaf = function(value) {
if (missing(value)) {
PlantPlus___FF16__area_leaf__get(self)
} else {
stop("PlantPlus<FF16>$area_leaf is read-only")
}
},
strategy = function(value) {
if (missing(value)) {
PlantPlus___FF16__strategy__get(self)
} else {
stop("PlantPlus<FF16>$strategy is read-only")
}
},
internals = function(value) {
if (missing(value)) {
PlantPlus___FF16__internals__get(self)
} else {
stop("PlantPlus<FF16>$internals is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
PlantPlus___FF16__ode_size__get(self)
} else {
stop("PlantPlus<FF16>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
PlantPlus___FF16__ode_state__get(self)
} else {
PlantPlus___FF16__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
PlantPlus___FF16__ode_rates__get(self)
} else {
stop("PlantPlus<FF16>$ode_rates is read-only")
}
},
ode_names = function(value) {
if (missing(value)) {
PlantPlus___FF16__ode_names__get(self)
} else {
stop("PlantPlus<FF16>$ode_names is read-only")
}
},
strategy_name = function(value) {
if (missing(value)) {
PlantPlus___FF16__strategy_name__get(self)
} else {
stop("PlantPlus<FF16>$strategy_name is read-only")
}
}))
`PlantPlus<FF16r>` <- function(strategy) {
PlantPlus___FF16r__ctor(strategy)
}
.R6_PlantPlus___FF16r <-
R6::R6Class(
"PlantPlus<FF16r>",
inherit=.R6_PlantPlus,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(h) {
PlantPlus___FF16r__area_leaf_above(self, h)
},
compute_vars_phys = function(environment) {
PlantPlus___FF16r__compute_vars_phys(self, environment)
},
compute_vars_growth = function() {
PlantPlus___FF16r__compute_vars_growth(self)
},
germination_probability = function(environment) {
PlantPlus___FF16r__germination_probability(self, environment)
},
to_plant = function() {
PlantPlus___FF16r__to_plant(self)
}),
active=list(
height = function(value) {
if (missing(value)) {
PlantPlus___FF16r__height__get(self)
} else {
PlantPlus___FF16r__height__set(self, value)
}
},
mortality = function(value) {
if (missing(value)) {
PlantPlus___FF16r__mortality__get(self)
} else {
PlantPlus___FF16r__mortality__set(self, value)
}
},
fecundity = function(value) {
if (missing(value)) {
PlantPlus___FF16r__fecundity__get(self)
} else {
PlantPlus___FF16r__fecundity__set(self, value)
}
},
area_heartwood = function(value) {
if (missing(value)) {
PlantPlus___FF16r__area_heartwood__get(self)
} else {
PlantPlus___FF16r__area_heartwood__set(self, value)
}
},
mass_heartwood = function(value) {
if (missing(value)) {
PlantPlus___FF16r__mass_heartwood__get(self)
} else {
PlantPlus___FF16r__mass_heartwood__set(self, value)
}
},
area_leaf = function(value) {
if (missing(value)) {
PlantPlus___FF16r__area_leaf__get(self)
} else {
stop("PlantPlus<FF16r>$area_leaf is read-only")
}
},
strategy = function(value) {
if (missing(value)) {
PlantPlus___FF16r__strategy__get(self)
} else {
stop("PlantPlus<FF16r>$strategy is read-only")
}
},
internals = function(value) {
if (missing(value)) {
PlantPlus___FF16r__internals__get(self)
} else {
stop("PlantPlus<FF16r>$internals is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
PlantPlus___FF16r__ode_size__get(self)
} else {
stop("PlantPlus<FF16r>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
PlantPlus___FF16r__ode_state__get(self)
} else {
PlantPlus___FF16r__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
PlantPlus___FF16r__ode_rates__get(self)
} else {
stop("PlantPlus<FF16r>$ode_rates is read-only")
}
},
ode_names = function(value) {
if (missing(value)) {
PlantPlus___FF16r__ode_names__get(self)
} else {
stop("PlantPlus<FF16r>$ode_names is read-only")
}
},
strategy_name = function(value) {
if (missing(value)) {
PlantPlus___FF16r__strategy_name__get(self)
} else {
stop("PlantPlus<FF16r>$strategy_name is read-only")
}
}))
`PlantPlus_internals` <- function(..., values=list(...)) {
ret <- PlantPlus_internals__ctor()
if (length(values) > 0L) {
if (is.null(names(values)) || any(names(values) == "")) {
stop("All values must be named")
}
if (length(err <- setdiff(names(values), names(ret))) > 0L) {
stop(sprintf("Unknown fields: %s", paste(err, collapse=", ")))
}
to_set <- intersect(names(values), names(ret))
ret[to_set] <- values[to_set]
}
ret
}
Cohort <- function(T) {
type <- c(T)
valid <- list("Cohort<FF16>"="FF16", "Cohort<FF16r>"="FF16r")
constructors <- list("Cohort<FF16>"=`Cohort<FF16>`, "Cohort<FF16r>"=`Cohort<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_Cohort <- R6::R6Class("Cohort")
`Cohort<FF16>` <- function(strategy) {
Cohort___FF16__ctor(strategy)
}
.R6_Cohort___FF16 <-
R6::R6Class(
"Cohort<FF16>",
inherit=.R6_Cohort,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(height) {
Cohort___FF16__area_leaf_above(self, height)
},
growth_rate_gradient = function(environment) {
Cohort___FF16__growth_rate_gradient(self, environment)
},
compute_vars_phys = function(environment) {
Cohort___FF16__compute_vars_phys(self, environment)
},
compute_initial_conditions = function(environment) {
Cohort___FF16__compute_initial_conditions(self, environment)
}),
active=list(
plant = function(value) {
if (missing(value)) {
Cohort___FF16__plant__get(self)
} else {
stop("Cohort<FF16>$plant is read-only")
}
},
height = function(value) {
if (missing(value)) {
Cohort___FF16__height__get(self)
} else {
stop("Cohort<FF16>$height is read-only")
}
},
log_density = function(value) {
if (missing(value)) {
Cohort___FF16__log_density__get(self)
} else {
stop("Cohort<FF16>$log_density is read-only")
}
},
area_leaf = function(value) {
if (missing(value)) {
Cohort___FF16__area_leaf__get(self)
} else {
stop("Cohort<FF16>$area_leaf is read-only")
}
},
fecundity = function(value) {
if (missing(value)) {
Cohort___FF16__fecundity__get(self)
} else {
stop("Cohort<FF16>$fecundity is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Cohort___FF16__ode_size__get(self)
} else {
stop("Cohort<FF16>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Cohort___FF16__ode_state__get(self)
} else {
Cohort___FF16__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
Cohort___FF16__ode_rates__get(self)
} else {
stop("Cohort<FF16>$ode_rates is read-only")
}
},
ode_names = function(value) {
if (missing(value)) {
Cohort___FF16__ode_names__get(self)
} else {
stop("Cohort<FF16>$ode_names is read-only")
}
}))
`Cohort<FF16r>` <- function(strategy) {
Cohort___FF16r__ctor(strategy)
}
.R6_Cohort___FF16r <-
R6::R6Class(
"Cohort<FF16r>",
inherit=.R6_Cohort,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(height) {
Cohort___FF16r__area_leaf_above(self, height)
},
growth_rate_gradient = function(environment) {
Cohort___FF16r__growth_rate_gradient(self, environment)
},
compute_vars_phys = function(environment) {
Cohort___FF16r__compute_vars_phys(self, environment)
},
compute_initial_conditions = function(environment) {
Cohort___FF16r__compute_initial_conditions(self, environment)
}),
active=list(
plant = function(value) {
if (missing(value)) {
Cohort___FF16r__plant__get(self)
} else {
stop("Cohort<FF16r>$plant is read-only")
}
},
height = function(value) {
if (missing(value)) {
Cohort___FF16r__height__get(self)
} else {
stop("Cohort<FF16r>$height is read-only")
}
},
log_density = function(value) {
if (missing(value)) {
Cohort___FF16r__log_density__get(self)
} else {
stop("Cohort<FF16r>$log_density is read-only")
}
},
area_leaf = function(value) {
if (missing(value)) {
Cohort___FF16r__area_leaf__get(self)
} else {
stop("Cohort<FF16r>$area_leaf is read-only")
}
},
fecundity = function(value) {
if (missing(value)) {
Cohort___FF16r__fecundity__get(self)
} else {
stop("Cohort<FF16r>$fecundity is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Cohort___FF16r__ode_size__get(self)
} else {
stop("Cohort<FF16r>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Cohort___FF16r__ode_state__get(self)
} else {
Cohort___FF16r__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
Cohort___FF16r__ode_rates__get(self)
} else {
stop("Cohort<FF16r>$ode_rates is read-only")
}
},
ode_names = function(value) {
if (missing(value)) {
Cohort___FF16r__ode_names__get(self)
} else {
stop("Cohort<FF16r>$ode_names is read-only")
}
}))
Species <- function(T) {
type <- c(T)
valid <- list("Species<FF16>"="FF16", "Species<FF16r>"="FF16r")
constructors <- list("Species<FF16>"=`Species<FF16>`, "Species<FF16r>"=`Species<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_Species <- R6::R6Class("Species")
`Species<FF16>` <- function(strategy) {
Species___FF16__ctor(strategy)
}
.R6_Species___FF16 <-
R6::R6Class(
"Species<FF16>",
inherit=.R6_Species,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
clear = function() {
Species___FF16__clear(self)
},
compute_vars_phys = function(environment) {
Species___FF16__compute_vars_phys(self, environment)
},
area_leaf_above = function(height) {
Species___FF16__area_leaf_above(self, height)
},
add_seed = function() {
Species___FF16__add_seed(self)
},
cohort_at = function(index) {
Species___FF16__cohort_at(self, index)
},
area_leafs_error = function(scal=1) {
Species___FF16__area_leafs_error(self, scal)
}),
active=list(
size = function(value) {
if (missing(value)) {
Species___FF16__size__get(self)
} else {
stop("Species<FF16>$size is read-only")
}
},
seed = function(value) {
if (missing(value)) {
Species___FF16__seed__get(self)
} else {
stop("Species<FF16>$seed is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
Species___FF16__height_max__get(self)
} else {
stop("Species<FF16>$height_max is read-only")
}
},
heights = function(value) {
if (missing(value)) {
Species___FF16__heights__get(self)
} else {
Species___FF16__heights__set(self, value)
}
},
log_densities = function(value) {
if (missing(value)) {
Species___FF16__log_densities__get(self)
} else {
stop("Species<FF16>$log_densities is read-only")
}
},
cohorts = function(value) {
if (missing(value)) {
Species___FF16__cohorts__get(self)
} else {
stop("Species<FF16>$cohorts is read-only")
}
},
seeds = function(value) {
if (missing(value)) {
Species___FF16__seeds__get(self)
} else {
stop("Species<FF16>$seeds is read-only")
}
},
area_leafs = function(value) {
if (missing(value)) {
Species___FF16__area_leafs__get(self)
} else {
stop("Species<FF16>$area_leafs is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Species___FF16__ode_size__get(self)
} else {
stop("Species<FF16>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Species___FF16__ode_state__get(self)
} else {
Species___FF16__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
Species___FF16__ode_rates__get(self)
} else {
stop("Species<FF16>$ode_rates is read-only")
}
}))
`Species<FF16r>` <- function(strategy) {
Species___FF16r__ctor(strategy)
}
.R6_Species___FF16r <-
R6::R6Class(
"Species<FF16r>",
inherit=.R6_Species,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
clear = function() {
Species___FF16r__clear(self)
},
compute_vars_phys = function(environment) {
Species___FF16r__compute_vars_phys(self, environment)
},
area_leaf_above = function(height) {
Species___FF16r__area_leaf_above(self, height)
},
add_seed = function() {
Species___FF16r__add_seed(self)
},
cohort_at = function(index) {
Species___FF16r__cohort_at(self, index)
},
area_leafs_error = function(scal=1) {
Species___FF16r__area_leafs_error(self, scal)
}),
active=list(
size = function(value) {
if (missing(value)) {
Species___FF16r__size__get(self)
} else {
stop("Species<FF16r>$size is read-only")
}
},
seed = function(value) {
if (missing(value)) {
Species___FF16r__seed__get(self)
} else {
stop("Species<FF16r>$seed is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
Species___FF16r__height_max__get(self)
} else {
stop("Species<FF16r>$height_max is read-only")
}
},
heights = function(value) {
if (missing(value)) {
Species___FF16r__heights__get(self)
} else {
Species___FF16r__heights__set(self, value)
}
},
log_densities = function(value) {
if (missing(value)) {
Species___FF16r__log_densities__get(self)
} else {
stop("Species<FF16r>$log_densities is read-only")
}
},
cohorts = function(value) {
if (missing(value)) {
Species___FF16r__cohorts__get(self)
} else {
stop("Species<FF16r>$cohorts is read-only")
}
},
seeds = function(value) {
if (missing(value)) {
Species___FF16r__seeds__get(self)
} else {
stop("Species<FF16r>$seeds is read-only")
}
},
area_leafs = function(value) {
if (missing(value)) {
Species___FF16r__area_leafs__get(self)
} else {
stop("Species<FF16r>$area_leafs is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Species___FF16r__ode_size__get(self)
} else {
stop("Species<FF16r>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Species___FF16r__ode_state__get(self)
} else {
Species___FF16r__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
Species___FF16r__ode_rates__get(self)
} else {
stop("Species<FF16r>$ode_rates is read-only")
}
}))
Patch <- function(T) {
type <- c(T)
valid <- list("Patch<FF16>"="FF16", "Patch<FF16r>"="FF16r")
constructors <- list("Patch<FF16>"=`Patch<FF16>`, "Patch<FF16r>"=`Patch<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_Patch <- R6::R6Class("Patch")
`Patch<FF16>` <- function(parameters) {
Patch___FF16__ctor(parameters)
}
.R6_Patch___FF16 <-
R6::R6Class(
"Patch<FF16>",
inherit=.R6_Patch,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(height) {
Patch___FF16__area_leaf_above(self, height)
},
canopy_openness = function(height) {
Patch___FF16__canopy_openness(self, height)
},
add_seed = function(species_index) {
Patch___FF16__add_seed(self, species_index)
},
compute_light_environment = function() {
Patch___FF16__compute_light_environment(self)
},
compute_vars_phys = function() {
Patch___FF16__compute_vars_phys(self)
},
reset = function() {
Patch___FF16__reset(self)
},
set_ode_state = function(values, time) {
Patch___FF16__set_ode_state(self, values, time)
},
derivs = function(y, time) {
Patch___FF16__derivs(self, y, time)
},
set_state = function(time, state, n, light_env) {
Patch___FF16__set_state(self, time, state, n, light_env)
}),
active=list(
time = function(value) {
if (missing(value)) {
Patch___FF16__time__get(self)
} else {
stop("Patch<FF16>$time is read-only")
}
},
size = function(value) {
if (missing(value)) {
Patch___FF16__size__get(self)
} else {
stop("Patch<FF16>$size is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
Patch___FF16__height_max__get(self)
} else {
stop("Patch<FF16>$height_max is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
Patch___FF16__parameters__get(self)
} else {
stop("Patch<FF16>$parameters is read-only")
}
},
environment = function(value) {
if (missing(value)) {
Patch___FF16__environment__get(self)
} else {
stop("Patch<FF16>$environment is read-only")
}
},
species = function(value) {
if (missing(value)) {
Patch___FF16__species__get(self)
} else {
stop("Patch<FF16>$species is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Patch___FF16__ode_size__get(self)
} else {
stop("Patch<FF16>$ode_size is read-only")
}
},
ode_time = function(value) {
if (missing(value)) {
Patch___FF16__ode_time__get(self)
} else {
stop("Patch<FF16>$ode_time is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Patch___FF16__ode_state__get(self)
} else {
stop("Patch<FF16>$ode_state is read-only")
}
},
ode_rates = function(value) {
if (missing(value)) {
Patch___FF16__ode_rates__get(self)
} else {
stop("Patch<FF16>$ode_rates is read-only")
}
}))
`Patch<FF16r>` <- function(parameters) {
Patch___FF16r__ctor(parameters)
}
.R6_Patch___FF16r <-
R6::R6Class(
"Patch<FF16r>",
inherit=.R6_Patch,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(height) {
Patch___FF16r__area_leaf_above(self, height)
},
canopy_openness = function(height) {
Patch___FF16r__canopy_openness(self, height)
},
add_seed = function(species_index) {
Patch___FF16r__add_seed(self, species_index)
},
compute_light_environment = function() {
Patch___FF16r__compute_light_environment(self)
},
compute_vars_phys = function() {
Patch___FF16r__compute_vars_phys(self)
},
reset = function() {
Patch___FF16r__reset(self)
},
set_ode_state = function(values, time) {
Patch___FF16r__set_ode_state(self, values, time)
},
derivs = function(y, time) {
Patch___FF16r__derivs(self, y, time)
},
set_state = function(time, state, n, light_env) {
Patch___FF16r__set_state(self, time, state, n, light_env)
}),
active=list(
time = function(value) {
if (missing(value)) {
Patch___FF16r__time__get(self)
} else {
stop("Patch<FF16r>$time is read-only")
}
},
size = function(value) {
if (missing(value)) {
Patch___FF16r__size__get(self)
} else {
stop("Patch<FF16r>$size is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
Patch___FF16r__height_max__get(self)
} else {
stop("Patch<FF16r>$height_max is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
Patch___FF16r__parameters__get(self)
} else {
stop("Patch<FF16r>$parameters is read-only")
}
},
environment = function(value) {
if (missing(value)) {
Patch___FF16r__environment__get(self)
} else {
stop("Patch<FF16r>$environment is read-only")
}
},
species = function(value) {
if (missing(value)) {
Patch___FF16r__species__get(self)
} else {
stop("Patch<FF16r>$species is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Patch___FF16r__ode_size__get(self)
} else {
stop("Patch<FF16r>$ode_size is read-only")
}
},
ode_time = function(value) {
if (missing(value)) {
Patch___FF16r__ode_time__get(self)
} else {
stop("Patch<FF16r>$ode_time is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
Patch___FF16r__ode_state__get(self)
} else {
stop("Patch<FF16r>$ode_state is read-only")
}
},
ode_rates = function(value) {
if (missing(value)) {
Patch___FF16r__ode_rates__get(self)
} else {
stop("Patch<FF16r>$ode_rates is read-only")
}
}))
SCM <- function(T) {
type <- c(T)
valid <- list("SCM<FF16>"="FF16", "SCM<FF16r>"="FF16r")
constructors <- list("SCM<FF16>"=`SCM<FF16>`, "SCM<FF16r>"=`SCM<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_SCM <- R6::R6Class("SCM")
`SCM<FF16>` <- function(parameters) {
SCM___FF16__ctor(parameters)
}
.R6_SCM___FF16 <-
R6::R6Class(
"SCM<FF16>",
inherit=.R6_SCM,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
run = function() {
SCM___FF16__run(self)
},
run_next = function() {
SCM___FF16__run_next(self)
},
reset = function() {
SCM___FF16__reset(self)
},
seed_rain = function(species_index) {
SCM___FF16__seed_rain(self, species_index)
},
seed_rain_cohort = function(species_index) {
SCM___FF16__seed_rain_cohort(self, species_index)
},
area_leaf_error = function(species_index) {
SCM___FF16__area_leaf_error(self, species_index)
},
set_cohort_schedule_times = function(times) {
SCM___FF16__set_cohort_schedule_times(self, times)
}),
active=list(
complete = function(value) {
if (missing(value)) {
SCM___FF16__complete__get(self)
} else {
stop("SCM<FF16>$complete is read-only")
}
},
time = function(value) {
if (missing(value)) {
SCM___FF16__time__get(self)
} else {
stop("SCM<FF16>$time is read-only")
}
},
seed_rains = function(value) {
if (missing(value)) {
SCM___FF16__seed_rains__get(self)
} else {
stop("SCM<FF16>$seed_rains is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
SCM___FF16__parameters__get(self)
} else {
stop("SCM<FF16>$parameters is read-only")
}
},
patch = function(value) {
if (missing(value)) {
SCM___FF16__patch__get(self)
} else {
stop("SCM<FF16>$patch is read-only")
}
},
cohort_schedule = function(value) {
if (missing(value)) {
SCM___FF16__cohort_schedule__get(self)
} else {
SCM___FF16__cohort_schedule__set(self, value)
}
},
ode_times = function(value) {
if (missing(value)) {
SCM___FF16__ode_times__get(self)
} else {
stop("SCM<FF16>$ode_times is read-only")
}
},
state = function(value) {
if (missing(value)) {
SCM___FF16__state__get(self)
} else {
stop("SCM<FF16>$state is read-only")
}
},
use_ode_times = function(value) {
if (missing(value)) {
SCM___FF16__use_ode_times__get(self)
} else {
SCM___FF16__use_ode_times__set(self, value)
}
},
seed_rain_error = function(value) {
if (missing(value)) {
SCM___FF16__seed_rain_error__get(self)
} else {
stop("SCM<FF16>$seed_rain_error is read-only")
}
}))
`SCM<FF16r>` <- function(parameters) {
SCM___FF16r__ctor(parameters)
}
.R6_SCM___FF16r <-
R6::R6Class(
"SCM<FF16r>",
inherit=.R6_SCM,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
run = function() {
SCM___FF16r__run(self)
},
run_next = function() {
SCM___FF16r__run_next(self)
},
reset = function() {
SCM___FF16r__reset(self)
},
seed_rain = function(species_index) {
SCM___FF16r__seed_rain(self, species_index)
},
seed_rain_cohort = function(species_index) {
SCM___FF16r__seed_rain_cohort(self, species_index)
},
area_leaf_error = function(species_index) {
SCM___FF16r__area_leaf_error(self, species_index)
},
set_cohort_schedule_times = function(times) {
SCM___FF16r__set_cohort_schedule_times(self, times)
}),
active=list(
complete = function(value) {
if (missing(value)) {
SCM___FF16r__complete__get(self)
} else {
stop("SCM<FF16r>$complete is read-only")
}
},
time = function(value) {
if (missing(value)) {
SCM___FF16r__time__get(self)
} else {
stop("SCM<FF16r>$time is read-only")
}
},
seed_rains = function(value) {
if (missing(value)) {
SCM___FF16r__seed_rains__get(self)
} else {
stop("SCM<FF16r>$seed_rains is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
SCM___FF16r__parameters__get(self)
} else {
stop("SCM<FF16r>$parameters is read-only")
}
},
patch = function(value) {
if (missing(value)) {
SCM___FF16r__patch__get(self)
} else {
stop("SCM<FF16r>$patch is read-only")
}
},
cohort_schedule = function(value) {
if (missing(value)) {
SCM___FF16r__cohort_schedule__get(self)
} else {
SCM___FF16r__cohort_schedule__set(self, value)
}
},
ode_times = function(value) {
if (missing(value)) {
SCM___FF16r__ode_times__get(self)
} else {
stop("SCM<FF16r>$ode_times is read-only")
}
},
state = function(value) {
if (missing(value)) {
SCM___FF16r__state__get(self)
} else {
stop("SCM<FF16r>$state is read-only")
}
},
use_ode_times = function(value) {
if (missing(value)) {
SCM___FF16r__use_ode_times__get(self)
} else {
SCM___FF16r__use_ode_times__set(self, value)
}
},
seed_rain_error = function(value) {
if (missing(value)) {
SCM___FF16r__seed_rain_error__get(self)
} else {
stop("SCM<FF16r>$seed_rain_error is read-only")
}
}))
StochasticSpecies <- function(T) {
type <- c(T)
valid <- list("StochasticSpecies<FF16>"="FF16", "StochasticSpecies<FF16r>"="FF16r")
constructors <- list("StochasticSpecies<FF16>"=`StochasticSpecies<FF16>`, "StochasticSpecies<FF16r>"=`StochasticSpecies<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_StochasticSpecies <- R6::R6Class("StochasticSpecies")
`StochasticSpecies<FF16>` <- function(strategy) {
StochasticSpecies___FF16__ctor(strategy)
}
.R6_StochasticSpecies___FF16 <-
R6::R6Class(
"StochasticSpecies<FF16>",
inherit=.R6_StochasticSpecies,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
clear = function() {
StochasticSpecies___FF16__clear(self)
},
compute_vars_phys = function(environment) {
StochasticSpecies___FF16__compute_vars_phys(self, environment)
},
area_leaf_above = function(height) {
StochasticSpecies___FF16__area_leaf_above(self, height)
},
add_seed = function() {
StochasticSpecies___FF16__add_seed(self)
},
plant_at = function(index) {
StochasticSpecies___FF16__plant_at(self, index)
},
deaths = function() {
StochasticSpecies___FF16__deaths(self)
},
germination_probability = function(environment) {
StochasticSpecies___FF16__germination_probability(self, environment)
}),
active=list(
size = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__size__get(self)
} else {
stop("StochasticSpecies<FF16>$size is read-only")
}
},
size_plants = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__size_plants__get(self)
} else {
stop("StochasticSpecies<FF16>$size_plants is read-only")
}
},
seed = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__seed__get(self)
} else {
stop("StochasticSpecies<FF16>$seed is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__height_max__get(self)
} else {
stop("StochasticSpecies<FF16>$height_max is read-only")
}
},
heights = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__heights__get(self)
} else {
StochasticSpecies___FF16__heights__set(self, value)
}
},
plants = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__plants__get(self)
} else {
stop("StochasticSpecies<FF16>$plants is read-only")
}
},
is_alive = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__is_alive__get(self)
} else {
stop("StochasticSpecies<FF16>$is_alive is read-only")
}
},
seeds = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__seeds__get(self)
} else {
stop("StochasticSpecies<FF16>$seeds is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__ode_size__get(self)
} else {
stop("StochasticSpecies<FF16>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__ode_state__get(self)
} else {
StochasticSpecies___FF16__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
StochasticSpecies___FF16__ode_rates__get(self)
} else {
stop("StochasticSpecies<FF16>$ode_rates is read-only")
}
}))
`StochasticSpecies<FF16r>` <- function(strategy) {
StochasticSpecies___FF16r__ctor(strategy)
}
.R6_StochasticSpecies___FF16r <-
R6::R6Class(
"StochasticSpecies<FF16r>",
inherit=.R6_StochasticSpecies,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
clear = function() {
StochasticSpecies___FF16r__clear(self)
},
compute_vars_phys = function(environment) {
StochasticSpecies___FF16r__compute_vars_phys(self, environment)
},
area_leaf_above = function(height) {
StochasticSpecies___FF16r__area_leaf_above(self, height)
},
add_seed = function() {
StochasticSpecies___FF16r__add_seed(self)
},
plant_at = function(index) {
StochasticSpecies___FF16r__plant_at(self, index)
},
deaths = function() {
StochasticSpecies___FF16r__deaths(self)
},
germination_probability = function(environment) {
StochasticSpecies___FF16r__germination_probability(self, environment)
}),
active=list(
size = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__size__get(self)
} else {
stop("StochasticSpecies<FF16r>$size is read-only")
}
},
size_plants = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__size_plants__get(self)
} else {
stop("StochasticSpecies<FF16r>$size_plants is read-only")
}
},
seed = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__seed__get(self)
} else {
stop("StochasticSpecies<FF16r>$seed is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__height_max__get(self)
} else {
stop("StochasticSpecies<FF16r>$height_max is read-only")
}
},
heights = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__heights__get(self)
} else {
StochasticSpecies___FF16r__heights__set(self, value)
}
},
plants = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__plants__get(self)
} else {
stop("StochasticSpecies<FF16r>$plants is read-only")
}
},
is_alive = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__is_alive__get(self)
} else {
stop("StochasticSpecies<FF16r>$is_alive is read-only")
}
},
seeds = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__seeds__get(self)
} else {
stop("StochasticSpecies<FF16r>$seeds is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__ode_size__get(self)
} else {
stop("StochasticSpecies<FF16r>$ode_size is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__ode_state__get(self)
} else {
StochasticSpecies___FF16r__ode_state__set(self, value)
}
},
ode_rates = function(value) {
if (missing(value)) {
StochasticSpecies___FF16r__ode_rates__get(self)
} else {
stop("StochasticSpecies<FF16r>$ode_rates is read-only")
}
}))
StochasticPatch <- function(T) {
type <- c(T)
valid <- list("StochasticPatch<FF16>"="FF16", "StochasticPatch<FF16r>"="FF16r")
constructors <- list("StochasticPatch<FF16>"=`StochasticPatch<FF16>`, "StochasticPatch<FF16r>"=`StochasticPatch<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_StochasticPatch <- R6::R6Class("StochasticPatch")
`StochasticPatch<FF16>` <- function(parameters) {
StochasticPatch___FF16__ctor(parameters)
}
.R6_StochasticPatch___FF16 <-
R6::R6Class(
"StochasticPatch<FF16>",
inherit=.R6_StochasticPatch,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(height) {
StochasticPatch___FF16__area_leaf_above(self, height)
},
canopy_openness = function(height) {
StochasticPatch___FF16__canopy_openness(self, height)
},
add_seed = function(species_index) {
StochasticPatch___FF16__add_seed(self, species_index)
},
add_seedling = function(species_index) {
StochasticPatch___FF16__add_seedling(self, species_index)
},
compute_light_environment = function() {
StochasticPatch___FF16__compute_light_environment(self)
},
compute_vars_phys = function() {
StochasticPatch___FF16__compute_vars_phys(self)
},
reset = function() {
StochasticPatch___FF16__reset(self)
},
set_ode_state = function(values, time) {
StochasticPatch___FF16__set_ode_state(self, values, time)
},
derivs = function(y, time) {
StochasticPatch___FF16__derivs(self, y, time)
},
set_state = function(time, state, n) {
StochasticPatch___FF16__set_state(self, time, state, n)
},
deaths = function() {
StochasticPatch___FF16__deaths(self)
}),
active=list(
time = function(value) {
if (missing(value)) {
StochasticPatch___FF16__time__get(self)
} else {
stop("StochasticPatch<FF16>$time is read-only")
}
},
size = function(value) {
if (missing(value)) {
StochasticPatch___FF16__size__get(self)
} else {
stop("StochasticPatch<FF16>$size is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
StochasticPatch___FF16__height_max__get(self)
} else {
stop("StochasticPatch<FF16>$height_max is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
StochasticPatch___FF16__parameters__get(self)
} else {
stop("StochasticPatch<FF16>$parameters is read-only")
}
},
environment = function(value) {
if (missing(value)) {
StochasticPatch___FF16__environment__get(self)
} else {
stop("StochasticPatch<FF16>$environment is read-only")
}
},
species = function(value) {
if (missing(value)) {
StochasticPatch___FF16__species__get(self)
} else {
stop("StochasticPatch<FF16>$species is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
StochasticPatch___FF16__ode_size__get(self)
} else {
stop("StochasticPatch<FF16>$ode_size is read-only")
}
},
ode_time = function(value) {
if (missing(value)) {
StochasticPatch___FF16__ode_time__get(self)
} else {
stop("StochasticPatch<FF16>$ode_time is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
StochasticPatch___FF16__ode_state__get(self)
} else {
stop("StochasticPatch<FF16>$ode_state is read-only")
}
},
ode_rates = function(value) {
if (missing(value)) {
StochasticPatch___FF16__ode_rates__get(self)
} else {
stop("StochasticPatch<FF16>$ode_rates is read-only")
}
}))
`StochasticPatch<FF16r>` <- function(parameters) {
StochasticPatch___FF16r__ctor(parameters)
}
.R6_StochasticPatch___FF16r <-
R6::R6Class(
"StochasticPatch<FF16r>",
inherit=.R6_StochasticPatch,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
area_leaf_above = function(height) {
StochasticPatch___FF16r__area_leaf_above(self, height)
},
canopy_openness = function(height) {
StochasticPatch___FF16r__canopy_openness(self, height)
},
add_seed = function(species_index) {
StochasticPatch___FF16r__add_seed(self, species_index)
},
add_seedling = function(species_index) {
StochasticPatch___FF16r__add_seedling(self, species_index)
},
compute_light_environment = function() {
StochasticPatch___FF16r__compute_light_environment(self)
},
compute_vars_phys = function() {
StochasticPatch___FF16r__compute_vars_phys(self)
},
reset = function() {
StochasticPatch___FF16r__reset(self)
},
set_ode_state = function(values, time) {
StochasticPatch___FF16r__set_ode_state(self, values, time)
},
derivs = function(y, time) {
StochasticPatch___FF16r__derivs(self, y, time)
},
set_state = function(time, state, n) {
StochasticPatch___FF16r__set_state(self, time, state, n)
},
deaths = function() {
StochasticPatch___FF16r__deaths(self)
}),
active=list(
time = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__time__get(self)
} else {
stop("StochasticPatch<FF16r>$time is read-only")
}
},
size = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__size__get(self)
} else {
stop("StochasticPatch<FF16r>$size is read-only")
}
},
height_max = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__height_max__get(self)
} else {
stop("StochasticPatch<FF16r>$height_max is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__parameters__get(self)
} else {
stop("StochasticPatch<FF16r>$parameters is read-only")
}
},
environment = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__environment__get(self)
} else {
stop("StochasticPatch<FF16r>$environment is read-only")
}
},
species = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__species__get(self)
} else {
stop("StochasticPatch<FF16r>$species is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__ode_size__get(self)
} else {
stop("StochasticPatch<FF16r>$ode_size is read-only")
}
},
ode_time = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__ode_time__get(self)
} else {
stop("StochasticPatch<FF16r>$ode_time is read-only")
}
},
ode_state = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__ode_state__get(self)
} else {
stop("StochasticPatch<FF16r>$ode_state is read-only")
}
},
ode_rates = function(value) {
if (missing(value)) {
StochasticPatch___FF16r__ode_rates__get(self)
} else {
stop("StochasticPatch<FF16r>$ode_rates is read-only")
}
}))
StochasticPatchRunner <- function(T) {
type <- c(T)
valid <- list("StochasticPatchRunner<FF16>"="FF16", "StochasticPatchRunner<FF16r>"="FF16r")
constructors <- list("StochasticPatchRunner<FF16>"=`StochasticPatchRunner<FF16>`, "StochasticPatchRunner<FF16r>"=`StochasticPatchRunner<FF16r>`)
constructors[[check_type(type, valid)]]
}
.R6_StochasticPatchRunner <- R6::R6Class("StochasticPatchRunner")
`StochasticPatchRunner<FF16>` <- function(parameters) {
StochasticPatchRunner___FF16__ctor(parameters)
}
.R6_StochasticPatchRunner___FF16 <-
R6::R6Class(
"StochasticPatchRunner<FF16>",
inherit=.R6_StochasticPatchRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
run = function() {
StochasticPatchRunner___FF16__run(self)
},
run_next = function() {
StochasticPatchRunner___FF16__run_next(self)
},
reset = function() {
StochasticPatchRunner___FF16__reset(self)
},
set_schedule_times = function(times) {
StochasticPatchRunner___FF16__set_schedule_times(self, times)
}),
active=list(
complete = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16__complete__get(self)
} else {
stop("StochasticPatchRunner<FF16>$complete is read-only")
}
},
time = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16__time__get(self)
} else {
stop("StochasticPatchRunner<FF16>$time is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16__parameters__get(self)
} else {
stop("StochasticPatchRunner<FF16>$parameters is read-only")
}
},
patch = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16__patch__get(self)
} else {
stop("StochasticPatchRunner<FF16>$patch is read-only")
}
},
schedule = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16__schedule__get(self)
} else {
StochasticPatchRunner___FF16__schedule__set(self, value)
}
},
state = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16__state__get(self)
} else {
stop("StochasticPatchRunner<FF16>$state is read-only")
}
}))
`StochasticPatchRunner<FF16r>` <- function(parameters) {
StochasticPatchRunner___FF16r__ctor(parameters)
}
.R6_StochasticPatchRunner___FF16r <-
R6::R6Class(
"StochasticPatchRunner<FF16r>",
inherit=.R6_StochasticPatchRunner,
portable=TRUE,
public=list(
.ptr=NULL,
initialize = function(ptr) {
self$.ptr <- ptr
},
run = function() {
StochasticPatchRunner___FF16r__run(self)
},
run_next = function() {
StochasticPatchRunner___FF16r__run_next(self)
},
reset = function() {
StochasticPatchRunner___FF16r__reset(self)
},
set_schedule_times = function(times) {
StochasticPatchRunner___FF16r__set_schedule_times(self, times)
}),
active=list(
complete = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16r__complete__get(self)
} else {
stop("StochasticPatchRunner<FF16r>$complete is read-only")
}
},
time = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16r__time__get(self)
} else {
stop("StochasticPatchRunner<FF16r>$time is read-only")
}
},
parameters = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16r__parameters__get(self)
} else {
stop("StochasticPatchRunner<FF16r>$parameters is read-only")
}
},
patch = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16r__patch__get(self)
} else {
stop("StochasticPatchRunner<FF16r>$patch is read-only")
}
},
schedule = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16r__schedule__get(self)
} else {
StochasticPatchRunner___FF16r__schedule__set(self, value)
}
},
state = function(value) {
if (missing(value)) {
StochasticPatchRunner___FF16r__state__get(self)
} else {
stop("StochasticPatchRunner<FF16r>$state is read-only")
}
}))
cohort_schedule_max_time_default <- function(p) {
cl <- class(p)[[1]]
switch(cl,
"Parameters<FF16>"=`cohort_schedule_max_time_default__Parameters___FF16`,
"Parameters<FF16r>"=`cohort_schedule_max_time_default__Parameters___FF16r`,
stop("Unknown type: ", cl))(p)
}
cohort_schedule_default <- function(p) {
cl <- class(p)[[1]]
switch(cl,
"Parameters<FF16>"=`cohort_schedule_default__Parameters___FF16`,
"Parameters<FF16r>"=`cohort_schedule_default__Parameters___FF16r`,
stop("Unknown type: ", cl))(p)
}
make_cohort_schedule <- function(p) {
cl <- class(p)[[1]]
switch(cl,
"Parameters<FF16>"=`make_cohort_schedule__Parameters___FF16`,
"Parameters<FF16r>"=`make_cohort_schedule__Parameters___FF16r`,
stop("Unknown type: ", cl))(p)
}