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§
Required Methods§
Sourcefn fit(self, problem: EstimationProblem<E, F>) -> Result<Self::Output>
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.