binius_math

Trait CompositionPoly

Source
pub trait CompositionPoly<F: Field>:
    Debug
    + Send
    + Sync {
    // Required methods
    fn n_vars(&self) -> usize;
    fn degree(&self) -> usize;
    fn binary_tower_level(&self) -> usize;
    fn expression<FE: ExtensionField<F>>(&self) -> ArithExpr<FE>;
    fn evaluate<P: PackedField<Scalar: ExtensionField<F>>>(
        &self,
        query: &[P],
    ) -> Result<P, Error>;
    fn batch_evaluate<P: PackedField<Scalar: ExtensionField<F>>>(
        &self,
        batch_query: &[&[P]],
        evals: &mut [P],
    ) -> Result<(), Error>;
}
Expand description

A generic version of the CompositionPolyOS trait that is not object-safe.

Required Methods§

Source

fn n_vars(&self) -> usize

Source

fn degree(&self) -> usize

Source

fn binary_tower_level(&self) -> usize

Source

fn expression<FE: ExtensionField<F>>(&self) -> ArithExpr<FE>

Source

fn evaluate<P: PackedField<Scalar: ExtensionField<F>>>( &self, query: &[P], ) -> Result<P, Error>

Source

fn batch_evaluate<P: PackedField<Scalar: ExtensionField<F>>>( &self, batch_query: &[&[P]], evals: &mut [P], ) -> Result<(), Error>

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.

Implementations on Foreign Types§

Source§

impl<'a, F: Field, T: 'a + CompositionPoly<F> + ?Sized> CompositionPoly<F> for &'a T
where &'a T: Debug + Send + Sync,

Source§

fn n_vars(&self) -> usize

Source§

fn degree(&self) -> usize

Source§

fn binary_tower_level(&self) -> usize

Source§

fn expression<FE: ExtensionField<F>>(&self) -> ArithExpr<FE>

Source§

fn evaluate<P: PackedField<Scalar: ExtensionField<F>>>( &self, query: &[P], ) -> Result<P, Error>

Source§

fn batch_evaluate<P: PackedField<Scalar: ExtensionField<F>>>( &self, batch_query: &[&[P]], evals: &mut [P], ) -> Result<(), Error>

Implementors§