ExtensionField

Trait ExtensionField 

Source
pub trait ExtensionField<Base: Field>:
    Field
    + Algebra<Base>
    + BasedVectorSpace<Base> {
    type ExtensionPacking: PackedFieldExtension<Base, Self> + 'static + Copy + Send + Sync;

    // Required methods
    fn is_in_basefield(&self) -> bool;
    fn as_base(&self) -> Option<Base>;
}
Expand description

A field EF which is also an algebra over a field F.

This provides a couple of convenience methods on top of the standard methods provided by Field, Algebra<F> and BasedVectorSpace<F>.

It also provides a type which handles packed vectors of extension field elements.

Required Associated Types§

Source

type ExtensionPacking: PackedFieldExtension<Base, Self> + 'static + Copy + Send + Sync

Required Methods§

Source

fn is_in_basefield(&self) -> bool

Determine if the given element lies in the base field.

Source

fn as_base(&self) -> Option<Base>

If the element lies in the base field project it down. Otherwise return None.

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§