| 
    Template Numerical Library version\ main:6a1fe78
    
   | 
 
RowView is a simple structure for accessing rows of sparse matrix. More...
#include <TNL/Matrices/SparseMatrixRowView.h>
Public Types | |
| using | ColumnsIndexesViewType = ColumnsIndexesView | 
| Type of container view used for storing the column indexes of the matrix elements.  | |
| using | ConstColumnsIndexesViewType = typename ColumnsIndexesViewType::ConstViewType | 
| Type of constant container view used for storing the column indexes of the matrix elements.  | |
| using | ConstIteratorType = MatrixRowViewIterator< ConstRowView > | 
| Type of constant iterator for the matrix row.  | |
| using | ConstRowView = SparseMatrixRowView< SegmentViewType, ConstValuesViewType, ConstColumnsIndexesViewType > | 
| Type of constant sparse matrix row view.  | |
| using | ConstValuesViewType = typename ValuesViewType::ConstViewType | 
| Type of constant container view used for storing the matrix elements values.  | |
| using | GetValueConstResultType = std::conditional_t< isBinary(), bool, std::add_const_t< RealType >& > | 
| using | GetValueResultType = std::conditional_t< isBinary(), bool, RealType& > | 
| using | IndexType = typename ColumnsIndexesView::IndexType | 
| The type used for matrix elements indexing.  | |
| using | IteratorType = MatrixRowViewIterator< RowView > | 
| Type of iterator for the matrix row.  | |
| using | MatrixElementType = SparseMatrixElement< RealType, IndexType > | 
| The type of related matrix element.  | |
| using | RealType = typename ValuesView::RealType | 
| The type of matrix elements.  | |
| using | RowView = SparseMatrixRowView< SegmentViewType, ValuesViewType, ColumnsIndexesViewType > | 
| Type of sparse matrix row view.  | |
| using | SegmentViewType = SegmentView | 
| Type representing matrix row format.  | |
| using | ValuesViewType = ValuesView | 
| Type of container view used for storing the matrix elements values.  | |
Public Member Functions | |
| __cuda_callable__ | SparseMatrixRowView (const SegmentViewType &segmentView, const ValuesViewType &values, const ColumnsIndexesViewType &columnIndexes) | 
| Constructor with segmentView, values and columnIndexes.   | |
| __cuda_callable__ IteratorType | begin () | 
| Returns iterator pointing at the beginning of the matrix row.   | |
| __cuda_callable__ ConstIteratorType | cbegin () const | 
| Returns constant iterator pointing at the beginning of the matrix row.   | |
| __cuda_callable__ ConstIteratorType | cend () const | 
| Returns constant iterator pointing at the end of the matrix row.   | |
| __cuda_callable__ IteratorType | end () | 
| Returns iterator pointing at the end of the matrix row.   | |
| __cuda_callable__ ColumnsIndexesViewType::ValueType & | getColumnIndex (IndexType localIdx) | 
| Returns non-constants reference to a column index of an element with given rank in the row.   | |
| __cuda_callable__ const ColumnsIndexesViewType::ValueType & | getColumnIndex (IndexType localIdx) const | 
| Returns constants reference to a column index of an element with given rank in the row.   | |
| __cuda_callable__ IndexType | getGlobalIndex (IndexType localIdx) const | 
| Computes the global index of the matrix element with given rank in the matrix row.   | |
| __cuda_callable__ IndexType | getRowIndex () const | 
| Returns the matrix row index.   | |
| __cuda_callable__ IndexType | getSize () const | 
| Returns size of the matrix row, i.e. number of matrix elements in this row.   | |
| __cuda_callable__ auto | getValue (IndexType localIdx) -> GetValueResultType | 
| Returns non-constants reference to value of an element with given rank in the row.   | |
| __cuda_callable__ auto | getValue (IndexType localIdx) const -> GetValueConstResultType | 
| Returns constants reference to value of an element with given rank in the row.   | |
| template<typename _SegmentView, typename _ValuesView, typename _ColumnsIndexesView> | |
| __cuda_callable__ bool | operator== (const SparseMatrixRowView< _SegmentView, _ValuesView, _ColumnsIndexesView > &other) const | 
| Comparison of two matrix rows.   | |
| __cuda_callable__ void | setColumnIndex (IndexType localIdx, const IndexType &columnIndex) | 
| Sets a column index of matrix element with given rank in the matrix row.   | |
| __cuda_callable__ void | setElement (IndexType localIdx, IndexType columnIndex, const RealType &value) | 
| Sets both a value and a column index of matrix element with given rank in the matrix row.   | |
| __cuda_callable__ void | setValue (IndexType localIdx, const RealType &value) | 
| Sets a value of matrix element with given rank in the matrix row.   | |
| __cuda_callable__ void | sortColumnIndexes () | 
| Sort the matrix row by column indexes in ascending order.  | |
Static Public Member Functions | |
| static constexpr bool | isBinary () | 
| Tells whether the parent matrix is a binary matrix.   | |
Protected Attributes | |
| ColumnsIndexesViewType | columnIndexes | 
| SegmentViewType | segmentView | 
| ValuesViewType | values | 
RowView is a simple structure for accessing rows of sparse matrix.
| SegmentView | is a segment view of segments representing the matrix format. | 
| ValuesView | is a vector view storing the matrix elements values. | 
| ColumnsIndexesView | is a vector view storing the column indexes of the matrix element. | 
See SparseMatrixBase, SparseMatrix and SparseMatrixView.
| __cuda_callable__ TNL::Matrices::SparseMatrixRowView< SegmentView, ValuesView, ColumnsIndexesView >::SparseMatrixRowView | ( | const SegmentViewType & | segmentView, | 
| const ValuesViewType & | values, | ||
| const ColumnsIndexesViewType & | columnIndexes ) | 
Constructor with segmentView, values and columnIndexes.
| segmentView | instance of SegmentViewType representing matrix row. | 
| values | is a container view for storing the matrix elements values. | 
| columnIndexes | is a container view for storing the column indexes of the matrix elements. | 
      
  | 
  nodiscard | 
Returns iterator pointing at the beginning of the matrix row.
      
  | 
  nodiscard | 
Returns constant iterator pointing at the beginning of the matrix row.
      
  | 
  nodiscard | 
Returns constant iterator pointing at the end of the matrix row.
      
  | 
  nodiscard | 
Returns iterator pointing at the end of the matrix row.
      
  | 
  nodiscard | 
Returns non-constants reference to a column index of an element with given rank in the row.
| localIdx | is the rank of the non-zero element in given row. | 
      
  | 
  nodiscard | 
Returns constants reference to a column index of an element with given rank in the row.
| localIdx | is the rank of the non-zero element in given row. | 
      
  | 
  nodiscard | 
Computes the global index of the matrix element with given rank in the matrix row.
| localIdx | is the rank of the matrix element in the row. | 
      
  | 
  nodiscard | 
Returns the matrix row index.
      
  | 
  nodiscard | 
Returns size of the matrix row, i.e. number of matrix elements in this row.
      
  | 
  nodiscard | 
Returns non-constants reference to value of an element with given rank in the row.
| localIdx | is the rank of the non-zero element in given row. | 
      
  | 
  nodiscard | 
Returns constants reference to value of an element with given rank in the row.
| localIdx | is the rank of the non-zero element in given row. | 
      
  | 
  inlinestaticnodiscardconstexpr | 
Tells whether the parent matrix is a binary matrix.
      
  | 
  nodiscard | 
Comparison of two matrix rows.
The other matrix row can be from any other matrix.
| other | is another matrix row. | 
| __cuda_callable__ void TNL::Matrices::SparseMatrixRowView< SegmentView, ValuesView, ColumnsIndexesView >::setColumnIndex | ( | IndexType | localIdx, | 
| const IndexType & | columnIndex ) | 
Sets a column index of matrix element with given rank in the matrix row.
| localIdx | is the rank of the matrix element in the row. | 
| columnIndex | is the new column index of the matrix element. | 
| __cuda_callable__ void TNL::Matrices::SparseMatrixRowView< SegmentView, ValuesView, ColumnsIndexesView >::setElement | ( | IndexType | localIdx, | 
| IndexType | columnIndex, | ||
| const RealType & | value ) | 
Sets both a value and a column index of matrix element with given rank in the matrix row.
| localIdx | is the rank of the matrix element in the row. | 
| columnIndex | is the new column index of the matrix element. | 
| value | is the new value of the matrix element. | 
| __cuda_callable__ void TNL::Matrices::SparseMatrixRowView< SegmentView, ValuesView, ColumnsIndexesView >::setValue | ( | IndexType | localIdx, | 
| const RealType & | value ) | 
Sets a value of matrix element with given rank in the matrix row.
| localIdx | is the rank of the matrix element in the row. | 
| value | is the new value of the matrix element. |