Skip to main content

SimpleADProblem

Trait SimpleADProblem 

Source
pub trait SimpleADProblem<const X: usize>: BasicADProblem<X> {
    // Required methods
    fn objective<D: DualNum<f64> + Copy>(&self, x: [D; X]) -> D;
    fn constraints<D: DualNum<f64> + Copy>(&self, x: [D; X]) -> Vec<D>;
}
Expand description

The interface for a simple NLP in which the objective function and constraint values are determined separate from each other.

Required Methods§

Source

fn objective<D: DualNum<f64> + Copy>(&self, x: [D; X]) -> D

Return the objective value for the given x.

Source

fn constraints<D: DualNum<f64> + Copy>(&self, x: [D; X]) -> Vec<D>

Return the values of all constraints for the given x.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§