pub enum Error {
Show 15 variants
NotPrimePower(u32),
DivisionByZero {
order: u32,
},
ElementOutOfRange {
value: u32,
order: u32,
},
NoIrreduciblePolynomial(u32),
InvalidParams {
message: String,
},
TooManyFactors {
factors: usize,
max: usize,
algorithm: &'static str,
},
LevelsNotPrimePower {
levels: u32,
algorithm: &'static str,
},
RequiresPowerOfTwo {
levels: u32,
algorithm: &'static str,
},
InvalidStrength {
strength: u32,
min: u32,
max: u32,
algorithm: &'static str,
},
ConstructionFailed {
message: String,
},
NoSuitableAlgorithm {
runs: usize,
factors: usize,
levels: u32,
strength: u32,
},
VerificationFailed {
message: String,
},
StrengthMismatch {
claimed: u32,
actual: u32,
},
DimensionMismatch {
expected: String,
actual: String,
},
IndexOutOfBounds {
index: usize,
size: usize,
},
}Expand description
The main error type for the taguchi library.
Variants§
NotPrimePower(u32)
The specified order is not a prime power.
DivisionByZero
Attempted division by zero in a Galois field.
ElementOutOfRange
Element value is out of range for the specified field.
NoIrreduciblePolynomial(u32)
No irreducible polynomial is known for the specified field order.
InvalidParams
Invalid OA parameters.
TooManyFactors
The number of factors exceeds the maximum allowed by the construction.
Fields
LevelsNotPrimePower
The number of levels is not a prime power as required.
Fields
RequiresPowerOfTwo
The construction requires levels to be a power of 2.
Fields
InvalidStrength
The strength is invalid for the construction.
Fields
ConstructionFailed
Construction failed with a specific reason.
NoSuitableAlgorithm
No suitable algorithm found for the requested parameters.
Fields
VerificationFailed
Verification of OA properties failed.
StrengthMismatch
The array does not have the claimed strength.
DimensionMismatch
Array dimensions are inconsistent.
IndexOutOfBounds
Index is out of bounds.
Implementations§
Source§impl Error
impl Error
Sourcepub fn invalid_params(message: impl Into<String>) -> Self
pub fn invalid_params(message: impl Into<String>) -> Self
Create a new InvalidParams error.
Sourcepub fn construction_failed(message: impl Into<String>) -> Self
pub fn construction_failed(message: impl Into<String>) -> Self
Create a new ConstructionFailed error.
Sourcepub fn verification_failed(message: impl Into<String>) -> Self
pub fn verification_failed(message: impl Into<String>) -> Self
Create a new VerificationFailed error.