p3_monty_31

Trait TwoAdicData

Source
pub trait TwoAdicData: MontyParameters {
    type ArrayLike: AsRef<[MontyField31<Self>]> + Sized;

    const TWO_ADICITY: usize;
    const TWO_ADIC_GENERATORS: Self::ArrayLike;
    const ROOTS_8: Self::ArrayLike;
    const INV_ROOTS_8: Self::ArrayLike;
    const ROOTS_16: Self::ArrayLike;
    const INV_ROOTS_16: Self::ArrayLike;
    const ODD_FACTOR: i32 = _;
}
Expand description

TwoAdicData contains constants needed to imply TwoAdicField for Monty31 fields.

Required Associated Constants§

Source

const TWO_ADICITY: usize

Largest n such that 2^n divides p - 1.

Source

const TWO_ADIC_GENERATORS: Self::ArrayLike

A list of generators of 2-adic subgroups. The i’th element must be a 2^i root of unity and the i’th element squared must be the i-1’th element.

Source

const ROOTS_8: Self::ArrayLike

Precomputation of the first 3 8th-roots of unity.

Must agree with the 8th-root in TWO_ADIC_GENERATORS, i.e. ROOTS_8[0] == TWO_ADIC_GENERATORS[3]

Source

const INV_ROOTS_8: Self::ArrayLike

Precomputation of the inverses of ROOTS_8.

Source

const ROOTS_16: Self::ArrayLike

Precomputation of the first 7 16th-roots of unity.

Must agree with the 16th-root in TWO_ADIC_GENERATORS, i.e. ROOTS_16[0] == TWO_ADIC_GENERATORS[4]

Source

const INV_ROOTS_16: Self::ArrayLike

Precomputation of the inverses of ROOTS_16.

Provided Associated Constants§

Source

const ODD_FACTOR: i32 = _

The odd constant r such that p = r * 2^n + 1

Required Associated Types§

Source

type ArrayLike: AsRef<[MontyField31<Self>]> + Sized

ArrayLike should usually be &'static [MontyField31].

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§