Expand description
Boolean function minimizer based on Quine-McCluskey algorithm.
§Usage
use quine_mccluskey as qmc;
let mut solutions = qmc::minimize(
&qmc::DEFAULT_VARIABLES[..3],
&[0, 5], // minterms
&[1, 3, 4, 6], // maxterms
qmc::SOP,
false,
None,
)
.unwrap();
assert_eq!(
solutions.pop().unwrap().to_string(),
"(A ∧ C) ∨ (~A ∧ ~C)"
);minimize is sufficient for all use cases. But also check minimize_minterms and
minimize_maxterms to see if they are more suitable for your use case.
§Feature flags
serde– Derives the [Serialize] and [Deserialize] traits for structs and enums.
Structs§
Enums§
- Error
- Error types for bad input and timeout.
- Form
- The form of a boolean expression.
- Solution
- A minimized boolean expression.
Statics§
- DEFAULT_
VARIABLES - All letters of the English alphabet in uppercase.
Functions§
- minimize
- Minimizes the boolean function represented by the given
mintermsandmaxterms. - minimize_
maxterms - Minimizes the boolean function represented by the given
maxtermsanddont_cares. - minimize_
minterms - Minimizes the boolean function represented by the given
mintermsanddont_cares.