fn row_reduce(
        &mut self,
        pivot_row_index: usize,
        column: &SparseVector<F, F>,
    ) {
        debug_assert!(pivot_row_index < self.m());

        // TODO(OPTIMIZATION): Improve the below algorithm; when does SIMD kick in?
        let (rows_left, rows_right) = self.rows.split_at_mut(pivot_row_index);
        let (rows_middle, rows_right) = rows_right.split_first_mut().unwrap();

        for (edit_row_index, column_value) in column.iter_values() {
            match edit_row_index.cmp(&pivot_row_index) {
                Ordering::Less => rows_left[*edit_row_index]
                    .add_multiple_of_row(&-column_value, &rows_middle),
                Ordering::Equal => {},
                Ordering::Greater => rows_right[*edit_row_index - (pivot_row_index + 1)]
                    .add_multiple_of_row(&-column_value, &rows_middle),
            }
        }
    }
/// Normalize the pivot row and row reduce the other basis inverse rows.
///
/// # Arguments
///
/// * `pivot_row_index`: Index of the pivot row.
/// * `column`: Column relative to the current basis to be entered into that basis.
///
/// # Note
///
/// This method requires a normalized pivot element.
Normalize the pivot row and row reduce the other basis inverse rows.
Normalize the pivot row and row reduce the other basis inverse rows .
fn row_reduce(
        &mut self,
        pivot_row_index: usize,
        column: &SparseVector<F, F>,
    ) {
        debug_assert!(pivot_row_index < self.m());
        // TODO(OPTIMIZATION): Improve the below algorithm; when does SIMD kick in?
        let (rows_left, rows_right) = self.rows.split_at_mut(pivot_row_index);
        let (rows_middle, rows_right) = rows_right.split_first_mut().unwrap();
        for (edit_row_index, column_value) in column.iter_values() {
            match edit_row_index.cmp(&pivot_row_index) {
                Ordering::Less => rows_left[*edit_row_index]
                    .add_multiple_of_row(&-column_value, &rows_middle),
                Ordering::Equal => {},
                Ordering::Greater => rows_right[*edit_row_index - (pivot_row_index + 1)]
                    .add_multiple_of_row(&-column_value, &rows_middle),
            }
        }
    }
fn row_reduce ( & mut self , pivot_row_index : usize , column : & SparseVector < F , F > , ) { debug_assert ! ( pivot_row_index self m ( ) ) ; // TODO(OPTIMIZATION): Improve the below algorithm; when does SIMD kick in? let ( rows_left , rows_right ) = self . rows . split_at_mut ( pivot_row_index ) ; let ( rows_middle , rows_right ) = rows_right . split_first_mut ( ) . unwrap ( ) ; for ( edit_row_index , column_value ) in column . iter_values ( ) { match edit_row_index . cmp ( & pivot_row_index ) { Ordering :: Less => rows_left [ * edit_row_index ] . add_multiple_of_row ( & - column_value , & rows_middle ) , Ordering :: Equal => { } , Ordering :: Greater => rows_right [ * edit_row_index - ( pivot_row_index + 1 ) ] . add_multiple_of_row ( & - column_value , & rows_middle ) , } } }
Normalize the pivot row and row reduce the other basis inverse rows.
Normalize the pivot row and row reduce the other basis inverse rows .
&mut self
pivot_row_index
usize
column
&SparseVector<F, F>
&mut self
pivot_row_index
usize
column
&SparseVector<F, F>
note
This method requires a normalized pivot element.
This method requires a normalized pivot element .