pub struct PhaseOptPolynom<C: Coef> { /* private fields */ }Expand description
Represent a polynomial which internally uses the phase change optimization from the
FMCAD’24 paper: “Symbolic Computer Algebra for Multipliers Revisited - It’s All About Orders and Phases”
Note that replace_var is not directly supported. Instead, you will need to use the
replace_... methods specialized for particular gate types.
Implementations§
Source§impl<C: Coef> PhaseOptPolynom<C>
impl<C: Coef> PhaseOptPolynom<C>
pub fn new(m: Mod) -> Self
pub fn with_max_mod() -> Self
pub fn from_monoms(m: Mod, monoms: impl Iterator<Item = (C, Term)>) -> Self
Source§impl<C: Coef> PhaseOptPolynom<C>
Operations that transparently call the corresponding method in the underlying polynom.
impl<C: Coef> PhaseOptPolynom<C>
Operations that transparently call the corresponding method in the underlying polynom.
Source§impl<C: Coef> PhaseOptPolynom<C>
Phase information and manipulation
impl<C: Coef> PhaseOptPolynom<C>
Phase information and manipulation
Source§impl<C: Coef> PhaseOptPolynom<C>
Routines to replace specific gate types
impl<C: Coef> PhaseOptPolynom<C>
Routines to replace specific gate types
Sourcepub fn replace_and_not(&mut self, out: VarIndex, a: VarIndex, b: VarIndex)
pub fn replace_and_not(&mut self, out: VarIndex, a: VarIndex, b: VarIndex)
out = a && !b
Sourcepub fn replace_and_not_not(&mut self, out: VarIndex, a: VarIndex, b: VarIndex)
pub fn replace_and_not_not(&mut self, out: VarIndex, a: VarIndex, b: VarIndex)
out = !a && !b
pub fn replace_and(&mut self, out: VarIndex, a: VarIndex, b: VarIndex)
pub fn replace_or(&mut self, out: VarIndex, a: VarIndex, b: VarIndex)
pub fn replace_xor(&mut self, out: VarIndex, a: VarIndex, b: VarIndex)
pub fn replace_not(&mut self, out: VarIndex, a: VarIndex)
pub fn replace_identity(&mut self, out: VarIndex, a: VarIndex)
pub fn replace_true(&mut self, out: VarIndex)
pub fn replace_false(&mut self, out: VarIndex)
Trait Implementations§
Source§impl<C: Clone + Coef> Clone for PhaseOptPolynom<C>
impl<C: Clone + Coef> Clone for PhaseOptPolynom<C>
Source§fn clone(&self) -> PhaseOptPolynom<C>
fn clone(&self) -> PhaseOptPolynom<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Coef> From<PhaseOptPolynom<C>> for Polynom<C>
impl<C: Coef> From<PhaseOptPolynom<C>> for Polynom<C>
Source§fn from(value: PhaseOptPolynom<C>) -> Self
fn from(value: PhaseOptPolynom<C>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for PhaseOptPolynom<C>
impl<C> RefUnwindSafe for PhaseOptPolynom<C>where
C: RefUnwindSafe,
impl<C> Send for PhaseOptPolynom<C>where
C: Send,
impl<C> Sync for PhaseOptPolynom<C>where
C: Sync,
impl<C> Unpin for PhaseOptPolynom<C>where
C: Unpin,
impl<C> UnsafeUnpin for PhaseOptPolynom<C>
impl<C> UnwindSafe for PhaseOptPolynom<C>where
C: UnwindSafe,
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