pub(crate) fn assert_same_upper_tri_sparsity_structure(&self, other: &CscMatrix) {
        assert_eq!(self.nrows, other.nrows);
        assert_eq!(self.ncols, other.ncols);
        assert_eq!(self.indptr.len(), other.indptr.len());
        assert_eq!(other.indices.len(), other.data.len());

        let mut col_start_idx = 0;
        let mut other_col_start_idx = 0;
        for (col_num, (&col_end_idx, &other_col_end_idx)) in self.indptr
            .iter()
            .zip(other.indptr.iter())
            .skip(1)
            .enumerate()
        {
            assert!(
                self.indices[col_start_idx..col_end_idx]
                    .iter()
                    .chain(once(&(self.nrows + 1)))
                    .zip(
                        other.indices[other_col_start_idx..other_col_end_idx]
                            .iter()
                            .chain(once(&(self.nrows + 1)))
                    )
                    .take_while(|&(&row_num, &other_row_num)| row_num <= col_num
                        || other_row_num <= col_num)
                    .all(|(&row_num, &other_row_num)| row_num == other_row_num)
            );
            col_start_idx = col_end_idx;
            other_col_start_idx = other_col_end_idx;
        }
    }
/// Assert `other` has the same upper triangle sparsity structure as `self`
Assert `other` has the same upper triangle sparsity structure as `self`
Assert ` other ` has the same upper triangle sparsity structure as ` self `
pub(crate) fn assert_same_upper_tri_sparsity_structure(&self, other: &CscMatrix) {
        assert_eq!(self.nrows, other.nrows);
        assert_eq!(self.ncols, other.ncols);
        assert_eq!(self.indptr.len(), other.indptr.len());
        assert_eq!(other.indices.len(), other.data.len());
        let mut col_start_idx = 0;
        let mut other_col_start_idx = 0;
        for (col_num, (&col_end_idx, &other_col_end_idx)) in self.indptr
            .iter()
            .zip(other.indptr.iter())
            .skip(1)
            .enumerate()
        {
            assert!(
                self.indices[col_start_idx..col_end_idx]
                    .iter()
                    .chain(once(&(self.nrows + 1)))
                    .zip(
                        other.indices[other_col_start_idx..other_col_end_idx]
                            .iter()
                            .chain(once(&(self.nrows + 1)))
                    )
                    .take_while(|&(&row_num, &other_row_num)| row_num <= col_num
                        || other_row_num <= col_num)
                    .all(|(&row_num, &other_row_num)| row_num == other_row_num)
            );
            col_start_idx = col_end_idx;
            other_col_start_idx = other_col_end_idx;
        }
    }
pub ( crate ) fn assert_same_upper_tri_sparsity_structure ( & self , other : & CscMatrix ) { assert_eq ! ( self nrows other nrows ) ; assert_eq ! ( self ncols other ncols ) ; assert_eq ! ( self indptr len ( ) other indptr len ( ) ) ; assert_eq ! ( other indices len ( ) other data len ( ) ) ; let mut col_start_idx = 0 ; let mut other_col_start_idx = 0 ; for ( col_num , ( & col_end_idx , & other_col_end_idx ) ) in self . indptr . iter ( ) . zip ( other . indptr . iter ( ) ) . skip ( 1 ) . enumerate ( ) { assert ! ( self indices [ col_start_idx col_end_idx ] iter ( ) chain ( once ( ( self nrows 1 ) ) ) zip ( other indices [ other_col_start_idx other_col_end_idx ] iter ( ) chain ( once ( ( self nrows 1 ) ) ) ) take_while ( ( row_num other_row_num ) row_num col_num other_row_num col_num ) all ( ( row_num other_row_num ) row_num other_row_num ) ) ; col_start_idx = col_end_idx ; other_col_start_idx = other_col_end_idx ; } }
Assert `other` has the same upper triangle sparsity structure as `self`
Assert ` other ` has the same upper triangle sparsity structure as ` self `
&self
other
&CscMatrix
&self
other
&CscMatrix