Struct snarkvm_algorithms::r1cs::Variable
source · pub struct Variable(_);
Expand description
Represents a variable in a constraint system.
Implementations§
source§impl Variable
impl Variable
sourcepub fn new_unchecked(idx: Index) -> Variable
pub fn new_unchecked(idx: Index) -> Variable
This constructs a variable with an arbitrary index. Circuit implementations are not recommended to use this.
sourcepub fn get_unchecked(&self) -> Index
pub fn get_unchecked(&self) -> Index
This returns the index underlying the variable. Circuit implementations are not recommended to use this.
Trait Implementations§
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<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.impl Copy for Variable
impl Eq for Variable
impl StructuralEq for Variable
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.