Struct circomspect_program_structure::intermediate_representation::degree_meta::DegreeEnvironment
source · 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 copy 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