Skip to main content

Algorithm

Trait Algorithm 

Source
pub trait Algorithm<E: Equation, F: Framework> {
    type Output: FitResult;

    // Required method
    fn fit(self, problem: EstimationProblem<E, F>) -> Result<Self::Output>;
}
Expand description

Defines an algorithm that can fit an EstimationProblem to produce a result.

Implementors are the lightweight, user-facing configuration structs (e.g. NpagConfig). The heavy, mutable execution state used while fitting is an internal implementation detail.

Required Associated Types§

Source

type Output: FitResult

The specific result struct (e.g. NonParametricResult<E>).

Required Methods§

Source

fn fit(self, problem: EstimationProblem<E, F>) -> Result<Self::Output>

Consumes the configuration and the problem, runs the optimization to completion, and returns the strictly-typed result.

Implementors§