% 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_invalid_output}
\alias{ibm_invalid_output}
\alias{ibm_invalid_output.default}
\alias{ibm_invalid_output.bm_index}
\alias{ibm_invalid_output.bm_multi}
\alias{ibm_invalid_output.bm_collect}
\alias{ibm_invalid_output.bm_repeat}
\alias{ibm_invalid_output.bm_sum}
\title{Detect invalid input to a mapper}
\usage{
ibm_invalid_output(mapper, input, state, ...)

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

\method{ibm_invalid_output}{bm_index}(mapper, input, state, ...)

\method{ibm_invalid_output}{bm_multi}(mapper, input, state, inla_f = FALSE, multi = FALSE, ...)

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

\method{ibm_invalid_output}{bm_repeat}(mapper, input, state, ...)

\method{ibm_invalid_output}{bm_sum}(mapper, input, state, multi = FALSE, ...)
}
\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}

\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{multi}{logical;
If \code{TRUE} (or positive), recurse one level into sub-mappers}
}
\description{
Implementations should return a logical vector of length
\code{ibm_n_output(mapper, input, state, ...)} indicating which, if any,
output elements of \code{ibm_eval(mapper, input, state, ...)} are known to be
invalid.
For for multi/collect mappers, a list, when given a \code{multi=TRUE} argument.
}
\section{Methods (by class)}{
\itemize{
\item \code{ibm_invalid_output(default)}: Returns an all-\code{FALSE} logical vector.

\item \code{ibm_invalid_output(bm_index)}: Returns \code{TRUE} out-of-range input values.
Returns \code{FALSE} for in-range and \code{NA} input values (to support NA giving
zero effect).

\item \code{ibm_invalid_output(bm_multi)}: Accepts a list with
named entries, or a list with unnamed but ordered elements.
The names must match the sub-mappers, see \code{\link[=ibm_names.bm_multi]{ibm_names.bm_multi()}}.
Each list element should take a format accepted by the corresponding
sub-mapper. In case each element is a vector, the input can be given as a
data.frame with named columns, a matrix with named columns, or a matrix
with unnamed but ordered columns.

\item \code{ibm_invalid_output(bm_collect)}: Accepts a list with
named entries, or a list with unnamed but ordered elements.
The names must match the sub-mappers, see \code{\link[=ibm_names.bm_collect]{ibm_names.bm_collect()}}.
Each list element should take a format accepted by the corresponding
sub-mapper. In case each element is a vector, the input can be given as a
data.frame with named columns, a matrix with named columns, or a matrix
with unnamed but ordered columns.

\item \code{ibm_invalid_output(bm_repeat)}: Passes on the input to the corresponding method.

\item \code{ibm_invalid_output(bm_sum)}: Accepts a list with
named entries, or a list with unnamed but ordered elements.
The names must match the sub-mappers, see \code{\link[=ibm_names.bm_sum]{ibm_names.bm_sum()}}.
Each list element should take a format accepted by the corresponding
sub-mapper. In case each element is a vector, the input can be given as a
data.frame with named columns, a matrix with named columns, or a matrix
with unnamed but ordered columns.

}}
\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_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}
