Fraction

@Serializable
sealed class Fraction(source)

Selection of which subset of a full 2^k design to enumerate. Used by DesignSpec.TwoLevelFactorial.fraction and by DesignSpec.CentralComposite.factorialFraction (which can build a fractional core inside a CCD).

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
@Serializable
@SerialName(value = "custom")
data class Custom(val words: List<List<Int>>, val sign: Int = +1) : Fraction

Custom fractional design — one defining relation expressed as a list of "words". A defining relation has the algebraic form I = w1 = w2 = ... where each word w_i is a product of factors named by 1-based index. Example: the relation I = 124 = 135 = 2345 has three words and encodes as [[1,2,4], [1,3,5], [2,3,4,5]]. The engine glue maps each word to a Set<Int> and the list to a Set<Set<Int>> for the substrate's TwoLevelFactorialDesign.fractionalIterator(relation, sign). The fraction exponent p equals the word count; the realised design is 2^(k-p).

Link copied to clipboard
@Serializable
@SerialName(value = "full")
data object Full : Fraction

Full 2^k — all factor-level combinations. Maps to TwoLevelFactorialDesign.designIterator().

Link copied to clipboard
@Serializable
@SerialName(value = "half")
data class HalfFraction(val sign: Int = +1) : Fraction

Half-fraction (1/2 of the full 2^k). sign = +1 selects the principal half (I = ...), sign = -1 the alternate half. Maps to TwoLevelFactorialDesign.halfFractionIterator(half = sign.toDouble()).