| Type: | Package |
| Title: | Fast Strength-t Coverage Verification for Covering Arrays |
| Version: | 0.2.0 |
| Description: | Verifies that an array covers every t-way interaction, the certificate check for covering arrays, using compiled C code with optional 'OpenMP' threading. Supports uniform and mixed-level (per-column symbol counts) arrays. Missing values mark flexible ("don't care") entries, which contribute nothing to coverage, so a verified array remains covering however they are filled. Designed to be easy to embed in other packages: a single C file with a registered .Call entry point and one R wrapper. |
| License: | MIT + file LICENSE |
| URL: | https://github.com/chrispbsmolen/ca-tools |
| BugReports: | https://github.com/chrispbsmolen/ca-tools/issues |
| Encoding: | UTF-8 |
| Language: | en-US |
| Imports: | parallel |
| NeedsCompilation: | yes |
| Packaged: | 2026-09-19 22:25:58 UTC; axviam |
| Author: | Christopher Smolen [aut, cre] |
| Maintainer: | Christopher Smolen <chrispbsmolen@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-20 02:50:02 UTC |
Verify strength-t coverage of a covering array
Description
Checks that an N \times k array covers every t-way
interaction: for every choice of t columns and every
combination of their symbols, at least one row exhibits that
combination. This is the certificate check for a covering array, run
in compiled C at speeds suitable for large arrays and strengths.
Both uniform arrays (every column has v symbols, v^t
combinations per column set) and mixed-level arrays (column i
has its own v_i symbols, \prod v_i combinations per
column set) are supported; a uniform array is the degenerate
mixed-radix case in which all radices coincide.
Usage
ca_verify(x, t, v = NULL, threads = NULL, report = 10L)
Arguments
x |
an integer matrix or data frame of integers; rows are runs,
columns are factors. |
t |
interaction strength to verify (positive integer). |
v |
number of symbols. One of: |
threads |
number of threads. |
report |
maximum number of missing-tuple examples to collect. |
Value
An object of class ca_verify: a list with covered
(logical), colsets, gaps, missing_tuples,
examples (matrix; first t entries per row are 1-based
column indices, the rest the missing value combination in the input
coding), and t, v (a single integer for uniform
arrays, an integer vector of per-column symbol counts for
mixed-level arrays), N, k.
Examples
ca <- rbind(c(0,0,0), c(0,1,1), c(1,0,1), c(1,1,0))
ca_verify(ca, t = 2) # a covering array of strength 2
ca_verify(ca[-1, ], t = 2) # removing a run breaks coverage
# a mixed-level array: one 3-level and two 2-level columns
mca <- as.matrix(expand.grid(0:2, 0:1, 0:1))
ca_verify(mca, t = 2, v = c(3, 2, 2))
ca_verify(mca, t = 2) # the default infers each column's count