Loading src/TNL/Matrices/SparseMatrixRowView.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ operator==( const SparseMatrixRowView< _SegmentView, _ValuesView, _ColumnsIndexe while( i < getSize() && i < other.getSize() ) { if( getColumnIndex( i ) != other.getColumnIndex( i ) ) return false; if( getValue( i ) != other.getValue( i ) ) if( ! _isBinary && getValue( i ) != other.getValue( i ) ) return false; ++i; } Loading @@ -163,6 +163,10 @@ std::ostream& operator<<( std::ostream& str, const SparseMatrixRowView< SegmentV { using NonConstIndex = std::remove_const_t< typename SparseMatrixRowView< SegmentView, ValuesView, ColumnsIndexesView, isBinary_ >::IndexType >; for( NonConstIndex i = 0; i < row.getSize(); i++ ) if( isBinary_ ) // TODO: check getPaddingIndex(), print only the column indices of non-zeros but not the values str << " [ " << row.getColumnIndex( i ) << " ] = " << (row.getColumnIndex( i ) >= 0) << ", "; else str << " [ " << row.getColumnIndex( i ) << " ] = " << row.getValue( i ) << ", "; return str; } Loading Loading
src/TNL/Matrices/SparseMatrixRowView.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ operator==( const SparseMatrixRowView< _SegmentView, _ValuesView, _ColumnsIndexe while( i < getSize() && i < other.getSize() ) { if( getColumnIndex( i ) != other.getColumnIndex( i ) ) return false; if( getValue( i ) != other.getValue( i ) ) if( ! _isBinary && getValue( i ) != other.getValue( i ) ) return false; ++i; } Loading @@ -163,6 +163,10 @@ std::ostream& operator<<( std::ostream& str, const SparseMatrixRowView< SegmentV { using NonConstIndex = std::remove_const_t< typename SparseMatrixRowView< SegmentView, ValuesView, ColumnsIndexesView, isBinary_ >::IndexType >; for( NonConstIndex i = 0; i < row.getSize(); i++ ) if( isBinary_ ) // TODO: check getPaddingIndex(), print only the column indices of non-zeros but not the values str << " [ " << row.getColumnIndex( i ) << " ] = " << (row.getColumnIndex( i ) >= 0) << ", "; else str << " [ " << row.getColumnIndex( i ) << " ] = " << row.getValue( i ) << ", "; return str; } Loading