Trait qopt::Function

source ·
pub trait Function<const N: usize> {
    // Required method
    fn objective(&self, input: Vector<N>) -> f64;

    // Provided methods
    fn gradient(&self, input: Vector<N>) -> Vector<N> { ... }
    fn hessian(&self, input: Vector<N>) -> Matrix<N> { ... }
}
Expand description

Abstracts over multivariable functions of arbitrary dimension.

Required Methods§

source

fn objective(&self, input: Vector<N>) -> f64

Provided Methods§

source

fn gradient(&self, input: Vector<N>) -> Vector<N>

source

fn hessian(&self, input: Vector<N>) -> Matrix<N>

Implementors§