KASKADE 7 development version
Public Member Functions | Static Public Attributes | List of all members
Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx > Class Template Reference

Providing a matrix or array interface to LAPACK-ordered entries. More...

#include <localMatrices.hh>

Detailed Description

template<class Entry, bool diagonal, class SortedRowIdx, class SortedColIdx>
class Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >

Providing a matrix or array interface to LAPACK-ordered entries.

The class represents dense or diagonal matrices, depending on the template argument diagonal.

Template Parameters
Entrythe type of matrix entries
diagonalif true, only diagonal
SortedRowIdxa range of row indices (global row, local row) sorted ascendingly by global row
SortedColIdxa range of column indices (global col, local col) sorted ascendingly by global col

Definition at line 37 of file localMatrices.hh.

Public Member Functions

 LocalMatrix (SortedRowIdx const &ridx, SortedColIdx const &cidx, Entry *data_)
 
SortedRowIdx ridx () const
 A sequence of (global row, local row) indices, sorted ascendingly by global row. More...
 
SortedColIdx cidx () const
 A sequence of (global col, local col) indices, sorted ascendingly by global col. More...
 
size_t size () const
 The number of entries stored. More...
 
void relocate (Entry *newData)
 Resets the data pointer. More...
 
Entry access and assignment
Entry & operator() (int row, int col)
 Access the matrix entries. More...
 
Entry const & operator() (int row, int col) const
 
LocalMatrixoperator= (DynamicMatrix< Entry > const &Aloc)
 Assignment. More...
 

Static Public Attributes

static bool const lumped = diagonal
 

Constructor & Destructor Documentation

◆ LocalMatrix()

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::LocalMatrix ( SortedRowIdx const &  ridx,
SortedColIdx const &  cidx,
Entry *  data_ 
)
inline

Definition at line 42 of file localMatrices.hh.

Member Function Documentation

◆ cidx()

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
SortedColIdx Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::cidx ( ) const
inline

◆ operator()() [1/2]

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
Entry & Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::operator() ( int  row,
int  col 
)
inline

Access the matrix entries.

For diagonal matrices, row==col must hold.

Definition at line 86 of file localMatrices.hh.

◆ operator()() [2/2]

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
Entry const & Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::operator() ( int  row,
int  col 
) const
inline

Definition at line 101 of file localMatrices.hh.

◆ operator=()

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
LocalMatrix & Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::operator= ( DynamicMatrix< Entry > const &  Aloc)
inline

Assignment.

The given matrix has to have the same size as the local matrix. If the local matrix is diagonal, only the diagonal of Aloc is accessed and copied.

Definition at line 121 of file localMatrices.hh.

◆ relocate()

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
void Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::relocate ( Entry *  newData)
inline

Resets the data pointer.

Definition at line 71 of file localMatrices.hh.

◆ ridx()

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
SortedRowIdx Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::ridx ( ) const
inline

A sequence of (global row, local row) indices, sorted ascendingly by global row.

Definition at line 50 of file localMatrices.hh.

Referenced by Kaskade::operator<<(), Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::operator=(), and Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::size().

◆ size()

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
size_t Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::size ( ) const
inline

The number of entries stored.

This is either \( nm \) for general local matrices or \( n \) for diagonal matrices.

Definition at line 63 of file localMatrices.hh.

Referenced by Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::operator=().

Member Data Documentation

◆ lumped

template<class Entry , bool diagonal, class SortedRowIdx , class SortedColIdx >
bool const Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx >::lumped = diagonal
static

Definition at line 40 of file localMatrices.hh.


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