fuse: function to reduce the number of levels by 1

View source: R/fuse.R

swapvalsR Documentation

function to reduce the number of levels by 1

Description

reduces the number of levels by 1, achieving a reduction of the number of rows by 2. fuse can also reduce the number of levels by more than 1, reducing the number of rows by 2 for each reduction of 1 level.

Usage

fuse(D, vprior, vpost, ...)

Arguments

D

a CA with vprior levels in each column (integers, starting a 0 or 1)

vprior

the number of levels prior to applying fuse

vpost

the number of levels after applying fuse, must be smaller than vprior

...

currently not used

Value

an array of the same coverage properties and the same number of columns as D and at most nrow(D) - 2 * (vprior - vpost) rows with vpost levels per column

Details

Note that there is a variant of fusion, implemented in function fuseBose, for which the number of runs can be reduced by three; this is applicable for strength 2 with vprior a prime or prime power and up to vprior + 1 columns in D.

Functions Ns_fuse, bestN, and bestCA include fusion constructions among those competing for being best. Their default maxfuse=1 works for vprior-vpost=1; it can be increased to allow for more fusion steps.

References

Colbourn et al. (2010, CKRS; Lemma 3.1)

See Also

fuseBose(), Ns_fuse(), bestN(), bestCA()

Examples

set.seed(1212) ## for array randomization
D <- lhs::createBush(11, 12)
table(D)
dim(D)
D10 <- fuse(D, 11, 10) ## reduce by two rows and one level
table(D10)
dim(D10)
coverage(D, 3)
coverage(D10, 3)


CAs documentation built on Nov. 29, 2026, 1:06 a.m.