Enum snarkvm_wasm::ConstraintVariable [−][src]
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> ConstraintVariable<F> where
F: Field,
[src]
F: Field,
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]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the +
operator.
pub fn add(
self,
other: &ConstraintVariable<F>
) -> <&'_ ConstraintVariable<F> as Add<&'_ ConstraintVariable<F>>>::Output
[src]
self,
other: &ConstraintVariable<F>
) -> <&'_ ConstraintVariable<F> as Add<&'_ ConstraintVariable<F>>>::Output
impl<'a, F> Add<&'a ConstraintVariable<F>> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the +
operator.
pub fn add(self, other: &'a ConstraintVariable<F>) -> ConstraintVariable<F>
[src]
impl<'a, F> Add<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the +
operator.
pub fn add(self, (F, &'a ConstraintVariable<F>)) -> ConstraintVariable<F>
[src]
impl<F> Add<(F, Variable)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the +
operator.
pub fn add(self, var: (F, Variable)) -> ConstraintVariable<F>
[src]
impl<'_, F> Add<LinearCombination<F>> for &'_ ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = LinearCombination<F>
The resulting type after applying the +
operator.
pub fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
impl<F> Add<LinearCombination<F>> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = LinearCombination<F>
The resulting type after applying the +
operator.
pub fn add(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
impl<F> Add<Variable> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the +
operator.
pub fn add(self, other: Variable) -> ConstraintVariable<F>
[src]
impl<F> AddAssign<(F, Variable)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
pub fn add_assign(&mut self, var: (F, Variable))
[src]
impl<F> Clone for ConstraintVariable<F> where
F: Clone + Field,
[src]
F: Clone + Field,
pub fn clone(&self) -> ConstraintVariable<F>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F> Debug for ConstraintVariable<F> where
F: Debug + Field,
[src]
F: Debug + Field,
impl<F> From<(F, ConstraintVariable<F>)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
pub fn from((F, ConstraintVariable<F>)) -> ConstraintVariable<F>
[src]
impl<F> From<(F, LinearCombination<F>)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
pub fn from((F, LinearCombination<F>)) -> ConstraintVariable<F>
[src]
impl<F> From<(F, Variable)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
impl<F> From<LinearCombination<F>> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
pub fn from(lc: LinearCombination<F>) -> ConstraintVariable<F>
[src]
impl<F> From<Variable> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
pub fn from(var: Variable) -> ConstraintVariable<F>
[src]
impl<F> Mul<F> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the *
operator.
pub fn mul(self, scalar: F) -> ConstraintVariable<F>
[src]
impl<F> MulAssign<F> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
pub fn mul_assign(&mut self, scalar: F)
[src]
impl<F> Neg for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the -
operator.
pub fn neg(self) -> ConstraintVariable<F>
[src]
impl<'_, '_, F> Sub<&'_ ConstraintVariable<F>> for &'_ ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the -
operator.
pub fn sub(
self,
other: &ConstraintVariable<F>
) -> <&'_ ConstraintVariable<F> as Sub<&'_ ConstraintVariable<F>>>::Output
[src]
self,
other: &ConstraintVariable<F>
) -> <&'_ ConstraintVariable<F> as Sub<&'_ ConstraintVariable<F>>>::Output
impl<'a, F> Sub<&'a ConstraintVariable<F>> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the -
operator.
pub fn sub(self, other: &'a ConstraintVariable<F>) -> ConstraintVariable<F>
[src]
impl<'a, F> Sub<(F, &'a ConstraintVariable<F>)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the -
operator.
pub fn sub(self, (F, &'a ConstraintVariable<F>)) -> ConstraintVariable<F>
[src]
impl<F> Sub<(F, Variable)> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the -
operator.
pub fn sub(self, (F, Variable)) -> ConstraintVariable<F>
[src]
impl<F> Sub<LinearCombination<F>> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = LinearCombination<F>
The resulting type after applying the -
operator.
pub fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
impl<'_, F> Sub<LinearCombination<F>> for &'_ ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = LinearCombination<F>
The resulting type after applying the -
operator.
pub fn sub(self, other_lc: LinearCombination<F>) -> LinearCombination<F>
[src]
impl<F> Sub<Variable> for ConstraintVariable<F> where
F: Field,
[src]
F: Field,
type Output = ConstraintVariable<F>
The resulting type after applying the -
operator.
pub fn sub(self, other: Variable) -> ConstraintVariable<F>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,