Expand description
§Taguchi
A state-of-the-art orthogonal array library for experimental design, Monte Carlo sampling, and combinatorial testing.
§Overview
Orthogonal arrays (OAs) are mathematical structures used in:
- Design of Experiments (DOE): Taguchi methods for quality engineering
- Monte Carlo Integration: Quasi-random sampling with better uniformity
- Software Testing: Combinatorial test case generation (OATS)
This library provides:
- Multiple construction algorithms (Bose, Bush, Bose-Bush, Addelman-Kempthorne, Hadamard)
- Full prime power support via custom Galois field arithmetic
- Verification and validation of array properties
- Modern Rust API with builder patterns and comprehensive error handling
§Quick Start
The easiest way to create an orthogonal array is with the builder:
use taguchi::OABuilder;
// Automatically selects the best construction
let oa = OABuilder::new()
.levels(3)
.factors(4)
.strength(2)
.build()
.unwrap();
assert_eq!(oa.runs(), 9); // Bose: 3²
assert_eq!(oa.factors(), 4);
assert_eq!(oa.levels(), 3);Or use a specific construction directly:
use taguchi::construct::{Constructor, Bose};
let oa = Bose::new(3)
.construct(4)
.expect("Failed to construct OA");
assert_eq!(oa.runs(), 9);
assert_eq!(oa.factors(), 4);
assert_eq!(oa.levels(), 3);§Notation
An orthogonal array is denoted as OA(N, k, s, t) where:
- N: Number of runs (rows)
- k: Number of factors (columns)
- s: Number of levels (symbols 0, 1, …, s-1)
- t: Strength (every t-column subarray contains all s^t tuples equally)
§Features
serde: Enable serialization/deserialization of OA structuresparallel: Enable parallel construction using rayonstats: Enable statistical analysis utilitiespython: Enable Python bindings via PyO3
Re-exports§
pub use builder::OABuilder;pub use builder::available_constructions;pub use builder::build_oa;pub use catalogue::get_by_name as get_standard_oa;pub use error::Error;pub use error::Result;pub use oa::compute_strength;pub use oa::verify_strength;pub use utils::is_prime;pub use utils::is_prime_power;
Modules§
- builder
- Builder pattern for constructing orthogonal arrays.
- catalogue
- Catalogue of standard Taguchi orthogonal arrays.
- construct
- Orthogonal array construction algorithms.
- error
- Error types for the taguchi library.
- gf
- Galois field (finite field) arithmetic.
- oa
- Orthogonal array core types and operations.
- prelude
- Prelude module for convenient imports.
- utils
- Utility functions for primality testing, combinatorics, and other helpers.