coverageSeqCA: Checking coverage for SeqCAs

View source: R/coverageSeqCA.R

coverageSeqCAR Documentation

Checking coverage for SeqCAs

Description

for a given SeqCA A and a strength t

Usage

coverageSeqCA(A, t, stop_at_first_failure=FALSE, verbose=FALSE, ...)

Arguments

A

a sequence covering array (SeqCA) with k columns and elements 1,...,k in each row

t

the strength for which the coverage of all permutations of length t must be guaranteed for all combn(k,t) t-element subsets of 1,...,k

stop_at_first_failure

logical; if TRUE, the function returns FALSE instead of a number

verbose

logical; if TRUE, the returned object has an attribute uncovered with the uncovered sequences

...

currently not used

Value

a number between 0 and 1 with attributes; the number is the proportion of covered orders (may be made more detailed in the future).
The attribute count_effective holds the counts for each row of A of the number of sequences covered here but not earlier, as proposed by Murray and Colbourn (2015).
If the proportion is smaller than one, and if verbose=TRUE, the uncovered sequences are available in the attribute uncovered of the returned value.

Usefulness

It is particularly relevant to check whether the coverage is perfect, i.e., the outcome is 1. If this is the only interest, one can stop at the first failure.

Examples

### create a trivial SeqCA of strength 2
A <- rbind(1:5, 5:1)
coverageSeqCA(A, 2)
coverageSeqCA(A, 3) ## covers a third of the 3-factor orders

## a naive greedy SeqCA of strength 3
A <- greedySeqCA_naive(5, 3, seed=2323)
dim(A)
coverageSeqCA(A,3)

A <- reduce_rows_iterative_complete(A, 3)
dim(A)

## also works from worse starting matrix
A <- greedySeqCA_naive(5, 3, seed=589)
dim(A)
A <- reduce_rows_iterative_complete(A, 3)
dim(A)   ## substantially reduced in very short time


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