pub struct SeparableDecomposition {
pub num_vars: usize,
pub constant: bool,
pub blocks: Vec<Vec<usize>>,
pub block_truths: Vec<Vec<bool>>,
}Expand description
A direct-sum decomposition f = constant ⊕ ⊕ᵢ fᵢ(x_{Bᵢ}) over independent variable blocks.
Fields§
§num_vars: usize§constant: boolThe XOR of the empty monomial — the standalone constant term.
blocks: Vec<Vec<usize>>A partition of the RELEVANT variables into independent blocks (each sorted; irrelevant vars omitted).
block_truths: Vec<Vec<bool>>Each block’s function as a 2^{|Bᵢ|} truth table, aligned with blocks (LSB-first in block order).
Implementations§
Source§impl SeparableDecomposition
impl SeparableDecomposition
Sourcepub fn is_separable(&self) -> bool
pub fn is_separable(&self) -> bool
Whether the function splits into two or more independent blocks.
Sourcepub fn table_bits(&self) -> usize
pub fn table_bits(&self) -> usize
The total bits of the block tables — Σ 2^{|Bᵢ|}, against 2ⁿ for the whole truth table.
Trait Implementations§
Source§impl Clone for SeparableDecomposition
impl Clone for SeparableDecomposition
Source§fn clone(&self) -> SeparableDecomposition
fn clone(&self) -> SeparableDecomposition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SeparableDecomposition
impl RefUnwindSafe for SeparableDecomposition
impl Send for SeparableDecomposition
impl Sync for SeparableDecomposition
impl Unpin for SeparableDecomposition
impl UnsafeUnpin for SeparableDecomposition
impl UnwindSafe for SeparableDecomposition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more