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§
Sourceconst TWO_ADICITY: usize
const TWO_ADICITY: usize
Largest n such that 2^n divides p - 1.
Sourceconst TWO_ADIC_GENERATORS: Self::ArrayLike
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.
Sourceconst ROOTS_8: Self::ArrayLike
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]
Sourceconst INV_ROOTS_8: Self::ArrayLike
const INV_ROOTS_8: Self::ArrayLike
Precomputation of the inverses of ROOTS_8.
Sourceconst ROOTS_16: Self::ArrayLike
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]
Sourceconst INV_ROOTS_16: Self::ArrayLike
const INV_ROOTS_16: Self::ArrayLike
Precomputation of the inverses of ROOTS_16.
Provided Associated Constants§
Sourceconst ODD_FACTOR: i32 = _
const ODD_FACTOR: i32 = _
The odd constant r such that p = r * 2^n + 1
Required Associated Types§
Sourcetype ArrayLike: AsRef<[MontyField31<Self>]> + Sized
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.