Struct optimization::problems::Rosenbrock [] [src]

pub struct Rosenbrock {
    // some fields omitted
}

Two-dimensional Rosenbrock function.

A non-convex function with its global minimum inside a long, narrow, parabolic shaped flat valley:

f(x, y) = (a - x)² + b (y - x²)²

Global minimum: f(a, a²) = 0

Methods

impl Rosenbrock

fn new(a: f64, b: f64) -> Rosenbrock

Creates a new Rosenbrock function given a and b, commonly definied with 1 and 100, respectively, which also corresponds to the default.

Trait Implementations

impl Default for Rosenbrock

fn default() -> Self

impl Function for Rosenbrock

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

impl Function1 for Rosenbrock

fn gradient(&self, x: &[f64]) -> Vec<f64>

impl Problem for Rosenbrock

fn dimensions(&self) -> usize

fn domain(&self) -> Vec<(f64, f64)>

fn minimum(&self) -> (Vec<f64>, f64)

fn random_start(&self) -> Vec<f64>

Derived Implementations

impl Clone for Rosenbrock

fn clone(&self) -> Rosenbrock

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for Rosenbrock

impl Debug for Rosenbrock

fn fmt(&self, __arg_0: &mut Formatter) -> Result