|
Template Numerical Library version\ main:d08c4decc
|
RowView is a simple structure for accessing rows of dense matrix. More...
#include <TNL/Matrices/DenseMatrixRowView.h>
Public Types | |
| using | ConstIteratorType = MatrixRowViewIterator< ConstRowView > |
| Type of constant iterator for the matrix row. | |
| using | ConstRowView = DenseMatrixRowView< SegmentView, ConstValuesViewType > |
| 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 | IndexType = typename SegmentView::IndexType |
| The type used for matrix elements indexing. | |
| using | IteratorType = MatrixRowViewIterator< RowView > |
| Type of iterator for the matrix row. | |
| using | MatrixElementType = DenseMatrixElement< RealType, IndexType > |
| The type of related matrix element. | |
| using | RealType = typename ValuesView::RealType |
| The type of matrix elements. | |
| using | RowView = DenseMatrixRowView< SegmentView, ValuesViewType > |
| Type of dense matrix row view. | |
| using | SegmentViewType = SegmentView |
| Type representing matrix row format. | |
| using | ValuesViewType = ValuesView |
| Type of container view used for storing matrix elements values. | |
Public Member Functions | |
| __cuda_callable__ | DenseMatrixRowView (const SegmentViewType &segmentView, const ValuesViewType &values) |
| Constructor with segmentView and values. | |
| __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__ IndexType | getColumnIndex (IndexType localIdx) const |
| This method is only for compatibility with sparse 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__ RealType & | getValue (IndexType column) |
| Returns non-constants reference to an element with given column index. | |
| __cuda_callable__ const RealType & | getValue (IndexType column) const |
| Returns constants reference to an element with given column index. | |
| __cuda_callable__ void | setElement (IndexType localIdx, IndexType column, const RealType &value) |
| Sets value of matrix element with given column index. | |
| __cuda_callable__ void | setValue (IndexType column, const RealType &value) |
| Sets value of matrix element with given column index. | |
Protected Attributes | |
| SegmentViewType | segmentView |
| ValuesViewType | values |
RowView is a simple structure for accessing rows of dense matrix.
| SegmentView | is a segment view of segments representing the matrix format. |
| ValuesView | is a vector view storing the matrix elements values. |
See DenseMatrix and DenseMatrixView.
| __cuda_callable__ TNL::Matrices::DenseMatrixRowView< SegmentView, ValuesView >::DenseMatrixRowView | ( | const SegmentViewType & | segmentView, |
| const ValuesViewType & | values ) |
Constructor with segmentView and values.
| segmentView | instance of SegmentViewType representing matrix row. |
| values | is a container view for storing the matrix elements values. |
|
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 |
This method is only for compatibility with sparse matrix row.
| localIdx | is the rank of the matrix element in given 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 an element with given column index.
| column | is a column index of the matrix element. |
|
nodiscard |
Returns constants reference to an element with given column index.
| column | is column index of the matrix element. |
| __cuda_callable__ void TNL::Matrices::DenseMatrixRowView< SegmentView, ValuesView >::setElement | ( | IndexType | localIdx, |
| IndexType | column, | ||
| const RealType & | value ) |
Sets value of matrix element with given column index.
| localIdx | is here only for compatibility with the sparse matrices and it is unused. |
| column | is a column index of the matrix element. |
| value | is a value the matrix element will be set to. |
| __cuda_callable__ void TNL::Matrices::DenseMatrixRowView< SegmentView, ValuesView >::setValue | ( | IndexType | column, |
| const RealType & | value ) |
Sets value of matrix element with given column index.
| column | is a column index of the matrix element. |
| value | is a value the matrix element will be set to. |