Skip to main content

Field

Struct Field 

Source
pub struct Field {
    pub p: i64,
    pub zetas: [i64; 128],
    pub zetas_inv: [i64; 128],
    pub gammas: [i64; 128],
    pub n_inv: i64,
}

Fields§

§p: i64§zetas: [i64; 128]§zetas_inv: [i64; 128]§gammas: [i64; 128]§n_inv: i64

Implementations§

Source§

impl Field

Source

pub const fn with_root(p: i64, zeta: i64) -> Self

Source

pub const fn new(p: i64) -> Self

Source

pub fn ntt(&self, a: &mut [i64; 256])

Source

pub fn intt(&self, a: &mut [i64; 256])

Source

pub fn basemul(&self, a: &[i64; 256], b: &[i64; 256]) -> [i64; 256]

Source

pub fn negacyclic(&self, a: &[i64; 256], b: &[i64; 256]) -> [i64; 256]

Auto Trait Implementations§

§

impl Freeze for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field

§

impl Sync for Field

§

impl Unpin for Field

§

impl UnsafeUnpin for Field

§

impl UnwindSafe for Field

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.