SaSolution

Trait SaSolution 

Source
pub trait SaSolution:
    Clone
    + Send
    + Sync {
    // Required methods
    fn objective(&self) -> f64;
    fn set_objective(&mut self, value: f64);
}
Expand description

Trait for solutions in Simulated Annealing.

Required Methods§

Source

fn objective(&self) -> f64

Returns the objective value (fitness) of this solution. Higher values are better (maximization).

Source

fn set_objective(&mut self, value: f64)

Sets the objective value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§