% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{generate_projection_indexes}
\alias{generate_projection_indexes}
\title{Generate projection index sets}
\usage{
generate_projection_indexes(d, p)
}
\arguments{
\item{d}{Integer. Total number of dimensions.}

\item{p}{Integer. Projection subset size (number of dimensions per projection).}
}
\value{
A list of integer vectors. Each element is a vector of 0-based
  column indices representing one projection.
}
\description{
Generates projection index sets for high-dimensional multivariate detectors
using circular combinations.
}
\details{
This function generates systematic projection sets for use with multivariate
detectors. The circular combination approach ensures good coverage of the
dimensional space while keeping the number of projections manageable.
}
\examples{
\donttest{
# Generate 2-dimensional projections from 5 dimensions
proj <- generate_projection_indexes(d = 5, p = 2)
print(proj)

# Use with multivariate detector
det <- detector_create(type = "multivariate", dim_indexes = proj)
set.seed(42)
d <- 5

# Create data: changepoint at t=1000
Y_multi <- rbind(
    matrix(rnorm(1000 * d, mean = -1, 1), ncol = d),
    matrix(rnorm(500 * d, mean = 1.2), ncol = d)
)

# Full multivariate detection
system.time(
res_multi <- focus_offline(Y_multi, threshold = Inf,
                           type = "multivariate", family = "gaussian")
)

# Low-dimensional projection approximation
dim_indexes <- generate_projection_indexes(5, 2)
system.time(
res_multi_approx <- focus_offline(Y_multi, threshold = Inf,
                                  type = "multivariate", family = "gaussian",
                                  dim_indexes = dim_indexes)
)

# Verify similarity
all.equal(res_multi$stat, res_multi_approx$stat)
}

}
