NDEVR
API Documentation
SparseBlockMatrixCCS< MatrixType >

Sparse matrix which uses blocks. More...

Inheritance diagram for SparseBlockMatrixCCS< MatrixType >:
[legend]
Collaboration diagram for SparseBlockMatrixCCS< MatrixType >:
[legend]

Classes

struct  RowBlock
 A block within a column. More...

Public Types

typedef MatrixType SparseMatrixBlock
 this is the type of the elementary block, it is an Eigen::Matrix.

Public Member Functions

int colBaseOfBlock (int c) const
 where does the col at block-col r start?
const Buffer< int > & colBlockIndices () const
 indices of the column blocks
int cols () const
 columns of the matrix
int colsOfBlock (int c) const
 how many cols does the block at block-col c has?
const Buffer< SparseColumn > & columns () const
 the block matrices per block-column
int fillCCS (g_type *Cx, bool upperTriangle=false) const
 fill the CCS arrays of a matrix, arrays have to be allocated beforehand.
int fillCCS (int *Cp, int *Ci, g_type *Cx, bool upperTriangle=false) const
 fill the CCS arrays of a matrix, arrays have to be allocated beforehand
int rowBaseOfBlock (int r) const
 where does the row at block-row r start?
const Buffer< int > & rowBlockIndices () const
 indices of the row blocks
int rows () const
 rows of the matrix
int rowsOfBlock (int r) const
 how many rows does the block at block-row r has?
void sortColumns ()
 sort the blocks in each column

Protected Attributes

const Buffer< int > * _colBlockIndices
 vector of the indices of the blocks along the cols
const Buffer< int > * _rowBlockIndices
 vector of the indices of the blocks along the rows.
Buffer< SparseColumn > m_block_cols
 the matrices stored in CCS order

Detailed Description

template<class MatrixType>
class SparseBlockMatrixCCS< MatrixType >

Sparse matrix which uses blocks.

This class is used as a const view on a SparseBlockMatrix which allows a faster iteration over the elements of the matrix.

Definition at line 47 of file sparse_block_matrix_ccs.h.

Member Function Documentation

◆ fillCCS()

template<class MatrixType>
int SparseBlockMatrixCCS< MatrixType >::fillCCS ( g_type * Cx,
bool upperTriangle = false ) const
inline

fill the CCS arrays of a matrix, arrays have to be allocated beforehand.

This function only writes the values and assumes that column and row structures have already been written.

Definition at line 189 of file sparse_block_matrix_ccs.h.

References m_block_cols.


The documentation for this class was generated from the following file: