Enum snarkvm_r1cs::ConstraintVariable [−][src]
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
impl<F: Field> ConstraintVariable<F>
[src]
impl<F: Field> ConstraintVariable<F>
[src]pub fn negate_in_place(&mut self)
[src]
pub fn negate_in_place(&mut self)
[src]Negate the coefficients of all variables in self
.
pub fn double_in_place(&mut self)
[src]
pub fn double_in_place(&mut self)
[src]Double the coefficients of all variables in self
.
Trait Implementations
impl<F: Field> Add<&'_ ConstraintVariable<F>> for &ConstraintVariable<F>
[src]
impl<F: Field> Add<&'_ ConstraintVariable<F>> for &ConstraintVariable<F>
[src]type Output = ConstraintVariable<F>
type Output = ConstraintVariable<F>
The resulting type after applying the +
operator.
fn add(self, other: &ConstraintVariable<F>) -> Self::Output
[src]
fn add(self, other: &ConstraintVariable<F>) -> Self::Output
[src]Performs the +
operation. Read more
impl<'a, F: Field> Add<&'a ConstraintVariable<F>> for ConstraintVariable<F>
[src]
impl<'a, F: Field> Add<&'a ConstraintVariable<F>> for ConstraintVariable<F>
[src]impl<'a, F: Field> Add<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
[src]
impl<'a, F: Field> Add<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
[src]impl<F: Field> Add<LinearCombination<F>> for ConstraintVariable<F>
[src]
impl<F: Field> Add<LinearCombination<F>> for ConstraintVariable<F>
[src]type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the +
operator.
fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]Performs the +
operation. Read more
impl<F: Field> Add<LinearCombination<F>> for &ConstraintVariable<F>
[src]
impl<F: Field> Add<LinearCombination<F>> for &ConstraintVariable<F>
[src]type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the +
operator.
fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]Performs the +
operation. Read more
impl<F: Field> Add<Variable> for ConstraintVariable<F>
[src]
impl<F: Field> Add<Variable> for ConstraintVariable<F>
[src]impl<F: Clone + Field> Clone for ConstraintVariable<F>
[src]
impl<F: Clone + Field> Clone for ConstraintVariable<F>
[src]fn clone(&self) -> ConstraintVariable<F>
[src]
fn clone(&self) -> ConstraintVariable<F>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<F: Debug + Field> Debug for ConstraintVariable<F>
[src]
impl<F: Debug + Field> Debug for ConstraintVariable<F>
[src]impl<F: Field> From<(F, ConstraintVariable<F>)> for ConstraintVariable<F>
[src]
impl<F: Field> From<(F, ConstraintVariable<F>)> for ConstraintVariable<F>
[src]fn from((coeff, var): (F, ConstraintVariable<F>)) -> Self
[src]
fn from((coeff, var): (F, ConstraintVariable<F>)) -> Self
[src]Performs the conversion.
impl<F: Field> From<(F, LinearCombination<F>)> for ConstraintVariable<F>
[src]
impl<F: Field> From<(F, LinearCombination<F>)> for ConstraintVariable<F>
[src]fn from((coeff, lc): (F, LinearCombination<F>)) -> Self
[src]
fn from((coeff, lc): (F, LinearCombination<F>)) -> Self
[src]Performs the conversion.
impl<F: Field> From<LinearCombination<F>> for ConstraintVariable<F>
[src]
impl<F: Field> From<LinearCombination<F>> for ConstraintVariable<F>
[src]fn from(lc: LinearCombination<F>) -> Self
[src]
fn from(lc: LinearCombination<F>) -> Self
[src]Performs the conversion.
impl<F: Field> From<Variable> for ConstraintVariable<F>
[src]
impl<F: Field> From<Variable> for ConstraintVariable<F>
[src]impl<F: Field> Mul<F> for ConstraintVariable<F>
[src]
impl<F: Field> Mul<F> for ConstraintVariable<F>
[src]impl<F: Field> MulAssign<F> for ConstraintVariable<F>
[src]
impl<F: Field> MulAssign<F> for ConstraintVariable<F>
[src]fn mul_assign(&mut self, scalar: F)
[src]
fn mul_assign(&mut self, scalar: F)
[src]Performs the *=
operation. Read more
impl<F: Field> Neg for ConstraintVariable<F>
[src]
impl<F: Field> Neg for ConstraintVariable<F>
[src]impl<F: Field> Sub<&'_ ConstraintVariable<F>> for &ConstraintVariable<F>
[src]
impl<F: Field> Sub<&'_ ConstraintVariable<F>> for &ConstraintVariable<F>
[src]type Output = ConstraintVariable<F>
type Output = ConstraintVariable<F>
The resulting type after applying the -
operator.
fn sub(self, other: &ConstraintVariable<F>) -> Self::Output
[src]
fn sub(self, other: &ConstraintVariable<F>) -> Self::Output
[src]Performs the -
operation. Read more
impl<'a, F: Field> Sub<&'a ConstraintVariable<F>> for ConstraintVariable<F>
[src]
impl<'a, F: Field> Sub<&'a ConstraintVariable<F>> for ConstraintVariable<F>
[src]impl<'a, F: Field> Sub<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
[src]
impl<'a, F: Field> Sub<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F>
[src]impl<F: Field> Sub<LinearCombination<F>> for ConstraintVariable<F>
[src]
impl<F: Field> Sub<LinearCombination<F>> for ConstraintVariable<F>
[src]type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the -
operator.
fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]Performs the -
operation. Read more
impl<F: Field> Sub<LinearCombination<F>> for &ConstraintVariable<F>
[src]
impl<F: Field> Sub<LinearCombination<F>> for &ConstraintVariable<F>
[src]type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the -
operator.
fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]Performs the -
operation. Read more
Auto Trait Implementations
impl<F> RefUnwindSafe for ConstraintVariable<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for ConstraintVariable<F>
impl<F> Sync for ConstraintVariable<F>
impl<F> Unpin for ConstraintVariable<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for ConstraintVariable<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,