fn update_activity_bounds(
        &mut self,
        variable: usize,
        direction: BoundDirection,
        by_how_much: OF,
    ) {
        debug_assert!(match direction {
            BoundDirection::Lower => by_how_much > OF::zero(),
            BoundDirection::Upper => by_how_much < OF::zero(),
        });

        let rows_to_check = self.counters.iter_active_column(variable).collect::<Vec<_>>();
        for (row, coefficient) in rows_to_check {
            if !self.counters.is_constraint_still_active(row) {
                continue;
            }

            let bound_to_edit = direction * NonZeroSign::from(coefficient);
            if let Some(ref mut bound) = match bound_to_edit {
                BoundDirection::Lower => &mut self.activity_bounds[row].0,
                BoundDirection::Upper => &mut self.activity_bounds[row].1,
            } {
                *bound += &by_how_much * coefficient;
                debug_assert!(match bound_to_edit {
                    BoundDirection::Lower => self.counters.activity[row].0,
                    BoundDirection::Upper => self.counters.activity[row].1,
                } <= 1);
                self.queues.activity.insert(row, bound_to_edit);
            }
        }
    }
/// Update an activity bound if it exists.
///
/// Activity bounds don't have to be recomputed entirely after a single variable bound change.
/// You need to know by how much the bound was changed, which gets lost. So it is recomputed
/// now, even though the result might not be directly used, and other recomputations might be
/// triggered first (in the future, perhaps due to the counter for the number of recomputations
/// reaching it's limit (precision)).
///
/// # Arguments
///
/// * `variable`: Variable who's bound was changed.
/// * `direction`: Whether a variable upper or lower bound was changed.
/// * `by_how_much`: Size of the change.
Update an activity bound if it exists.
Activity bounds don't have to be recomputed entirely after a single variable bound change.
You need to know by how much the bound was changed, which gets lost. So it is recomputed
now, even though the result might not be directly used, and other recomputations might be
triggered first (in the future, perhaps due to the counter for the number of recomputations
reaching it's limit (precision)).
Update an activity bound if it exists . Activity bounds don ' t have to be recomputed entirely after a single variable bound change . You need to know by how much the bound was changed which gets lost . So it is recomputed now even though the result might not be directly used and other recomputations might be triggered first ( in the future perhaps due to the counter for the number of recomputations reaching it ' s limit ( precision )) .
fn update_activity_bounds(
        &mut self,
        variable: usize,
        direction: BoundDirection,
        by_how_much: OF,
    ) {
        debug_assert!(match direction {
            BoundDirection::Lower => by_how_much > OF::zero(),
            BoundDirection::Upper => by_how_much < OF::zero(),
        });
        let rows_to_check = self.counters.iter_active_column(variable).collect::<Vec<_>>();
        for (row, coefficient) in rows_to_check {
            if !self.counters.is_constraint_still_active(row) {
                continue;
            }
            let bound_to_edit = direction * NonZeroSign::from(coefficient);
            if let Some(ref mut bound) = match bound_to_edit {
                BoundDirection::Lower => &mut self.activity_bounds[row].0,
                BoundDirection::Upper => &mut self.activity_bounds[row].1,
            } {
                *bound += &by_how_much * coefficient;
                debug_assert!(match bound_to_edit {
                    BoundDirection::Lower => self.counters.activity[row].0,
                    BoundDirection::Upper => self.counters.activity[row].1,
                } <= 1);
                self.queues.activity.insert(row, bound_to_edit);
            }
        }
    }
fn update_activity_bounds ( & mut self , variable : usize , direction : BoundDirection , by_how_much : OF , ) { debug_assert ! ( match direction { BoundDirection Lower by_how_much OF zero ( ) BoundDirection Upper by_how_much OF zero ( ) } ) ; let rows_to_check = self . counters . iter_active_column ( variable ) . collect :: < Vec < _ > > ( ) ; for ( row , coefficient ) in rows_to_check { if ! self . counters . is_constraint_still_active ( row ) { continue ; } let bound_to_edit = direction * NonZeroSign :: from ( coefficient ) ; if let Some ( ref mut bound ) = match bound_to_edit { BoundDirection :: Lower => & mut self . activity_bounds [ row ] . 0 , BoundDirection :: Upper => & mut self . activity_bounds [ row ] . 1 , } { * bound += & by_how_much * coefficient ; debug_assert ! ( match bound_to_edit { BoundDirection Lower self counters activity [ row ] 0 BoundDirection Upper self counters activity [ row ] 1 } 1 ) ; self . queues . activity . insert ( row , bound_to_edit ) ; } } }
Update an activity bound if it exists.
Update an activity bound if it exists .
&mut self
variable
usize
direction
BoundDirection
by_how_much
OF
&mut self
variable
usize
direction
BoundDirection
by_how_much
OF