Enum ark_relations::r1cs::Variable[][src]

pub enum Variable {
    Zero,
    One,
    Instance(usize),
    Witness(usize),
    SymbolicLc(LcIndex),
}

Represents the different kinds of variables present in a constraint system.

Variants

Zero

Represents the “zero” constant.

One

Represents of the “one” constant.

Instance(usize)

Represents a public instance variable.

Witness(usize)

Represents a private witness variable.

SymbolicLc(LcIndex)

Represents of a linear combination.

Implementations

impl Variable[src]

pub fn is_zero(&self) -> bool[src]

Is self the zero variable?

pub fn is_one(&self) -> bool[src]

Is self the one variable?

pub fn is_instance(&self) -> bool[src]

Is self an instance variable?

pub fn is_witness(&self) -> bool[src]

Is self a witness variable?

pub fn is_lc(&self) -> bool[src]

Is self a linear combination?

pub fn get_lc_index(&self) -> Option<LcIndex>[src]

Get the LcIndex in self if self.is_lc().

pub fn get_index_unchecked(&self, witness_offset: usize) -> Option<usize>[src]

Returns Some(usize) if !self.is_lc(), and None otherwise.

Trait Implementations

impl<'a, F: Field> Add<&'a Variable> for LinearCombination<F>[src]

type Output = Self

The resulting type after applying the + operator.

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

type Output = Self

The resulting type after applying the + operator.

impl Clone for Variable[src]

impl Copy for Variable[src]

impl Debug for Variable[src]

impl Eq for Variable[src]

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

impl Ord for Variable[src]

impl PartialEq<Variable> for Variable[src]

impl PartialOrd<Variable> for Variable[src]

impl StructuralEq for Variable[src]

impl StructuralPartialEq for Variable[src]

impl<'a, F: Field> Sub<&'a Variable> for LinearCombination<F>[src]

type Output = Self

The resulting type after applying the - operator.

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

type Output = LinearCombination<F>

The resulting type after applying the - operator.

Auto Trait Implementations

impl Send for Variable

impl Sync for Variable

impl Unpin for Variable

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> Instrument for T[src]

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

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>,