pub struct Selector { /* private fields */ }Expand description
Identifies one slot inside the stacked polynomial.
Implementations§
Source§impl Selector
impl Selector
Sourcepub const fn new(num_variables: usize, index: usize) -> Self
pub const fn new(num_variables: usize, index: usize) -> Self
Builds a selector over num_variables bits pointing at slot index.
§Panics
- Slot index must fit in
num_variablesbits.
Sourcepub fn point<F: Field>(&self) -> Point<F>
pub fn point<F: Field>(&self) -> Point<F>
Returns the hypercube point that addresses this slot.
Sourcepub const fn num_variables(&self) -> usize
pub const fn num_variables(&self) -> usize
Returns the number of selector bits.
Sourcepub fn lift_prefix<Ext: Field>(&self, other: &Point<Ext>) -> Point<Ext>
pub fn lift_prefix<Ext: Field>(&self, other: &Point<Ext>) -> Point<Ext>
Prefixes other with the selector bits.
Sourcepub fn lift_suffix<Ext: Field>(&self, other: &Point<Ext>) -> Point<Ext>
pub fn lift_suffix<Ext: Field>(&self, other: &Point<Ext>) -> Point<Ext>
Appends the selector bits after the local coordinates.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnsafeUnpin for Selector
impl UnwindSafe for Selector
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