KASKADE 7 development version
Public Member Functions | List of all members
Kaskade::SLAPMatrix< Num, offset > Class Template Reference

Very simple dense matrix class for interfacing with LAPACK routines and the optimization tool uncmin. More...

#include <simpleLAPmatrix.hh>

Detailed Description

template<class Num, int offset = 0>
class Kaskade::SLAPMatrix< Num, offset >

Very simple dense matrix class for interfacing with LAPACK routines and the optimization tool uncmin.

Before using this, consider using Kaskade::DynamicMatrix, that implements the Dune dense matrix interface.

Can be constructed from objects that model the Dune Matrix concept, in particular we need the members

The use of SLAPMatrix is only sensible, if Num is a numeric type, such as float or double

Template Parameters
Numtype of matrix entries
offsetstart index (0 is C-style, 1 is Fortran-style indexing)

Definition at line 61 of file simpleLAPmatrix.hh.

Public Member Functions

template<class Mat >
 SLAPMatrix (Mat const &mat)
 
 SLAPMatrix (SLAPMatrix< Num, offset > const &mat)
 
 SLAPMatrix (int row_, int col_, int lda_=-1)
 Construction by specifying the size of the matrix directly. More...
 
 SLAPMatrix (MatrixAsTriplet< Num > const &mat)
 
void print () const
 
int cols () const
 Columns. More...
 
int rows () const
 Rows. More...
 
int size ()
 
int LDA () const
 Increment for row iteration. More...
 
template<class Mat >
void toMatrix (Mat &M)
 
template<class RT >
void toTriplet (MatrixAsTriplet< RT > &M)
 
Num * ptrToData ()
 Access to the raw data. This is needed by LAPACK routines. More...
 
Num const & operator() (int r, int c) const
 Access to elements. More...
 
Num & operator() (int r, int c)
 
int num_columns () const
 
int num_rows () const
 Rows. More...
 
SLAPMatrix< Num, offset > operator*= (Num alpha)
 
SLAPMatrix< Num, offset > scaleCols (std::vector< Num > scaling)
 
SLAPMatrix< Num, offset > scaleRows (std::vector< Num > scaling)
 

Constructor & Destructor Documentation

◆ SLAPMatrix() [1/4]

template<class Num , int offset = 0>
template<class Mat >
Kaskade::SLAPMatrix< Num, offset >::SLAPMatrix ( Mat const &  mat)
inline

Definition at line 65 of file simpleLAPmatrix.hh.

◆ SLAPMatrix() [2/4]

template<class Num , int offset = 0>
Kaskade::SLAPMatrix< Num, offset >::SLAPMatrix ( SLAPMatrix< Num, offset > const &  mat)
inline

Definition at line 77 of file simpleLAPmatrix.hh.

◆ SLAPMatrix() [3/4]

template<class Num , int offset = 0>
Kaskade::SLAPMatrix< Num, offset >::SLAPMatrix ( int  row_,
int  col_,
int  lda_ = -1 
)
inline

Construction by specifying the size of the matrix directly.

The entries are initialized by 0.

Parameters
row_number of rows
col_number of cols
lda_leading dimension of the matrix. Values below row_ are implicitly corrected to row_.

Definition at line 94 of file simpleLAPmatrix.hh.

◆ SLAPMatrix() [4/4]

template<class Num , int offset = 0>
Kaskade::SLAPMatrix< Num, offset >::SLAPMatrix ( MatrixAsTriplet< Num > const &  mat)
inline

Definition at line 101 of file simpleLAPmatrix.hh.

Member Function Documentation

◆ cols()

template<class Num , int offset = 0>
int Kaskade::SLAPMatrix< Num, offset >::cols ( ) const
inline

◆ LDA()

template<class Num , int offset = 0>
int Kaskade::SLAPMatrix< Num, offset >::LDA ( ) const
inline

Increment for row iteration.

Definition at line 133 of file simpleLAPmatrix.hh.

Referenced by Kaskade::SLAPMatrix< Num, offset >::SLAPMatrix().

◆ num_columns()

template<class Num , int offset = 0>
int Kaskade::SLAPMatrix< Num, offset >::num_columns ( ) const
inline

Interface to Optimizer Columns

Definition at line 166 of file simpleLAPmatrix.hh.

◆ num_rows()

template<class Num , int offset = 0>
int Kaskade::SLAPMatrix< Num, offset >::num_rows ( ) const
inline

Rows.

Definition at line 168 of file simpleLAPmatrix.hh.

◆ operator()() [1/2]

template<class Num , int offset = 0>
Num & Kaskade::SLAPMatrix< Num, offset >::operator() ( int  r,
int  c 
)
inline

Definition at line 162 of file simpleLAPmatrix.hh.

◆ operator()() [2/2]

template<class Num , int offset = 0>
Num const & Kaskade::SLAPMatrix< Num, offset >::operator() ( int  r,
int  c 
) const
inline

Access to elements.

Definition at line 161 of file simpleLAPmatrix.hh.

◆ operator*=()

template<class Num , int offset = 0>
SLAPMatrix< Num, offset > Kaskade::SLAPMatrix< Num, offset >::operator*= ( Num  alpha)
inline

Definition at line 170 of file simpleLAPmatrix.hh.

◆ print()

template<class Num , int offset = 0>
void Kaskade::SLAPMatrix< Num, offset >::print ( ) const
inline

Definition at line 112 of file simpleLAPmatrix.hh.

◆ ptrToData()

template<class Num , int offset = 0>
Num * Kaskade::SLAPMatrix< Num, offset >::ptrToData ( )
inline

Access to the raw data. This is needed by LAPACK routines.

Definition at line 156 of file simpleLAPmatrix.hh.

◆ rows()

template<class Num , int offset = 0>
int Kaskade::SLAPMatrix< Num, offset >::rows ( ) const
inline

◆ scaleCols()

template<class Num , int offset = 0>
SLAPMatrix< Num, offset > Kaskade::SLAPMatrix< Num, offset >::scaleCols ( std::vector< Num >  scaling)
inline

Definition at line 178 of file simpleLAPmatrix.hh.

◆ scaleRows()

template<class Num , int offset = 0>
SLAPMatrix< Num, offset > Kaskade::SLAPMatrix< Num, offset >::scaleRows ( std::vector< Num >  scaling)
inline

Definition at line 186 of file simpleLAPmatrix.hh.

◆ size()

template<class Num , int offset = 0>
int Kaskade::SLAPMatrix< Num, offset >::size ( )
inline

Definition at line 130 of file simpleLAPmatrix.hh.

◆ toMatrix()

template<class Num , int offset = 0>
template<class Mat >
void Kaskade::SLAPMatrix< Num, offset >::toMatrix ( Mat &  M)
inline

Definition at line 136 of file simpleLAPmatrix.hh.

◆ toTriplet()

template<class Num , int offset = 0>
template<class RT >
void Kaskade::SLAPMatrix< Num, offset >::toTriplet ( MatrixAsTriplet< RT > &  M)
inline

Definition at line 144 of file simpleLAPmatrix.hh.


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