Enum snarkvm_wasm::ConstraintVariable[][src]

pub enum ConstraintVariable<F> where
    F: Field
{ LC(LinearCombination<F>), Var(Variable), }

Either a Variable or a LinearCombination.

Variants

A wrapper around a LinearCombination.

A wrapper around a Variable.

Implementations

impl<F> ConstraintVariable<F> where
    F: Field
[src]

pub fn zero() -> ConstraintVariable<F>[src]

Returns an empty linear combination.

pub fn negate_in_place(&mut self)[src]

Negate the coefficients of all variables in self.

pub fn double_in_place(&mut self)[src]

Double the coefficients of all variables in self.

Trait Implementations

impl<'_, '_, F> Add<&'_ ConstraintVariable<F>> for &'_ ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the + operator.

impl<'a, F> Add<&'a ConstraintVariable<F>> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the + operator.

impl<'a, F> Add<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the + operator.

impl<F> Add<(F, Variable)> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the + operator.

impl<'_, F> Add<LinearCombination<F>> for &'_ ConstraintVariable<F> where
    F: Field
[src]

type Output = LinearCombination<F>

The resulting type after applying the + operator.

impl<F> Add<LinearCombination<F>> for ConstraintVariable<F> where
    F: Field
[src]

type Output = LinearCombination<F>

The resulting type after applying the + operator.

impl<F> Add<Variable> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the + operator.

impl<F> AddAssign<(F, Variable)> for ConstraintVariable<F> where
    F: Field
[src]

impl<F> Clone for ConstraintVariable<F> where
    F: Clone + Field
[src]

impl<F> Debug for ConstraintVariable<F> where
    F: Debug + Field
[src]

impl<F> From<(F, ConstraintVariable<F>)> for ConstraintVariable<F> where
    F: Field
[src]

impl<F> From<(F, LinearCombination<F>)> for ConstraintVariable<F> where
    F: Field
[src]

impl<F> From<(F, Variable)> for ConstraintVariable<F> where
    F: Field
[src]

impl<F> From<LinearCombination<F>> for ConstraintVariable<F> where
    F: Field
[src]

impl<F> From<Variable> for ConstraintVariable<F> where
    F: Field
[src]

impl<F> Mul<F> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the * operator.

impl<F> MulAssign<F> for ConstraintVariable<F> where
    F: Field
[src]

impl<F> Neg for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the - operator.

impl<'_, '_, F> Sub<&'_ ConstraintVariable<F>> for &'_ ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the - operator.

impl<'a, F> Sub<&'a ConstraintVariable<F>> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the - operator.

impl<'a, F> Sub<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the - operator.

impl<F> Sub<(F, Variable)> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the - operator.

impl<F> Sub<LinearCombination<F>> for ConstraintVariable<F> where
    F: Field
[src]

type Output = LinearCombination<F>

The resulting type after applying the - operator.

impl<'_, F> Sub<LinearCombination<F>> for &'_ ConstraintVariable<F> where
    F: Field
[src]

type Output = LinearCombination<F>

The resulting type after applying the - operator.

impl<F> Sub<Variable> for ConstraintVariable<F> where
    F: Field
[src]

type Output = ConstraintVariable<F>

The resulting type after applying the - operator.

Auto 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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,