Trait sparse_interp::EvalTypes[][src]

pub trait EvalTypes {
    type Coeff;
    type Eval;
    type EvalInfo;
    fn prep(pts: impl Iterator<Item = Self::Eval>) -> Self::EvalInfo;
fn post(
        out: &mut impl Extend<Self::Eval>,
        coeffs: &[Self::Coeff],
        info: &Self::EvalInfo
    ) -> Result<()>; }

Trait for evaluating polynomials over (possibly) a different domain.

Evaluation is divided into pre-processing EvalTypes::prep stage, which depends only on the evaluation points, and the actual evaluation phase EvalTypes::post.

Typically the provided blanket implementations for EvalTrait should be sufficient, unless you care creating a new polynomial type.

Associated Types

type Coeff[src]

Coefficient type of the polynomial being evaluated.

type Eval[src]

Type of the evaluation point(s) and the output(s) of the polynomial evaluation.

type EvalInfo[src]

Opaque type to hold pre-processing results.

Loading content...

Required methods

fn prep(pts: impl Iterator<Item = Self::Eval>) -> Self::EvalInfo[src]

Pre-processing for multi-point evaluation.

Takes a list of evaluation points and prepares an EvalInfo opaque object which can be re-used to evaluate multiple polynomials over the same evaluation points.

fn post(
    out: &mut impl Extend<Self::Eval>,
    coeffs: &[Self::Coeff],
    info: &Self::EvalInfo
) -> Result<()>
[src]

Multi-point evaluation after pre-processing.

Loading content...

Implementors

impl<C, U> EvalTypes for EvalTrait<ClassicalTraits<C>, U> where
    C: Clone,
    U: Clone + Zero + MulAssign + AddAssign,
    DefConv<C, U>: OneWay<Source = C, Dest = U>, 
[src]

type Coeff = C

type Eval = U

type EvalInfo = Vec<U>

Loading content...