pub struct ConstrainedFunc<F, G> { /* private fields */ }Expand description
Closure-backed constrained problem produced by constrained_func.
Trait Implementations§
Source§impl<F, G> ConstrainedProblem for ConstrainedFunc<F, G>
impl<F, G> ConstrainedProblem for ConstrainedFunc<F, G>
Source§fn objective(&self, x: &[f64]) -> f64
fn objective(&self, x: &[f64]) -> f64
Objective value to minimize (non-finite ⇒ infeasible, as usual).
Source§fn violations(&self, x: &[f64]) -> Vec<f64>
fn violations(&self, x: &[f64]) -> Vec<f64>
Constraint violations:
0.0 per satisfied constraint, positive
magnitudes otherwise. Negative entries are clamped to 0.0.Source§fn total_violation(&self, x: &[f64]) -> f64
fn total_violation(&self, x: &[f64]) -> f64
Total violation
Σ max(vᵢ, 0) — the quantity Deb’s rules compare.Auto Trait Implementations§
impl<F, G> Freeze for ConstrainedFunc<F, G>
impl<F, G> RefUnwindSafe for ConstrainedFunc<F, G>where
F: RefUnwindSafe,
G: RefUnwindSafe,
impl<F, G> Send for ConstrainedFunc<F, G>
impl<F, G> Sync for ConstrainedFunc<F, G>
impl<F, G> Unpin for ConstrainedFunc<F, G>
impl<F, G> UnsafeUnpin for ConstrainedFunc<F, G>where
F: UnsafeUnpin,
G: UnsafeUnpin,
impl<F, G> UnwindSafe for ConstrainedFunc<F, G>where
F: UnwindSafe,
G: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more