pub trait ExtensionAlgebra<F, const D: usize, Shape>: Algebra<F>where
F: Field,
Shape: ExtensionShape,{
// Required method
fn ext_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D]);
// Provided methods
fn ext_square(a: &[Self; D], res: &mut [Self; D]) { ... }
fn ext_add(a: &[Self; D], b: &[Self; D]) -> [Self; D] { ... }
fn ext_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D] { ... }
fn ext_base_mul(lhs: [Self; D], rhs: Self) -> [Self; D] { ... }
}Expand description
Algebra over F that supports degree-D extension arithmetic with a given reducer Shape.
Required Methods§
Provided Methods§
Sourcefn ext_square(a: &[Self; D], res: &mut [Self; D])
fn ext_square(a: &[Self; D], res: &mut [Self; D])
Squaring in the algebra extension ring.
Override when a dedicated symmetry-exploiting kernel beats a general multiply.
Sourcefn ext_base_mul(lhs: [Self; D], rhs: Self) -> [Self; D]
fn ext_base_mul(lhs: [Self; D], rhs: Self) -> [Self; D]
Multiply an extension element by a base-field scalar.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".