% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mappers.R
\name{bm_reparam}
\alias{bm_reparam}
\title{Mapper for reparameterising mapper states}
\usage{
bm_reparam(mapper, B)
}
\arguments{
\item{mapper}{A \code{bru_mapper} object}

\item{B}{a square or rectangular basis conversion matrix}
}
\description{
Creates a mapper for handling basis conversions. Functionally
equivalent to \code{bm_pipe(list(bm_matrix(ncol(B)), mapper))}, but with an
internally stored matrix input \code{B} for efficiency, and allowing the mapper
\code{input} format to be identical to that of the original \code{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))))

}
\seealso{
\link{bru_mapper}, \link{bru_mapper_generics}

Other mappers: 
\code{\link{bm_aggregate}()},
\code{\link{bm_collect}()},
\code{\link{bm_const}()},
\code{\link{bm_factor}()},
\code{\link{bm_fm_mesh_1d}},
\code{\link{bm_fmesher}()},
\code{\link{bm_harmonics}()},
\code{\link{bm_index}()},
\code{\link{bm_linear}()},
\code{\link{bm_logitaverage}()},
\code{\link{bm_logsumexp}()},
\code{\link{bm_marginal}()},
\code{\link{bm_matrix}()},
\code{\link{bm_multi}()},
\code{\link{bm_pipe}()},
\code{\link{bm_repeat}()},
\code{\link{bm_scale}()},
\code{\link{bm_shift}()},
\code{\link{bm_sum}()},
\code{\link{bm_taylor}()},
\code{\link{bru_get_mapper}()},
\code{\link{bru_mapper}()}
}
\concept{mappers}
