Skip to main content

LocalSearch

Trait LocalSearch 

Source
pub trait LocalSearch<G> {
    // Required method
    fn improve<E, R>(
        &mut self,
        start: Individual<G>,
        max_evaluations: u64,
        evaluate: &mut E,
        rng: &mut R,
    ) -> Individual<G>
       where G: Clone,
             E: FnMut(&G) -> Option<f64>,
             R: Rng + ?Sized;
}
Expand description

Improves a genome with a bounded number of objective evaluations.

Required Methods§

Source

fn improve<E, R>( &mut self, start: Individual<G>, max_evaluations: u64, evaluate: &mut E, rng: &mut R, ) -> Individual<G>
where G: Clone, E: FnMut(&G) -> Option<f64>, R: Rng + ?Sized,

Returns the best individual found starting from start, spending at most max_evaluations calls of evaluate, which returns None once the global budget is exhausted (stop then).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§