pub struct PermutationInstanceBuilder<T, const WIDTH: usize> { /* private fields */ }Expand description
A PermutationInstanceBuilder allows to build a relation for
evaluations of a permutation acting over WIDTH elements.
Implementations§
Source§impl<T: Clone + Unit, const WIDTH: usize> PermutationInstanceBuilder<T, WIDTH>
impl<T: Clone + Unit, const WIDTH: usize> PermutationInstanceBuilder<T, WIDTH>
pub fn with_allocator(allocator: VarAllocator<T>) -> Self
pub fn new() -> Self
pub const fn allocator(&self) -> &VarAllocator<T>
pub fn allocate_permutation( &self, input: &[FieldVar; WIDTH], ) -> [FieldVar; WIDTH]
pub fn add_permutation( &self, input: [FieldVar; WIDTH], output: [FieldVar; WIDTH], )
pub fn add_equation(&self, equation: LinearEquation<FieldVar, T>)where
T: PartialEq,
pub fn constraints(&self) -> impl AsRef<[QueryAnswerPair<FieldVar, WIDTH>]>
pub fn linear_constraints(&self) -> LinearConstraints<FieldVar, T>
pub fn public_vars(&self) -> Vec<(FieldVar, T)>
pub fn snapshot(&self) -> PermutationInstance<T, WIDTH>
Trait Implementations§
Source§impl<T: Clone, const WIDTH: usize> Clone for PermutationInstanceBuilder<T, WIDTH>
impl<T: Clone, const WIDTH: usize> Clone for PermutationInstanceBuilder<T, WIDTH>
Source§fn clone(&self) -> PermutationInstanceBuilder<T, WIDTH>
fn clone(&self) -> PermutationInstanceBuilder<T, WIDTH>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Unit, const WIDTH: usize> Permutation<WIDTH> for PermutationInstanceBuilder<T, WIDTH>
impl<T: Unit, const WIDTH: usize> Permutation<WIDTH> for PermutationInstanceBuilder<T, WIDTH>
Auto Trait Implementations§
impl<T, const WIDTH: usize> !RefUnwindSafe for PermutationInstanceBuilder<T, WIDTH>
impl<T, const WIDTH: usize> !UnwindSafe for PermutationInstanceBuilder<T, WIDTH>
impl<T, const WIDTH: usize> Freeze for PermutationInstanceBuilder<T, WIDTH>where
VarAllocator<T>: Freeze,
Arc<RwLock<Vec<QueryAnswerPair<FieldVar, WIDTH>>>>: Freeze,
Arc<RwLock<LinearConstraints<FieldVar, T>>>: Freeze,
impl<T, const WIDTH: usize> Send for PermutationInstanceBuilder<T, WIDTH>where
VarAllocator<T>: Send,
Arc<RwLock<Vec<QueryAnswerPair<FieldVar, WIDTH>>>>: Send,
Arc<RwLock<LinearConstraints<FieldVar, T>>>: Send,
impl<T, const WIDTH: usize> Sync for PermutationInstanceBuilder<T, WIDTH>where
VarAllocator<T>: Sync,
Arc<RwLock<Vec<QueryAnswerPair<FieldVar, WIDTH>>>>: Sync,
Arc<RwLock<LinearConstraints<FieldVar, T>>>: Sync,
impl<T, const WIDTH: usize> Unpin for PermutationInstanceBuilder<T, WIDTH>where
VarAllocator<T>: Unpin,
Arc<RwLock<Vec<QueryAnswerPair<FieldVar, WIDTH>>>>: Unpin,
Arc<RwLock<LinearConstraints<FieldVar, T>>>: Unpin,
impl<T, const WIDTH: usize> UnsafeUnpin for PermutationInstanceBuilder<T, WIDTH>where
VarAllocator<T>: UnsafeUnpin,
Arc<RwLock<Vec<QueryAnswerPair<FieldVar, WIDTH>>>>: UnsafeUnpin,
Arc<RwLock<LinearConstraints<FieldVar, T>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more