Skip to main content

BenchmarkFunction

Trait BenchmarkFunction 

Source
pub trait BenchmarkFunction: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn dimension(&self) -> usize;
    fn bounds(&self) -> (f64, f64);
    fn optimal_fitness(&self) -> f64;
    fn optimal_solution(&self) -> Option<Vec<f64>>;
    fn evaluate_raw(&self, x: &[f64]) -> f64;
}
Expand description

Trait for benchmark functions

Required Methods§

Source

fn name(&self) -> &'static str

Name of the benchmark function

Source

fn dimension(&self) -> usize

Dimensionality of the problem

Source

fn bounds(&self) -> (f64, f64)

Search space bounds (min, max)

Source

fn optimal_fitness(&self) -> f64

Optimal (minimum) fitness value

Source

fn optimal_solution(&self) -> Option<Vec<f64>>

Optimal solution (if known)

Source

fn evaluate_raw(&self, x: &[f64]) -> f64

Evaluate the function (returns value to be MINIMIZED)

Implementors§