% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributional_designs.R
\name{Distributionally balanced designs}
\alias{Distributionally balanced designs}
\alias{dbd_circular}
\alias{dbd_tc}
\title{Distributionally balanced designs}
\usage{
dbd_circular(sample_size, spread_mat, ...)

dbd_tc(sample_size, spread_mat, ...)
}
\arguments{
\item{sample_size}{The size of the desired sample.}

\item{spread_mat}{A matrix of spreading covariates.}

\item{...}{
  Arguments passed on to \code{\link[=.dbd_defaults]{.dbd_defaults}}
  \describe{
    \item{\code{annealing_temp}}{The initial temperature to use in simulated annealing}
    \item{\code{annealing_cooling}}{The annealing_cooling rate tu use in simulated annealing}
    \item{\code{spatial_init}}{If \code{TRUE} a spatial initialization strategy is used}
  }}
}
\value{
A \code{dbd} object containing all possible samples.
}
\description{
Construct distributionally balanced sampling designs.
}
\details{
Use the \code{\link[=draw.dbd]{draw.dbd()}} method to draw or select a single sample from the design.
}
\section{Functions}{
\itemize{
\item \code{dbd_circular()}: Distributionally Balanced Sampling as circular sequence

\item \code{dbd_tc()}: Distributionally Balanced Sampling using Tactical Configuration

}}
\examples{
set.seed(12345);
N = 1000L;
n = 100L;
prob = rep(n / N, N);
xs = matrix(runif(N * 2), ncol = 2);

# Construct circular dbd design
design = dbd_circular(
  n,
  xs,
  annealing_temp = 0.1,
  annealing_cooling = 0.999,
  max_iter = 1e5L
);
s = draw(design); # Draw sample from design
plot(xs[, 1], xs[, 2], pch = ifelse(sample_to_indicator(s, N), 19, 1));

# Construct dbd design using tactical configuration
design = dbd_tc(
  n,
  xs,
  annealing_temp = 0.1,
  annealing_cooling = 0.999,
  max_iter = 1e5L
);
s = draw(design); # Draw sample from design
plot(xs[, 1], xs[, 2], pch = ifelse(sample_to_indicator(s, N), 19, 1));

}
\references{
Grafström, A., & Prentius, W. (2026).
Distributionally balanced sampling designs.
arXiv preprint arXiv:2603.11916.

Grafström, A., & Prentius, W. (2026).
Distributionally balanced sampling designs via minimum tactical configurations.
arXiv preprint arXiv:2603.24439.
}
