% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mappers.R, R/mapper_collect.R,
%   R/mapper_repeat.R, R/mapper_sum.R
\name{ibm_n_output}
\alias{ibm_n_output}
\alias{ibm_n_output.default}
\alias{ibm_n_output.bm_taylor}
\alias{ibm_n_output.bm_shift}
\alias{ibm_n_output.bm_scale}
\alias{ibm_n_output.bm_aggregate}
\alias{ibm_n_output.bm_marginal}
\alias{ibm_n_output.bm_pipe}
\alias{ibm_n_output.bm_multi}
\alias{ibm_n_output.bm_reparam}
\alias{ibm_n_output.bm_collect}
\alias{ibm_n_output.bm_repeat}
\alias{ibm_n_output.bm_sum}
\title{Output size of a mapping}
\usage{
ibm_n_output(mapper, input, state = NULL, inla_f = FALSE, ...)

\method{ibm_n_output}{default}(mapper, input, state = NULL, inla_f = FALSE, ...)

\method{ibm_n_output}{bm_taylor}(mapper, input, ...)

\method{ibm_n_output}{bm_shift}(mapper, input, state = NULL, ..., n_state = NULL)

\method{ibm_n_output}{bm_scale}(mapper, input, state = NULL, ..., n_state = NULL)

\method{ibm_n_output}{bm_aggregate}(mapper, input = NULL, ...)

\method{ibm_n_output}{bm_marginal}(mapper, input, state = NULL, ..., n_state = NULL)

\method{ibm_n_output}{bm_pipe}(mapper, input, state = NULL, ..., n_state = NULL)

\method{ibm_n_output}{bm_multi}(mapper, input, ...)

\method{ibm_n_output}{bm_reparam}(mapper, ...)

\method{ibm_n_output}{bm_collect}(mapper, input, state = NULL, inla_f = FALSE, multi = FALSE, ...)

\method{ibm_n_output}{bm_repeat}(mapper, ...)

\method{ibm_n_output}{bm_sum}(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{inla_f}{logical; when \code{TRUE} for \code{ibm_n()} and \code{ibm_values()}, the
result must be compatible with the \code{INLA::f(...)} and corresponding
\code{INLA::inla.stack(...)} constructions.  For \verb{ibm_\{eval,jacobian,linear\}},
the \code{input} interpretation may be different.
Implementations do not normally need to do anything different, except
for mappers of the type needed for hidden multicomponent models such
as "bym2", which can be handled by \code{bm_collect}.}

\item{...}{Arguments passed on to other methods}

\item{n_state}{integer giving the length of the state vector for mappers
that have state dependent output size.}

\item{multi}{logical;
If \code{TRUE} (or positive), recurse one level into sub-mappers}
}
\description{
Implementations must return an integer denoting the
mapper output length.
The default implementation returns \code{NROW(input)}.
Mappers such as \code{bm_multi} and \code{bm_collect},
that can accept \code{list()} inputs require their own method implementations.
}
\section{Methods (by class)}{
\itemize{
\item \code{ibm_n_output(default)}: Returns \code{NROW(input)}

}}
\seealso{
Other mapper methods: 
\code{\link{bru_mapper_generics}},
\code{\link{ibm_eval}()},
\code{\link{ibm_eval2}()},
\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_names}()},
\code{\link{ibm_simplify}()},
\code{\link{ibm_values}()}
}
\concept{mapper methods}
