% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim-utils.R
\name{resolve_fc_blocks}
\alias{resolve_fc_blocks}
\title{Resolve forced-choice block and Q-matrix configuration}
\usage{
resolve_fc_blocks(
  Q.matrix,
  block.items,
  I.block,
  N.block,
  D,
  q.valid.values,
  q.row.check
)
}
\arguments{
\item{Q.matrix}{User-supplied Q-matrix or \code{NULL}.}

\item{block.items}{User-supplied block-item list or \code{NULL}.}

\item{I.block}{Default items-per-block (scalar).}

\item{N.block}{Default number of blocks (scalar).}

\item{D}{Default number of dimensions (scalar).}

\item{q.valid.values}{Allowed Q-matrix values (e.g. \code{c(0, 1)} for
MIRT/DCM, \code{c(-1, 0, 1)} for GGUM/TIRT).}

\item{q.row.check}{Function applied to each row of Q.matrix; must return
\code{TRUE} for every row.  Example: \code{function(r) any(r != 0)} or
\code{function(r) sum(abs(r)) == 1L}.}
}
\value{
A named list with components \code{I.states}, \code{N.block},
\code{I.block}, \code{block.items}, \code{Q.matrix}, \code{D}.
\code{Q.matrix} is \code{NULL} if it was not supplied and should be
generated later (e.g. by \code{sim.Q.matrix.FC} or \code{sim.data.Q.CDM}).
}
\description{
Shared validation and auto-generation logic used by
\code{sim.data.FCMIRT}, \code{sim.data.FCGGUM}, \code{sim.data.FCGDINA},
and \code{sim.data.TIRT}.
}
\keyword{internal}
