pub trait Constrained {
const NH: usize;
const NG: usize;
const CONSTRAINED: bool = true;
// Required methods
fn equality_constraints(x: Vec<f64>) -> Vec<f64>;
fn inequality_constraints(x: Vec<f64>) -> Vec<f64>;
// Provided methods
fn h(x: Vec<f64>) -> Vec<f64> { ... }
fn g(x: Vec<f64>) -> Vec<f64> { ... }
}Expand description
This is a trait that ensures consistent implementation of constrained benchmark functions
Required Associated Constants§
Provided Associated Constants§
Sourceconst CONSTRAINED: bool = true
const CONSTRAINED: bool = true
This constant indicates a constrained function
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.