Skip to main content

ExtensionAlgebra

Trait ExtensionAlgebra 

Source
pub trait ExtensionAlgebra<F: Field, const D: usize, Shape: ExtensionShape>: Algebra<F> {
    // 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§

Source

fn ext_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D])

Multiplication in the algebra extension ring.

Provided Methods§

Source

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.

Source

fn ext_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]

Coefficient-wise addition.

Source

fn ext_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]

Coefficient-wise subtraction.

Source

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".

Implementors§