% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MFRCD.R
\name{make_connected_rcd_bounded}
\alias{make_connected_rcd_bounded}
\title{Repair a row-column design under bounded swaps}
\usage{
make_connected_rcd_bounded(
  design,
  factor_levels,
  input = c("factor_label", "number", "auto"),
  sep = "",
  tol = 1e-08,
  replication = "auto",
  horizontal_reps = 1,
  vertical_reps = 1,
  max_per_row = horizontal_reps,
  max_per_column = vertical_reps,
  max_iter = 100,
  max_candidates = NULL,
  seed = NULL,
  verbose = FALSE
)
}
\arguments{
\item{design}{A row-column design matrix.}

\item{factor_levels}{Integer vector of factor levels.}

\item{input}{Coding used by the supplied design.}

\item{sep}{Character separator used in treatment labels.}

\item{tol}{Numerical tolerance.}

\item{replication}{Replication target or "auto".}

\item{horizontal_reps}{Maximum horizontal replication bound.}

\item{vertical_reps}{Maximum vertical replication bound.}

\item{max_per_row}{Maximum allowed occurrences of a treatment in a row.}

\item{max_per_column}{Maximum allowed occurrences of a treatment in a column.}

\item{max_iter}{Maximum number of repair iterations.}

\item{max_candidates}{Maximum number of candidate swaps to examine.}

\item{seed}{Optional random seed.}

\item{verbose}{Logical; if TRUE, emit progress or summary messages.}
}
\value{
A list, matrix, data frame, or classed object containing the requested row-column design information.
}
\description{
Repair a row-column design under bounded swaps.
}
\examples{
D <- matrix(c(1, 2, 3, 4), nrow = 2)
res <- make_connected_rcd_bounded(
  D, factor_levels = c(2, 2), input = "number",
  max_iter = 1, max_candidates = 5
)
stopifnot(is.list(res))
}
