pub struct DegreeEnvironment { /* private fields */ }Expand description
This type is used to track degrees of individual variables during degree propagation.
Implementations§
Source§impl DegreeEnvironment
impl DegreeEnvironment
pub fn new() -> DegreeEnvironment
Sourcepub fn set_degree(&mut self, var: &VariableName, range: &DegreeRange) -> bool
pub fn set_degree(&mut self, var: &VariableName, range: &DegreeRange) -> bool
Sets the degree range of the given variable. Returns true on first update. TODO: Should probably take the supremum of the given range and any existing range.
Sourcepub fn set_type(&mut self, var: &VariableName, var_type: &VariableType)
pub fn set_type(&mut self, var: &VariableName, var_type: &VariableType)
Sets the type of the given variable.
Sourcepub fn degree(&self, var: &VariableName) -> Option<&DegreeRange>
pub fn degree(&self, var: &VariableName) -> Option<&DegreeRange>
Gets the degree range of the given variable.
Sourcepub fn is_local(&self, var: &VariableName) -> bool
pub fn is_local(&self, var: &VariableName) -> bool
Returns true if the given variable is a local variable.
Trait Implementations§
Source§impl Clone for DegreeEnvironment
impl Clone for DegreeEnvironment
Source§fn clone(&self) -> DegreeEnvironment
fn clone(&self) -> DegreeEnvironment
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 Default for DegreeEnvironment
impl Default for DegreeEnvironment
Source§fn default() -> DegreeEnvironment
fn default() -> DegreeEnvironment
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DegreeEnvironment
impl RefUnwindSafe for DegreeEnvironment
impl Send for DegreeEnvironment
impl Sync for DegreeEnvironment
impl Unpin for DegreeEnvironment
impl UnwindSafe for DegreeEnvironment
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