Struct TrialConstraints
pub struct TrialConstraints {
pub values: Vec<f64>,
}Expand description
The constraint values a trial recorded.
One number per constraint, in the order the objective reported them.
≤ 0 is satisfied, > 0 is violated.
Fields§
§values: Vec<f64>The recorded values, in report order.
Implementations§
§impl TrialConstraints
impl TrialConstraints
pub fn is_feasible(&self) -> bool
pub fn is_feasible(&self) -> bool
true if every recorded value is satisfied (is_feasible).
pub fn total_violation(&self) -> f64
pub fn total_violation(&self) -> f64
The total violation (total_violation).
Trait Implementations§
§impl Clone for TrialConstraints
impl Clone for TrialConstraints
§fn clone(&self) -> TrialConstraints
fn clone(&self) -> TrialConstraints
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TrialConstraints
impl Debug for TrialConstraints
§impl Default for TrialConstraints
impl Default for TrialConstraints
§fn default() -> TrialConstraints
fn default() -> TrialConstraints
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for TrialConstraints
impl<'de> Deserialize<'de> for TrialConstraints
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for TrialConstraints
impl PartialEq for TrialConstraints
§impl Serialize for TrialConstraints
impl Serialize for TrialConstraints
impl StructuralPartialEq for TrialConstraints
Auto Trait Implementations§
impl Freeze for TrialConstraints
impl RefUnwindSafe for TrialConstraints
impl Send for TrialConstraints
impl Sync for TrialConstraints
impl Unpin for TrialConstraints
impl UnsafeUnpin for TrialConstraints
impl UnwindSafe for TrialConstraints
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