Skip to main content

minimize

Function minimize 

Source
pub async fn minimize<P: Space>(
    space: &P,
    evaluate: impl AsyncFn(&P::Point) -> Option<Evaluation>,
    x0: P::Point,
    options: Options,
) -> GeopResult<Outcome<P::Point>>
Expand description

Minimizes Σ r(x)² from x0 among the points where c(x) = 0, with evaluate giving both and their Jacobians — by steps from the point, in space — and None where they cannot be evaluated, which makes the point infeasible. Where the constraints cannot all hold, it ends where they come closest. Always returns the best point found; whether it is good enough is the caller’s question.

evaluate is awaited: a caller running many minimizations side by side answers all their evaluations at once (see crate::solvers::system’s groups).