pub struct JointLookup<SingleLookup, LookupTableID> {
    pub table_id: LookupTableID,
    pub entry: Vec<SingleLookup>,
}
Expand description

A spec for checking that the given vector belongs to a vector-valued lookup table.

Fields§

§table_id: LookupTableID

The ID for the table associated with this lookup. Positive IDs are intended to be used for the fixed tables associated with individual gates, with negative IDs reserved for gates defined by the particular constraint system to avoid accidental collisions.

§entry: Vec<SingleLookup>

Implementations§

source§

impl<F: Zero + One + Clone + Neg<Output = F> + From<u64>> JointLookup<F, F>

source

pub fn evaluate(&self, joint_combiner: &F, table_id_combiner: &F) -> F

Evaluate the combined value of a joint-lookup.

source§

impl<F: Copy> JointLookup<SingleLookup<F>, LookupTableID>

source

pub fn reduce<K, G: Fn(LocalPosition) -> K>( &self, eval: &G ) -> JointLookupValue<K>where K: Zero + Mul<F, Output = K> + Neg<Output = K> + From<u64>,

Reduce linear combinations in the lookup entries to a single value, resolving local positions using the given function.

source

pub fn evaluate<K, G: Fn(LocalPosition) -> K>( &self, joint_combiner: &K, table_id_combiner: &K, eval: &G ) -> Kwhere K: Zero + One + Clone + Mul<F, Output = K> + Neg<Output = K> + From<u64>,

Evaluate the combined value of a joint-lookup, resolving local positions using the given function.

Trait Implementations§

source§

impl<SingleLookup: Clone, LookupTableID: Clone> Clone for JointLookup<SingleLookup, LookupTableID>

source§

fn clone(&self) -> JointLookup<SingleLookup, LookupTableID>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<SingleLookup: Debug, LookupTableID: Debug> Debug for JointLookup<SingleLookup, LookupTableID>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, SingleLookup, LookupTableID> Deserialize<'de> for JointLookup<SingleLookup, LookupTableID>where SingleLookup: Deserialize<'de>, LookupTableID: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de, F, G: DeserializeAs<'de, F>> DeserializeAs<'de, JointLookup<F, F>> for JointLookupValue<G>

source§

fn deserialize_as<D>(deserializer: D) -> Result<JointLookupValue<F>, D::Error>where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
source§

impl<SingleLookup, LookupTableID> Serialize for JointLookup<SingleLookup, LookupTableID>where SingleLookup: Serialize, LookupTableID: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<F, G> SerializeAs<JointLookup<F, F>> for JointLookupValue<G>where G: SerializeAs<F>,

source§

fn serialize_as<S>( source: &JointLookupValue<F>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

Serialize this value into the given Serde serializer.

Auto Trait Implementations§

§

impl<SingleLookup, LookupTableID> RefUnwindSafe for JointLookup<SingleLookup, LookupTableID>where LookupTableID: RefUnwindSafe, SingleLookup: RefUnwindSafe,

§

impl<SingleLookup, LookupTableID> Send for JointLookup<SingleLookup, LookupTableID>where LookupTableID: Send, SingleLookup: Send,

§

impl<SingleLookup, LookupTableID> Sync for JointLookup<SingleLookup, LookupTableID>where LookupTableID: Sync, SingleLookup: Sync,

§

impl<SingleLookup, LookupTableID> Unpin for JointLookup<SingleLookup, LookupTableID>where LookupTableID: Unpin, SingleLookup: Unpin,

§

impl<SingleLookup, LookupTableID> UnwindSafe for JointLookup<SingleLookup, LookupTableID>where LookupTableID: UnwindSafe, SingleLookup: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,