fn update_activity_counters(
        &mut self,
        variable: usize,
        direction: BoundDirection,
    ) {
        let constraints_to_check = self.counters.iter_active_column(variable)
            // TODO(ARCHITECTURE): Avoid This clone
            .map(|(i, v)| (i, v.clone())).collect::<Vec<_>>();
        for (constraint, coefficient) in constraints_to_check {
            let activity_direction = direction * NonZeroSign::from(&coefficient);
            let counter = match activity_direction {
                BoundDirection::Lower => &mut self.counters.activity[constraint].0,
                BoundDirection::Upper => &mut self.counters.activity[constraint].1,
            };
            *counter -= 1;
            if *counter <= 1 {
                self.queues.activity.insert(constraint, activity_direction);
            }
        }
    }
/// Update the activity counters after a new bound was found.
///
/// # Arguments
///
/// * `variable`: Variable who's bound was added.
/// * `direction`: Whether a variable upper or lower bound was added.
Update the activity counters after a new bound was found.
Update the activity counters after a new bound was found .
fn update_activity_counters(
        &mut self,
        variable: usize,
        direction: BoundDirection,
    ) {
        let constraints_to_check = self.counters.iter_active_column(variable)
            // TODO(ARCHITECTURE): Avoid This clone
            .map(|(i, v)| (i, v.clone())).collect::<Vec<_>>();
        for (constraint, coefficient) in constraints_to_check {
            let activity_direction = direction * NonZeroSign::from(&coefficient);
            let counter = match activity_direction {
                BoundDirection::Lower => &mut self.counters.activity[constraint].0,
                BoundDirection::Upper => &mut self.counters.activity[constraint].1,
            };
            *counter -= 1;
            if *counter <= 1 {
                self.queues.activity.insert(constraint, activity_direction);
            }
        }
    }
fn update_activity_counters ( & mut self , variable : usize , direction : BoundDirection , ) { let constraints_to_check = self . counters . iter_active_column ( variable ) // TODO(ARCHITECTURE): Avoid This clone . map ( | ( i , v ) | ( i , v . clone ( ) ) ) . collect :: < Vec < _ > > ( ) ; for ( constraint , coefficient ) in constraints_to_check { let activity_direction = direction * NonZeroSign :: from ( & coefficient ) ; let counter = match activity_direction { BoundDirection :: Lower => & mut self . counters . activity [ constraint ] . 0 , BoundDirection :: Upper => & mut self . counters . activity [ constraint ] . 1 , } ; * counter -= 1 ; if * counter <= 1 { self . queues . activity . insert ( constraint , activity_direction ) ; } } }
Update the activity counters after a new bound was found.
Update the activity counters after a new bound was found .
&mut self
variable
usize
direction
BoundDirection
&mut self
variable
usize
direction
BoundDirection