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<F: Field> Add<&ConstraintVariable<F>> for &ConstraintVariable<F>
impl<F: Field> Add<&ConstraintVariable<F>> for &ConstraintVariable<F>
Source§type Output = ConstraintVariable<F>
type Output = ConstraintVariable<F>
The resulting type after applying the
+
operator.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<'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>
Source§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>
Source§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<F: Field> Sub<&ConstraintVariable<F>> for &ConstraintVariable<F>
impl<F: Field> Sub<&ConstraintVariable<F>> for &ConstraintVariable<F>
Source§type Output = ConstraintVariable<F>
type Output = ConstraintVariable<F>
The resulting type after applying the
-
operator.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<'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>
Source§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>
Source§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> Freeze for ConstraintVariable<F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more