Function metaheuristics::hill_climbing::solve [−][src]
pub fn solve<T>(problem: &mut dyn Metaheuristics<T>, runtime: Duration) -> T
Expand description
Returns an approximate solution to your optimisation problem using Hill Climbing
Parameters
problem
is the type that implements the Metaheuristics
trait.
runtime
is a time::Duration
specifying how long to spend searching for a solution.
Examples
ⓘ
let solution = metaheuristics::hill_climbing::solve(&mut problem, runtime);