pub enum ConstraintVariable<F: Field> {
LC(LinearCombination<F>),
Var(Variable),
}
Expand description
Either a Variable
or a LinearCombination
.
Variants§
LC(LinearCombination<F>)
A wrapper around a LinearCombination
.
Var(Variable)
A wrapper around a Variable
.
Implementations§
source§impl<F: Field> ConstraintVariable<F>
impl<F: Field> ConstraintVariable<F>
sourcepub fn negate_in_place(&mut self)
pub fn negate_in_place(&mut self)
Negate the coefficients of all variables in self
.
sourcepub fn double_in_place(&mut self)
pub fn double_in_place(&mut self)
Double the coefficients of all variables in self
.
Trait Implementations§
source§impl<'a, F: Field> Add<&'a ConstraintVariable<F>> for ConstraintVariable<F>
impl<'a, F: Field> Add<&'a ConstraintVariable<F>> for ConstraintVariable<F>
source§impl<F: Field> Add<&ConstraintVariable<F>> for &ConstraintVariable<F>
impl<F: Field> Add<&ConstraintVariable<F>> for &ConstraintVariable<F>
§type Output = ConstraintVariable<F>
type Output = ConstraintVariable<F>
The resulting type after applying the
+
operator.source§impl<'a, F: Field> Add<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
impl<'a, F: Field> Add<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
source§impl<F: Field> Add<LinearCombination<F>> for &ConstraintVariable<F>
impl<F: Field> Add<LinearCombination<F>> for &ConstraintVariable<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.source§fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
Performs the
+
operation. Read moresource§impl<F: Field> Add<LinearCombination<F>> for ConstraintVariable<F>
impl<F: Field> Add<LinearCombination<F>> for ConstraintVariable<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.source§fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
Performs the
+
operation. Read moresource§impl<F: Field> AddAssign<(F, Variable)> for ConstraintVariable<F>
impl<F: Field> AddAssign<(F, Variable)> for ConstraintVariable<F>
source§fn add_assign(&mut self, var: (F, Variable))
fn add_assign(&mut self, var: (F, Variable))
Performs the
+=
operation. Read moresource§impl<F: Clone + Field> Clone for ConstraintVariable<F>
impl<F: Clone + Field> Clone for ConstraintVariable<F>
source§fn clone(&self) -> ConstraintVariable<F>
fn clone(&self) -> ConstraintVariable<F>
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<F: Field> From<(F, ConstraintVariable<F>)> for ConstraintVariable<F>
impl<F: Field> From<(F, ConstraintVariable<F>)> for ConstraintVariable<F>
source§fn from((coeff, var): (F, ConstraintVariable<F>)) -> Self
fn from((coeff, var): (F, ConstraintVariable<F>)) -> Self
Converts to this type from the input type.
source§impl<F: Field> From<(F, LinearCombination<F>)> for ConstraintVariable<F>
impl<F: Field> From<(F, LinearCombination<F>)> for ConstraintVariable<F>
source§fn from((coeff, lc): (F, LinearCombination<F>)) -> Self
fn from((coeff, lc): (F, LinearCombination<F>)) -> Self
Converts to this type from the input type.
source§impl<F: Field> From<LinearCombination<F>> for ConstraintVariable<F>
impl<F: Field> From<LinearCombination<F>> for ConstraintVariable<F>
source§fn from(lc: LinearCombination<F>) -> Self
fn from(lc: LinearCombination<F>) -> Self
Converts to this type from the input type.
source§impl<F: Field> Mul<F> for ConstraintVariable<F>
impl<F: Field> Mul<F> for ConstraintVariable<F>
source§impl<F: Field> MulAssign<F> for ConstraintVariable<F>
impl<F: Field> MulAssign<F> for ConstraintVariable<F>
source§fn mul_assign(&mut self, scalar: F)
fn mul_assign(&mut self, scalar: F)
Performs the
*=
operation. Read moresource§impl<F: Field> Neg for ConstraintVariable<F>
impl<F: Field> Neg for ConstraintVariable<F>
source§impl<'a, F: Field> Sub<&'a ConstraintVariable<F>> for ConstraintVariable<F>
impl<'a, F: Field> Sub<&'a ConstraintVariable<F>> for ConstraintVariable<F>
source§impl<F: Field> Sub<&ConstraintVariable<F>> for &ConstraintVariable<F>
impl<F: Field> Sub<&ConstraintVariable<F>> for &ConstraintVariable<F>
§type Output = ConstraintVariable<F>
type Output = ConstraintVariable<F>
The resulting type after applying the
-
operator.source§impl<'a, F: Field> Sub<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
impl<'a, F: Field> Sub<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
source§impl<F: Field> Sub<LinearCombination<F>> for &ConstraintVariable<F>
impl<F: Field> Sub<LinearCombination<F>> for &ConstraintVariable<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.source§fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
Performs the
-
operation. Read moresource§impl<F: Field> Sub<LinearCombination<F>> for ConstraintVariable<F>
impl<F: Field> Sub<LinearCombination<F>> for ConstraintVariable<F>
§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.source§fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
Performs the
-
operation. Read moreAuto Trait Implementations§
impl<F> RefUnwindSafe for ConstraintVariable<F>where F: RefUnwindSafe,
impl<F> Send for ConstraintVariable<F>
impl<F> Sync for ConstraintVariable<F>
impl<F> Unpin for ConstraintVariable<F>where F: Unpin,
impl<F> UnwindSafe for ConstraintVariable<F>where F: 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