compositCA: Obtain a CA for non-prime number of levels by composition

View source: R/compositCA.R

compositCAR Documentation

Obtain a CA for non-prime number of levels by composition

Description

Function to construct a strength t CA in k columns at v levels, v non-prime, from two strength t CAs in fewer levels

Usage

compositCA(t, k, v, ...)

N_compositCA(t, k, v, ...)

Arguments

t

positive integer: requested strength

k

positive integer: requested number of columns

v

positive integer, non-prime: requested number of levels for each column

...

can be used for excluding ingredient types with exclude, see Ns

Value

Function compositCA yields a matrix of class ca), with levels from 0 to v-1.

Details

Function compositCA factorizes v into all variants of two factors, picks the pair that produces the smallest run size, and obtains a CA in v levels by composition from two CAs with those numbers of levels, using function crossCAs.

It uses function bestCA for obtaining the ingredient CAs. The result is rarely optimal.

Examples

################################################
## compositCA
################################################
D <- compositCA(3, 12, 9)
dim(D)
Ns(3, 12, 9) ## not competitive

D <- compositCA(4, 12, 4)
dim(D)
Ns(4, 12, 4) ## best implemented
eCAN(4, 12, 4)  ## this has not been implemented

Ns(3, 4, 12) ## best (orthogonal array)

Ns(4, 24, 12) ## slightly worse than fuseBushtCA

Ns(4, 12, 8)  ## best implemented

Ns(4, 12, 24) ## much worse than fuseBushtCA,
              ## which almost yields eCAN


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