Check if a mapper is linear/affine
Source:R/mappers.R, R/mapper_collect.R, R/mapper_sum.R
ibm_is_linear.RdImplementations must return TRUE or FALSE.
If TRUE (returned by the default method unless the mapper
contains an is_linear variable), users of the mapper
may assume the mapper is linear/affine.
Usage
ibm_is_linear(mapper, ...)
# Default S3 method
ibm_is_linear(mapper, ...)
# S3 method for class 'bm_multi'
ibm_is_linear(mapper, multi = FALSE, ...)
# S3 method for class 'bm_collect'
ibm_is_linear(mapper, inla_f = FALSE, multi = FALSE, ...)
# S3 method for class 'bm_sum'
ibm_is_linear(mapper, multi = FALSE, ...)Arguments
- mapper
A mapper S3 object, inheriting from
bru_mapper.- ...
Arguments passed on to other methods
- multi
logical; If
TRUE(or positive), recurse one level into sub-mappers- inla_f
logical; when
TRUEforibm_n()andibm_values(), the result must be compatible with theINLA::f(...)and correspondingINLA::inla.stack(...)constructions. Foribm_{eval,jacobian,linear}, theinputinterpretation may be different. Implementations do not normally need to do anything different, except for mappers of the type needed for hidden multicomponent models such as "bym2", which can be handled bybm_collect.
Methods (by class)
ibm_is_linear(default): Returns logicalis_linearfrom the mapper object if it exists, and otherwiseTRUE.
See also
Other mapper methods:
bru_mapper_generics,
ibm_eval(),
ibm_eval2(),
ibm_inla_subset(),
ibm_invalid_output(),
ibm_jacobian(),
ibm_linear(),
ibm_n(),
ibm_n_output(),
ibm_names(),
ibm_simplify(),
ibm_values()
Other specific bm_multi method implementations:
bm_multi(),
ibm_eval(),
ibm_invalid_output(),
ibm_jacobian(),
ibm_linear(),
ibm_n(),
ibm_n_output(),
ibm_names(),
ibm_values()
Other specific bm_collect method implementations:
bm_collect(),
ibm_eval(),
ibm_invalid_output(),
ibm_jacobian(),
ibm_linear(),
ibm_n(),
ibm_n_output(),
ibm_names(),
ibm_values()
Other specific bm_sum method implementations:
bm_sum(),
ibm_eval(),
ibm_invalid_output(),
ibm_jacobian(),
ibm_linear(),
ibm_n(),
ibm_n_output(),
ibm_names(),
ibm_values()