Skip to main content

QM31

Type Alias QM31 

Source
pub type QM31 = BinomialExtensionField<Complex<Mersenne31>, 2>;
Expand description

The degree-4 extension of Mersenne31: Mersenne31[i][u] with i² = -1 and u² = 2 + i.

Aliased Type§

pub struct QM31 { /* private fields */ }

Trait Implementations§

Source§

impl Add<Mersenne31> for QM31

Source§

type Output = ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Mersenne31) -> Self

Performs the + operation. Read more
Source§

impl AddAssign<Mersenne31> for QM31

Source§

fn add_assign(&mut self, rhs: Mersenne31)

Performs the += operation. Read more
Source§

impl Algebra<Mersenne31> for QM31

Source§

fn mixed_dot_product<const N: usize>(a: &[Self; N], f: &[F; N]) -> Self
where F: Dup,

Dot product between algebra elements and base field scalars. Read more
Source§

const BATCHED_LC_CHUNK: usize = 8

Optimal chunk size for batched_linear_combination. Read more
Source§

fn batched_linear_combination(values: &[Self], coeffs: &[F]) -> Self
where F: Dup,

Runtime-length linear combination: Σ values[i] * coeffs[i]. Read more
Source§

impl BasedVectorSpace<Mersenne31> for QM31

Source§

const DIMENSION: usize = 4

The dimension of the vector space, i.e. the number of elements in its basis.
Source§

fn as_basis_coefficients_slice(&self) -> &[Mersenne31]

Fixes a basis for the algebra A and uses this to map an element of A to a slice of DIMENSION F elements. Read more
Source§

fn from_basis_coefficients_fn<Fn: FnMut(usize) -> Mersenne31>(f: Fn) -> Self

Fixes a basis for the algebra A and uses this to map DIMENSION F elements to an element of A. Similar to core:array::from_fn, the DIMENSION F elements are given by Fn(0), ..., Fn(DIMENSION - 1) called in that order. Read more
Source§

fn from_basis_coefficients_iter<I: ExactSizeIterator<Item = Mersenne31>>( iter: I, ) -> Option<Self>

Fixes a basis for the algebra A and uses this to map DIMENSION F elements to an element of A. Read more
Source§

fn flatten_to_base(vec: Vec<Self>) -> Vec<Mersenne31>

Convert from a vector of Self to a vector of F by flattening the basis coefficients. Read more
Source§

fn reconstitute_from_base(vec: Vec<Mersenne31>) -> Vec<Self>

Convert from a vector of F to a vector of Self by combining the basis coefficients. Read more
Source§

fn from_basis_coefficients_slice(slice: &[F]) -> Option<Self>

Fixes a basis for the algebra A and uses this to map DIMENSION F elements to an element of A. Read more
Source§

fn ith_basis_element(i: usize) -> Option<Self>

Given a basis for the Algebra A, return the i’th basis element. Read more
Source§

impl ExtensionField<Mersenne31> for QM31

Source§

type ExtensionPacking = PackedQM31

Source§

fn is_in_basefield(&self) -> bool

Determine if the given element lies in the base field.
Source§

fn as_base(&self) -> Option<Mersenne31>

If the element lies in the base field project it down. Otherwise return None.
Source§

fn from_ext_basis_coefficients(coeffs: &[Self]) -> Option<Self>

Reassemble an element of Self from D = DIMENSION coefficients in Self via Σⱼ basisⱼ · coeffsⱼ. Returns None if coeffs.len() != Self::DIMENSION. Read more
Source§

impl From<Mersenne31> for QM31

Source§

fn from(x: Mersenne31) -> Self

Converts to this type from the input type.
Source§

impl Mul<Mersenne31> for QM31

Source§

type Output = ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Mersenne31) -> Self

Performs the * operation. Read more
Source§

impl MulAssign<Mersenne31> for QM31

Source§

fn mul_assign(&mut self, rhs: Mersenne31)

Performs the *= operation. Read more
Source§

impl Sub<Mersenne31> for QM31

Source§

type Output = ExtField<ExtField<Mersenne31, 2, Binomial<Mersenne31>>, 2, Binomial<ExtField<Mersenne31, 2, Binomial<Mersenne31>>>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Mersenne31) -> Self

Performs the - operation. Read more
Source§

impl SubAssign<Mersenne31> for QM31

Source§

fn sub_assign(&mut self, rhs: Mersenne31)

Performs the -= operation. Read more