Constructors for bru_mapper objects
Arguments
- ...
Arguments passed on to sub-methods, or used for special purposes, see details for each function below.
- mapper
For
bru_mapper_define, a prototype mapper object, see Details.- new_class
If non-
NULL, this is added at the front of the class definition- remove_class
If non-
NULL, this class or classes is removed from the class definition before adding thenew_classnames. Default is"list".
Functions
bru_mapper(): Generic mapper S3 constructor, used for constructing mappers for special objects. See below for details of the default constructorbru_mapper_define()that can be used to define new mapper clesses in user code. To extracting mappers for latent component models, seebru_get_mapper().bru_mapper_define(): Adds thenew_classand"bru_mapper"class names to the inheritance list for the inputmapperobject, unless the object already inherits from these.To register mapper classes and methods in scripts, use
.S3method()to register the methods, e.g..S3method("ibm_jacobian", "my_mapper_class", ibm_jacobian.my_mapper_class).In packages with
Suggests: inlabru, add method information for delayed registration, e.g.:#' @rawNamespace S3method(inlabru::bru_get_mapper, inla_rspde) #' @rawNamespace S3method(inlabru::ibm_n, bru_mapper_inla_rspde) #' @rawNamespace S3method(inlabru::ibm_values, bru_mapper_inla_rspde) #' @rawNamespace S3method(inlabru::ibm_jacobian, bru_mapper_inla_rspde)or before each method, use
@exportS3Method:etc., which semi-automates it.
See also
bru_mapper_generics for generic methods, the individual mapper pages for special method implementations, and bru_get_mapper for hooks to extract mappers from latent model object class objects.
Other mappers:
bm_aggregate(),
bm_collect(),
bm_const(),
bm_factor(),
bm_fm_mesh_1d,
bm_fmesher(),
bm_harmonics(),
bm_index(),
bm_linear(),
bm_logitaverage(),
bm_logsumexp(),
bm_marginal(),
bm_matrix(),
bm_mesh_B(),
bm_multi(),
bm_pipe(),
bm_repeat(),
bm_scale(),
bm_shift(),
bm_sum(),
bm_taylor(),
bru_get_mapper()
Examples
mapper <- bm_index(5)
ibm_jacobian(mapper, input = c(1, 3, 4, 5, 2))
#> 5 x 5 sparse Matrix of class "dgCMatrix"
#>
#> [1,] 1 . . . .
#> [2,] . . 1 . .
#> [3,] . . . 1 .
#> [4,] . . . . 1
#> [5,] . 1 . . .