Skip to main content

Problem

Trait Problem 

Source
pub trait Problem {
    // Required methods
    fn dim(&self) -> usize;
    fn bounds(&self) -> &[Bound] ;
    fn objective(&self, x: &[f64]) -> f64;
}
Expand description

A box-constrained, real-valued minimization problem.

Required Methods§

Source

fn dim(&self) -> usize

Number of decision variables.

Source

fn bounds(&self) -> &[Bound]

Per-variable inclusive bounds, length Problem::dim.

Source

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

Objective value to minimize. A non-finite return marks the point as infeasible; optimizers will reject it rather than crash.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§