pub(super) fn variable_bound(&self, variable: usize, direction: BoundDirection) -> Option<&OF> {
        debug_assert!(self.removed_variables.iter().all(|&(j, _)| j != variable));
        debug_assert!({
            // Variable bounds in the `activity_bounds` should always be tighter than the bounds
            // that will be adopted for certain.
            let certain = self.bounds.get(&(variable, direction));
            let activity = self.activity_bounds.get(&(variable, direction));
            !matches!((certain, activity), (Some(_), Some(_)))
        });

        self.activity_bounds.get(&(variable, direction))
            .or_else(|| self.bounds.get(&(variable, direction)))
            .or_else(|| {
                let variable = &self.general_form.variables[variable];
                match direction {
                    BoundDirection::Lower => &variable.lower_bound,
                    BoundDirection::Upper => &variable.upper_bound,
                }.as_ref()
            })
    }
/// Latest version of a variable bound.
Latest version of a variable bound.
Latest version of a variable bound .
pub(super) fn variable_bound(&self, variable: usize, direction: BoundDirection) -> Option<&OF> {
        debug_assert!(self.removed_variables.iter().all(|&(j, _)| j != variable));
        debug_assert!({
            // Variable bounds in the `activity_bounds` should always be tighter than the bounds
            // that will be adopted for certain.
            let certain = self.bounds.get(&(variable, direction));
            let activity = self.activity_bounds.get(&(variable, direction));
            !matches!((certain, activity), (Some(_), Some(_)))
        });
        self.activity_bounds.get(&(variable, direction))
            .or_else(|| self.bounds.get(&(variable, direction)))
            .or_else(|| {
                let variable = &self.general_form.variables[variable];
                match direction {
                    BoundDirection::Lower => &variable.lower_bound,
                    BoundDirection::Upper => &variable.upper_bound,
                }.as_ref()
            })
    }
pub ( super ) fn variable_bound ( & self , variable : usize , direction : BoundDirection ) -> Option < & OF > { debug_assert ! ( self removed_variables iter ( ) all ( ( j ) j variable ) ) ; debug_assert ! ( { // Variable bounds in the `activity_bounds` should always be tighter than the bounds // that will be adopted for certain. let certain self bounds get ( ( variable direction ) ) let activity self activity_bounds get ( ( variable direction ) ) matches ( ( certain activity ) ( Some ( ) Some ( ) ) ) } ) ; self . activity_bounds . get ( & ( variable , direction ) ) . or_else ( | | self . bounds . get ( & ( variable , direction ) ) ) . or_else ( | | { let variable = & self . general_form . variables [ variable ] ; match direction { BoundDirection :: Lower => & variable . lower_bound , BoundDirection :: Upper => & variable . upper_bound , } . as_ref ( ) } ) }
Latest version of a variable bound.
Latest version of a variable bound .
&self
variable
usize
direction
BoundDirection
&self
variable
usize
direction
BoundDirection