File view_matrix_csc.hpp¶
-
template<typename T>
class CscView : public SparseMatrix<T>¶ - #include <view_matrix_csc.hpp>
A two-dimensional view that provides column-wise access to values stored in a matrix in the compressed sparse column (CSC) format.
- Template Parameters:
T – The type of the values, the view provides access to
Public Functions
-
inline CscView(T *values, uint32 *indices, uint32 *indptr, uint32 numRows, uint32 numCols, T sparseValue = 0)¶
- Parameters:
values – A pointer to an array of template type
Tthat stores the values of all dense elements explicitly stored in the viewindices – A pointer to an array of type
uint32, shape(numDenseElements), that stores the row indices, the values invaluescorrespond toindptr – A pointer to an array of type
uint32, shape(numCols + 1), that stores the indices of the first element invaluesandindicesthat corresponds to a certain column. The index at the last position must be equal tonumDenseElementsnumRows – The number of rows in the view
numCols – The number of columns in the view
sparseValue – The value that should be used for sparse elements in the matrix
-
inline CscView(const CscView<T> &other)¶
- Parameters:
other – A const reference to an object of type
CscViewthat should be copied
-
inline CscView(CscView<T> &&other)¶
- Parameters:
other – A reference to an object of type
CscViewthat should be moved
-
inline virtual ~CscView() override¶
-
inline SparseMatrix<T>::value_const_iterator values_cbegin(uint32 column) const¶
Returns a
value_const_iteratorto the beginning of the values in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
A
value_const_iteratorto the beginning of the values
-
inline SparseMatrix<T>::value_const_iterator values_cend(uint32 column) const¶
Returns a
value_const_iteratorto the end of the values in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
A
value_const_iteratorto the end of the values
-
inline SparseMatrix<T>::index_const_iterator indices_cbegin(uint32 column) const¶
Returns an
index_const_iteratorto the beginning of the indices in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
An
index_const_iteratorto the beginning of the indices
-
inline SparseMatrix<T>::index_const_iterator indices_cend(uint32 column) const¶
Returns an
index_const_iteratorto the end of the indices in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
An
index_const_iteratorto the end of the indices
-
inline SparseMatrix<T>::value_iterator values_begin(uint32 column)¶
Returns a
value_iteratorto the beginning of the values in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
A
value_iteratorto the beginning of the values
-
inline SparseMatrix<T>::value_iterator values_end(uint32 column)¶
Returns a
value_iteratorto the end of the values in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
A
value_iteratorto the end of the values
-
inline SparseMatrix<T>::index_iterator indices_begin(uint32 column)¶
Returns an
index_iteratorto the beginning of the indices in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
An
index_iteratorto the beginning of the indices
-
inline SparseMatrix<T>::index_iterator indices_end(uint32 column)¶
Returns an
index_iteratorto the end of the indices in a specific column of the matrix.- Parameters:
column – The index of the column
- Returns:
An
index_iteratorto the end of the indices