Trait Function

Source
pub trait Function {
    const BOUNDS: (f64, f64);
    const MINIMUM: f64;

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

This is a trait that ensures consistent implementation of different benchmark functions

Required Associated Constants§

Source

const BOUNDS: (f64, f64)

The bounds of the canonical optimization problem

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)

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§