Trait SingleObjective

Source
pub trait SingleObjective {
    const MINIMUM: f64;

    // Required methods
    fn f(x: Vec<f64>) -> f64;
    fn minimizer(n: usize) -> Vec<f64>;

    // Provided method
    fn check_minimizer(d: usize) { ... }
}
Expand description

This is a trait that ensures consistent implementation of single objective benchmark functions

Required Associated Constants§

Source

const MINIMUM: f64

The global minimum is constant and zero

Required Methods§

Source

fn f(x: Vec<f64>) -> f64

Function for evaluating the objective function

Source

fn minimizer(n: usize) -> Vec<f64>

This function returns the minimizer (argument that will return the global minimum)

Provided Methods§

Source

fn check_minimizer(d: usize)

This function is used for testing, and checks the correctness of the minimizer

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§