% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mappers.R
\name{ibm_eval2}
\alias{ibm_eval2}
\alias{ibm_eval2.default}
\alias{ibm_eval2.bm_pipe}
\title{Evaluate a mapper and its Jacobian}
\usage{
ibm_eval2(mapper, input, state = NULL, ...)

\method{ibm_eval2}{default}(mapper, input, state, ...)

\method{ibm_eval2}{bm_pipe}(mapper, input, state = NULL, ...)
}
\arguments{
\item{mapper}{A mapper S3 object, inheriting from \code{bru_mapper}.}

\item{input}{Data input for the mapper.}

\item{state}{A vector of latent state values for the mapping,
of length \code{ibm_n(mapper, inla_f = FALSE)}}

\item{...}{Arguments passed on to other methods}
}
\description{
Implementations must return a list with elements \code{offset} and \code{jacobian}.
The \code{input} contents must
be in a format accepted by \code{\link[=ibm_jacobian]{ibm_jacobian()}}
for the mapper.
}
\section{Methods (by class)}{
\itemize{
\item \code{ibm_eval2(default)}: Calls \code{jacobian <- ibm_jacobian(...)} and
\code{offset <- ibm_eval(..., jacobian = jacobian)}
and returns a list with elements \code{offset} and \code{jacobian}, as needed by
\code{\link[=ibm_linear.default]{ibm_linear.default()}} and similar methods. Mapper classes can implement
their own \code{ibm_eval2} method if joint construction of evaluation and Jacobian
is more efficient than separate or sequential construction.

}}
\seealso{
Other mapper methods: 
\code{\link{bru_mapper_generics}},
\code{\link{ibm_eval}()},
\code{\link{ibm_inla_subset}()},
\code{\link{ibm_invalid_output}()},
\code{\link{ibm_is_linear}()},
\code{\link{ibm_is_rowwise}()},
\code{\link{ibm_jacobian}()},
\code{\link{ibm_linear}()},
\code{\link{ibm_n}()},
\code{\link{ibm_n_output}()},
\code{\link{ibm_names}()},
\code{\link{ibm_simplify}()},
\code{\link{ibm_values}()}
}
\concept{mapper methods}
