% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{inlabru_group_cv_block_conversion}
\alias{inlabru_group_cv_block_conversion}
\title{Convert node-block indices into groups of node indices}
\usage{
inlabru_group_cv_block_conversion(block, max_block, per_node)
}
\arguments{
\item{block}{An integer vector of 1-based block indices, one for each node.}

\item{max_block}{Precomputed maximal value of \code{block}. Must be at least
as large as \code{max(block)}. Block indices larger than \code{max_block} are ignored.}

\item{per_node}{Logical; if \code{FALSE}, the function returns a list with
one element for each block. If \code{TRUE}, the function returns a list with
one element for each node.}
}
\value{
If \code{per_node} is \code{false}, a list of integer vectors, where each
vector contains the 1-based node indices of nodes belonging to the
corresponding block. If \code{per_node} is \code{true}, a list of integer vectors,
where each vector contains the 1-based node indices of nodes belonging to
the same block as the corresponding node; \code{b[i] <- a[block[j]]}
}
\description{
Converts a vector of block indices into a list of
node index vectors.
}
\keyword{internal}
