pub trait Optimizer<T> {
// Required method
fn find_min(&mut self) -> Option<(T, f64)>;
}
Expand description
Common Optimizer trait.
T
- type of a point in search space for goal function.
Required Methods§
Sourcefn find_min(&mut self) -> Option<(T, f64)>
fn find_min(&mut self) -> Option<(T, f64)>
Run an algorithm.
Returns Some((x: &T, goal: GoalValue))
, where x
- result of optimization,
goal
- value of goal function. Returns None
if an algoritm can’t find minimum of a goal function.
§Remarks
All algorithms with Optimizer
must search minimum of a goal function.