fn remove_constraint_values(
        &mut self,
        constraint: usize,
    ) -> Result<(), LinearProgramType<OF>> {
        // TODO(ARCHITECTURE): Avoid this clone and collect.
        let variables_to_scan = self.counters.iter_active_row(constraint)
            .map(|(j, _)| j)
            .collect::<Vec<_>>();
        for variable in variables_to_scan {
            self.counters.constraint[constraint] -= 1;
            self.counters.variable[variable] -= 1;
            self.queue_variable_by_counter(variable)?;
        }

        debug_assert_eq!(self.counters.constraint[constraint], 0);
        Ok(())
    }
/// Mark a constraint as removed.
///
/// There should be more than one element in this row, otherwise, the column that can be removed
/// should be known from the rule application and removed directly, such that an iteration can
/// be avoided.
///
/// # Arguments
///
/// * `constraint`: Constraint to iter over.
Mark a constraint as removed.
There should be more than one element in this row, otherwise, the column that can be removed
should be known from the rule application and removed directly, such that an iteration can
be avoided.
Mark a constraint as removed . There should be more than one element in this row otherwise the column that can be removed should be known from the rule application and removed directly such that an iteration can be avoided .
fn remove_constraint_values(
        &mut self,
        constraint: usize,
    ) -> Result<(), LinearProgramType<OF>> {
        // TODO(ARCHITECTURE): Avoid this clone and collect.
        let variables_to_scan = self.counters.iter_active_row(constraint)
            .map(|(j, _)| j)
            .collect::<Vec<_>>();
        for variable in variables_to_scan {
            self.counters.constraint[constraint] -= 1;
            self.counters.variable[variable] -= 1;
            self.queue_variable_by_counter(variable)?;
        }
        debug_assert_eq!(self.counters.constraint[constraint], 0);
        Ok(())
    }
fn remove_constraint_values ( & mut self , constraint : usize , ) -> Result < ( ) , LinearProgramType < OF > > { // TODO(ARCHITECTURE): Avoid this clone and collect. let variables_to_scan = self . counters . iter_active_row ( constraint ) . map ( | ( j , _ ) | j ) . collect :: < Vec < _ > > ( ) ; for variable in variables_to_scan { self . counters . constraint [ constraint ] -= 1 ; self . counters . variable [ variable ] -= 1 ; self . queue_variable_by_counter ( variable ) ? ; } debug_assert_eq ! ( self counters constraint [ constraint ] 0 ) ; Ok ( ( ) ) }
Mark a constraint as removed.
Mark a constraint as removed .
&mut self
constraint
usize
&mut self
constraint
usize