Crate quine_mccluskey
source ·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§
- A variable as part of a
Solution
.
Enums§
- Error types for bad input and timeout.
- The form of a boolean expression.
- A minimized boolean expression.
Statics§
- All letters of the English alphabet in uppercase.
Functions§
- Minimizes the boolean function represented by the given
minterms
andmaxterms
. - Minimizes the boolean function represented by the given
maxterms
anddont_cares
. - Minimizes the boolean function represented by the given
minterms
anddont_cares
.