Enum ark_relations::r1cs::Variable
source · Expand description
Represents the different kinds of variables present in a constraint system.
Variants§
Zero
Represents the “zero” constant.
One
Represents of the “one” constant.
Instance(usize)
Represents a public instance variable.
Witness(usize)
Represents a private witness variable.
SymbolicLc(LcIndex)
Represents of a linear combination.
Implementations§
source§impl Variable
impl Variable
sourcepub fn is_instance(&self) -> bool
pub fn is_instance(&self) -> bool
Is self
an instance variable?
sourcepub fn is_witness(&self) -> bool
pub fn is_witness(&self) -> bool
Is self
a witness variable?
sourcepub fn get_lc_index(&self) -> Option<LcIndex>
pub fn get_lc_index(&self) -> Option<LcIndex>
Get the LcIndex
in self
if self.is_lc()
.
sourcepub fn get_index_unchecked(&self, witness_offset: usize) -> Option<usize>
pub fn get_index_unchecked(&self, witness_offset: usize) -> Option<usize>
Returns Some(usize)
if !self.is_lc()
, and None
otherwise.
Trait Implementations§
source§impl<'a, F: Field> Add<&'a Variable> for LinearCombination<F>
impl<'a, F: Field> Add<&'a Variable> for LinearCombination<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.source§impl<F: Field> Add<Variable> for LinearCombination<F>
impl<F: Field> Add<Variable> for LinearCombination<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.source§impl Ord for Variable
impl Ord for Variable
source§impl PartialEq<Variable> for Variable
impl PartialEq<Variable> for Variable
source§impl PartialOrd<Variable> for Variable
impl PartialOrd<Variable> for Variable
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, F: Field> Sub<&'a Variable> for LinearCombination<F>
impl<'a, F: Field> Sub<&'a Variable> for LinearCombination<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.source§impl<F: Field> Sub<Variable> for LinearCombination<F>
impl<F: Field> Sub<Variable> for LinearCombination<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.