NiHu  2.0
NiHu::matrix_block< Matrix, RowIndex, ColIndex > Class Template Reference

Proxy class to represent a block of a matrix. More...

#include <matrix_block.hpp>

Public Member Functions

 matrix_block (Matrix &m, RowIndex const &rows, ColIndex const &cols)
 constructor from a matrix and two index vectors More...
 
template<class SubMatrix >
void operator+= (SubMatrix const &rhs) const
 increment the block with a submatrix More...
 

Protected Attributes

Matrix & m_matrix
 the matrix to be indexed
 
const RowIndex & m_rows
 the row index vector
 
const ColIndex & m_cols
 the column index vector
 

Detailed Description

template<class Matrix, class RowIndex, class ColIndex = RowIndex>
class NiHu::matrix_block< Matrix, RowIndex, ColIndex >

Proxy class to represent a block of a matrix.

Template Parameters
Matrixthe matrix type that is indexed
RowIndexthe row index vector type
ColIndexthe column index vector type

The class represents a matrix block selected by two index vectors.

Definition at line 40 of file matrix_block.hpp.

Constructor & Destructor Documentation

◆ matrix_block()

template<class Matrix , class RowIndex , class ColIndex = RowIndex>
NiHu::matrix_block< Matrix, RowIndex, ColIndex >::matrix_block ( Matrix &  m,
RowIndex const &  rows,
ColIndex const &  cols 
)
inline

constructor from a matrix and two index vectors

Parameters
[in]mthe matrix to be indexed
[in]rowsthe index vector of selected rows
[in]colsthe index vector of selected columns

Definition at line 49 of file matrix_block.hpp.

Member Function Documentation

◆ operator+=()

template<class Matrix , class RowIndex , class ColIndex = RowIndex>
template<class SubMatrix >
void NiHu::matrix_block< Matrix, RowIndex, ColIndex >::operator+= ( SubMatrix const &  rhs) const
inline

increment the block with a submatrix

Template Parameters
SubMatrixthe submatrix type
Parameters
[in]rhsthe submatrix to add to the block

Definition at line 60 of file matrix_block.hpp.


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