| GenerativeTemplate | R Documentation |
R6 class representing a nested container for
Generator attributes that are maintained when new model clones are
created. The container maintains input and output attribute names,
file, function and distribution templates, correlation parameters (for distribution
generation), rounding decimals, occupancy mask, and any inherited class model
attributes that need to be maintained when cloning.
attachedA list of dynamically attached attributes (name-value pairs).
descriptionA brief description of what the generator generates.
inputsAn array of input attribute names for the generator.
outputsAn array of output attribute names for the generator.
file_templatesA list of file template attributes.
function_templatesA list of function template attributes.
distribution_templatesA list of distribution template attributes.
uses_correlationsA boolean to indicate that a SpatialCorrelation (or inherited class) object is used for generating correlated random deviates.
spatial_correlationA SpatialCorrelation (or inherited class) object for generating correlated random deviates.
temporal_correlationAbsolute correlation coefficient between simulation time steps for all grid cells (0-1; default = 1).
time_stepsNumber of simulation time steps (default = 1).
generate_rastersBoolean to indicate if rasters should be generated (default: NULL).
decimalsNumber of decimal places applied to the generated values (default: NULL = no rounding).
occupancy_maskOptional binary mask array (matrix), data frame, or raster (stack) for generated (time-series) data.
new()Initialization method initializes the generator templates.
GenerativeTemplate$new()
clone()The objects of this class are cloneable with this method.
GenerativeTemplate$clone(deep = FALSE)
deepWhether to make a deep clone.
gen_template <- GenerativeTemplate$new()
gen_template$occupancy_mask <- array(c(1, 1, 0, 0, 1, 1, 1))
gen_template$decimals <- 4
gen_template$description <- "Test generator"
coordinates <- data.frame(x = c(1:4, 4:2), y = c(1, 1:4, 4:3))
generator <- Generator$new(
region = Region$new(coordinates = coordinates), attr1 = 1,
template_attached = gen_template
)
generator$description
generator$occupancy_mask
generator$decimals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.