Skip to contents

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

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)