Skip to main content

CircleDomain

Struct CircleDomain 

Source
pub struct CircleDomain {
    pub half_coset: Coset,
}
Expand description

A valid domain for circle polynomial interpolation and evaluation.

Valid domains are a disjoint union of two conjugate cosets: +-C + <G_n>. The ordering defined on this domain is C + iG_n, and then -C - iG_n.

Fields§

§half_coset: Coset

Implementations§

Source§

impl CircleDomain

Source

pub const fn new(half_coset: Coset) -> Self

Given a coset C + <G_n>, constructs the circle domain +-C + <G_n> (i.e., this coset and its conjugate).

Source

pub fn iter( &self, ) -> Chain<CosetIterator<CirclePoint<BaseField>>, CosetIterator<CirclePoint<BaseField>>>

Source

pub fn iter_indices( &self, ) -> Chain<CosetIterator<CirclePointIndex>, CosetIterator<CirclePointIndex>>

Iterates over point indices.

Source

pub const fn size(&self) -> usize

Returns the size of the domain.

Source

pub const fn log_size(&self) -> u32

Returns the log size of the domain.

Source

pub fn at(&self, i: usize) -> CirclePoint<BaseField>

Returns the i th domain element.

Source

pub fn index_at(&self, i: usize) -> CirclePointIndex

Returns the CirclePointIndex of the ith domain element.

Source

pub fn is_canonic(&self) -> bool

Returns true if the domain is canonic.

Canonic domains are domains with elements that are the entire set of points defined by G_2n + <G_n> where G_n and G_2n are obtained by repeatedly doubling crate::core::circle::M31_CIRCLE_GEN.

Source

pub fn split(&self, log_parts: u32) -> (CircleDomain, Vec<CirclePointIndex>)

Splits a circle domain into a smaller CircleDomains, shifted by offsets.

Source

pub fn shift(&self, shift: CirclePointIndex) -> CircleDomain

Trait Implementations§

Source§

impl Clone for CircleDomain

Source§

fn clone(&self) -> CircleDomain

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for CircleDomain

Source§

impl Debug for CircleDomain

Source§

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

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

impl Eq for CircleDomain

Source§

impl From<CircleDomain> for LineDomain

Source§

fn from(domain: CircleDomain) -> Self

Converts to this type from the input type.
Source§

impl IntoIterator for CircleDomain

Source§

fn into_iter( self, ) -> Chain<CosetIterator<CirclePoint<BaseField>>, CosetIterator<CirclePoint<BaseField>>>

Iterates over the points in the domain.

Source§

type Item = CirclePoint<M31>

The type of the elements being iterated over.
Source§

type IntoIter = Chain<CosetIterator<CirclePoint<M31>>, CosetIterator<CirclePoint<M31>>>

Which kind of iterator are we turning this into?
Source§

impl PartialEq for CircleDomain

Source§

fn eq(&self, other: &CircleDomain) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CircleDomain

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more