Trait optimization::problems::Problem
[−]
[src]
pub trait Problem: Function + Default { fn dimensions(&self) -> usize; fn domain(&self) -> Vec<(f64, f64)>; fn minimum(&self) -> (Vec<f64>, f64); fn random_start(&self) -> Vec<f64>; fn is_legal_position(&self, position: &[f64]) -> bool { ... } }
Specifies a well known optimization problem.
Required Methods
fn dimensions(&self) -> usize
Returns the dimensionality of the input domain.
fn domain(&self) -> Vec<(f64, f64)>
Returns the input domain of the function in terms of upper and lower, respectively, for each input dimension.
fn minimum(&self) -> (Vec<f64>, f64)
Returns the position as well as the value of the global minimum.
fn random_start(&self) -> Vec<f64>
Generates a random and feasible position to start a minimization.
Provided Methods
fn is_legal_position(&self, position: &[f64]) -> bool
Tests whether the supplied position is legal for this function.
Implementors
impl Problem for Sphere
impl Problem for Rosenbrock
impl<F: Problem> Problem for NumericalDifferentiation<F>