Engines
There are many algorithms to create covering test sets. This library implements two, and you can select which one to use with a keyword argument.
IPOG
: Default The in-parameter-order generator is fast and gives the same result every time.GND
: This greedy, non-deterministic generator searches for shorter answers and can be slow.Excursion
: The excursions aren't much of an algorithm. This is a tag to ask theall_tuples
function to generate excursions.
For instance, this example has ten parameters which can each take one of four values.
parameters = fill(collect(1:4), 10)
fast_and_longer = all_pairs(parameters...; engine = IPOG())
28-element Vector{Vector{Int64}}: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] [1, 2, 2, 2, 2, 2, 2, 2, 2, 2] [1, 3, 3, 3, 3, 3, 3, 3, 3, 3] [1, 4, 4, 4, 4, 4, 4, 4, 4, 4] [2, 1, 2, 3, 4, 1, 2, 3, 4, 1] [2, 2, 1, 4, 3, 2, 1, 4, 3, 2] [2, 3, 4, 1, 2, 3, 4, 1, 2, 3] [2, 4, 3, 2, 1, 4, 3, 2, 1, 4] [3, 1, 3, 4, 2, 1, 3, 4, 2, 1] [3, 2, 4, 3, 1, 2, 4, 3, 1, 2] ⋮ [4, 4, 3, 4, 2, 3, 2, 1, 3, 2] [1, 4, 1, 3, 1, 1, 4, 4, 3, 3] [2, 3, 4, 3, 4, 1, 3, 1, 2, 2] [3, 2, 2, 1, 3, 1, 3, 4, 2, 4] [4, 1, 1, 4, 3, 3, 2, 3, 1, 4] [1, 1, 3, 3, 4, 2, 4, 2, 1, 3] [2, 2, 1, 2, 1, 4, 3, 1, 2, 3] [3, 2, 2, 2, 3, 3, 4, 3, 4, 1] [4, 1, 4, 4, 4, 4, 2, 2, 3, 2]
rng = Random.MersenneTwister(9790242)
slow_and_short = all_pairs(parameters...; engine = GND(rng = rng, M = 50))
35-element Vector{Vector{Int64}}: [3, 1, 2, 1, 4, 2, 1, 2, 3, 4] [1, 2, 3, 3, 3, 1, 3, 4, 1, 4] [2, 4, 1, 2, 1, 2, 4, 4, 2, 3] [4, 4, 4, 4, 4, 4, 2, 4, 4, 1] [2, 3, 2, 3, 2, 3, 1, 1, 4, 1] [3, 1, 4, 2, 2, 1, 2, 1, 2, 2] [3, 1, 3, 3, 1, 4, 4, 3, 1, 1] [4, 4, 1, 1, 2, 1, 1, 3, 3, 3] [1, 3, 1, 2, 1, 4, 1, 2, 3, 2] [2, 4, 1, 4, 4, 3, 3, 1, 1, 2] ⋮ [3, 3, 1, 3, 4, 2, 4, 3, 1, 3] [4, 1, 4, 3, 1, 4, 1, 1, 3, 4] [1, 3, 2, 4, 3, 4, 4, 3, 2, 1] [3, 2, 1, 3, 1, 3, 4, 2, 2, 2] [4, 4, 4, 4, 4, 2, 1, 2, 1, 4] [2, 2, 1, 2, 3, 1, 3, 2, 1, 1] [1, 1, 4, 1, 4, 4, 2, 4, 2, 4] [4, 3, 4, 3, 2, 1, 3, 3, 1, 4] [3, 3, 1, 1, 3, 2, 3, 4, 3, 2]