bm_reparam: Mapper for reparameterising mapper states

View source: R/mappers.R

bm_reparamR Documentation

Mapper for reparameterising mapper states

Description

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.

Usage

bm_reparam(mapper, B)

Arguments

mapper

A bru_mapper object

B

a square or rectangular basis conversion matrix

Value

A bm_reparam mapper object.

See Also

bru_mapper, bru_mapper_generics

Other mappers: bm_aggregate(), bm_collect(), bm_const(), bm_expr(), 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)))

# 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))))


inlabru documentation built on July 28, 2026, 9:07 a.m.