fn remove_rows_and_columns(&mut self, mut constraints: Vec<usize>, mut variables: Vec<usize>) {
        constraints.sort_unstable();
        variables.sort_unstable();

        self.constraints.remove_columns(&variables);
        remove_indices(&mut self.variables, &variables);
        if !variables.is_empty() {
            // Update the `from_active_to_original` map.
            let mut skipped = 1;
            let new_length = self.from_active_to_original.len() - variables.len();
            for j in variables[0]..new_length {
                while skipped < variables.len() && variables[skipped] == j + skipped {
                    skipped += 1;
                }
                self.from_active_to_original[j] = self.from_active_to_original[j + skipped];
            }
            self.from_active_to_original.drain(new_length..);

            // Update the reverse map
            for (new_index, &variable) in self.from_active_to_original.iter().enumerate() {
                match &mut self.original_variables[variable].1 {
                    OriginalVariable::Active(index) => *index = new_index,
                    OriginalVariable::ActiveFree(_, _) => unimplemented!(),
                    _ => panic!("Should still be in the problem."),
                }
            }
        }

        self.constraints.remove_rows_although_this_matrix_is_column_major(&constraints);
        remove_indices(&mut self.constraint_types, &constraints);
        self.b.remove_indices(&constraints);

        debug_assert!(is_consistent(&self));
    }
/// Remove a set of rows and columns from the constraint data.
///
/// Constraints might have been determined redundant, or perhaps they represented a variable
/// bound. Those can also be represented in the `self.variables` property of `GeneralForm`. This
/// method is used to clean up those rows and indices that are left after the removal of those
/// constraints and / or variables.
///
/// Note that this method is somewhat expensive because it removes columns from a row-major
/// ordered matrix.
Remove a set of rows and columns from the constraint data.
Constraints might have been determined redundant, or perhaps they represented a variable
bound. Those can also be represented in the `self.variables` property of `GeneralForm`. This
method is used to clean up those rows and indices that are left after the removal of those
constraints and / or variables.

Note that this method is somewhat expensive because it removes columns from a row-major
ordered matrix.
Remove a set of rows and columns from the constraint data . Constraints might have been determined redundant or perhaps they represented a variable bound . Those can also be represented in the ` self . variables ` property of ` GeneralForm ` . This method is used to clean up those rows and indices that are left after the removal of those constraints and / or variables . Note that this method is somewhat expensive because it removes columns from a row - major ordered matrix .
fn remove_rows_and_columns(&mut self, mut constraints: Vec<usize>, mut variables: Vec<usize>) {
        constraints.sort_unstable();
        variables.sort_unstable();
        self.constraints.remove_columns(&variables);
        remove_indices(&mut self.variables, &variables);
        if !variables.is_empty() {
            // Update the `from_active_to_original` map.
            let mut skipped = 1;
            let new_length = self.from_active_to_original.len() - variables.len();
            for j in variables[0]..new_length {
                while skipped < variables.len() && variables[skipped] == j + skipped {
                    skipped += 1;
                }
                self.from_active_to_original[j] = self.from_active_to_original[j + skipped];
            }
            self.from_active_to_original.drain(new_length..);
            // Update the reverse map
            for (new_index, &variable) in self.from_active_to_original.iter().enumerate() {
                match &mut self.original_variables[variable].1 {
                    OriginalVariable::Active(index) => *index = new_index,
                    OriginalVariable::ActiveFree(_, _) => unimplemented!(),
                    _ => panic!("Should still be in the problem."),
                }
            }
        }
        self.constraints.remove_rows_although_this_matrix_is_column_major(&constraints);
        remove_indices(&mut self.constraint_types, &constraints);
        self.b.remove_indices(&constraints);
        debug_assert!(is_consistent(&self));
    }
fn remove_rows_and_columns ( & mut self , mut constraints : Vec < usize > , mut variables : Vec < usize > ) { constraints . sort_unstable ( ) ; variables . sort_unstable ( ) ; self . constraints . remove_columns ( & variables ) ; remove_indices ( & mut self . variables , & variables ) ; if ! variables . is_empty ( ) { // Update the `from_active_to_original` map. let mut skipped = 1 ; let new_length = self . from_active_to_original . len ( ) - variables . len ( ) ; for j in variables [ 0 ] .. new_length { while skipped < variables . len ( ) && variables [ skipped ] == j + skipped { skipped += 1 ; } self . from_active_to_original [ j ] = self . from_active_to_original [ j + skipped ] ; } self . from_active_to_original . drain ( new_length .. ) ; // Update the reverse map for ( new_index , & variable ) in self . from_active_to_original . iter ( ) . enumerate ( ) { match & mut self . original_variables [ variable ] . 1 { OriginalVariable :: Active ( index ) => * index = new_index , OriginalVariable :: ActiveFree ( _ , _ ) => unimplemented ! ( ) , _ => panic ! ( " " ) , } } } self . constraints . remove_rows_although_this_matrix_is_column_major ( & constraints ) ; remove_indices ( & mut self . constraint_types , & constraints ) ; self . b . remove_indices ( & constraints ) ; debug_assert ! ( is_consistent ( self ) ) ; }
Remove a set of rows and columns from the constraint data.
Remove a set of rows and columns from the constraint data .
&mut self
constraints
Vec<usize>
variables
Vec<usize>
&mut self
constraints
Vec<usize>
variables
Vec<usize>