Creates a mapper for handling basis conversions. Functionally
equivalent to bm_pipe(list(bm_matrix(ncol(B)), mapper)), but with an
internally stored matrix input B for efficiency, and allowing the mapper
input format to be identical to that of the original mapper.
See also
bru_mapper, bru_mapper_generics
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_multi(),
bm_pipe(),
bm_repeat(),
bm_scale(),
bm_shift(),
bm_sum(),
bm_taylor(),
bru_get_mapper(),
bru_mapper()
Examples
# 2->2 reparameterisation; (u1,u2) -> (u1, u1 + u2)
(m <- bm_reparam(bm_index(2), B = matrix(c(1, 1, 0, 1), 2, 2)))
#> reparam(index)
# 2->3 reparameterisation; (u1,u2) -> (u1, u2, u1+u2)
# This is an example of a low-rank representation of a higher-dimensional
# state vector.
(m <- bm_reparam(bm_index(3), B = cbind(c(1, 0, 1), c(0, 1, 1))))
#> reparam(index)