openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Public Member Functions | List of all members
SF::dmat< S > Class Template Reference

Dense matrix class. More...

#include <dense_mat.hpp>

Inheritance diagram for SF::dmat< S >:
Collaboration diagram for SF::dmat< S >:

Public Member Functions

 dmat ()
 empty constructor More...
 
 dmat (const short irows, const short icols)
 constructor that initializes the dimensions More...
 
 dmat (const dmat< S > &m)
 constructor that deep-copies a given dmat More...
 
 ~dmat ()
 destructor More...
 
void set_size (const short irows, const short icols)
 set the matrix dimensions More...
 
dmat< S > & operator= (dmat< S > &&m)
 
dmat< S > & operator= (const dmat< S > &m)
 
const S * operator[] (short ridx) const
 [] operator returns the pointer to the beginning of a given row More...
 
S * operator[] (short ridx)
 [] operator returns the pointer to the beginning of a given row More...
 
void operator+= (const dmat< S > &m)
 
void operator-= (const dmat< S > &m)
 
void operator*= (const S s)
 
void operator/= (const S s)
 
void assign (const dmat< S > &m)
 copy a mtrix. More...
 
void assign (const S v)
 set all entries to a value More...
 
void assign (const S *v)
 set all entries to a value More...
 
void assign (const short irows, const short icols, const S v)
 resize and set all entries to a value More...
 
void assign (const short irows, const short icols, const S *v)
 resize and set all entries to a value More...
 
void diag (const S v)
 set all diagonal entries to a value More...
 
short rows () const
 
short cols () const
 
void mult (const dmat< S > &in, dmat< S > &out) const
 mat-mat multiplication More...
 
double double_cont (const dmat< S > &in) const
 mat-mat double contraction More...
 
void mult (const S *in, S *out)
 mat-vec multiplication More...
 
void mult_transp (const S *in, S *out)
 
void transpose ()
 
void disp (const char *name)
 
S * data ()
 
const S * data () const
 
bool lu_decomp ()
 
void lu_solve (S *rhs)
 

Detailed Description

template<class S>
class SF::dmat< S >

Dense matrix class.

Template Parameters
SFloating point type.

Definition at line 42 of file dense_mat.hpp.

Constructor & Destructor Documentation

◆ dmat() [1/3]

template<class S>
SF::dmat< S >::dmat ( )
inline

empty constructor

Definition at line 52 of file dense_mat.hpp.

◆ dmat() [2/3]

template<class S>
SF::dmat< S >::dmat ( const short  irows,
const short  icols 
)
inline

constructor that initializes the dimensions

Definition at line 55 of file dense_mat.hpp.

◆ dmat() [3/3]

template<class S>
SF::dmat< S >::dmat ( const dmat< S > &  m)
inline

constructor that deep-copies a given dmat

Definition at line 60 of file dense_mat.hpp.

◆ ~dmat()

template<class S>
SF::dmat< S >::~dmat ( )
inline

destructor

Definition at line 65 of file dense_mat.hpp.

Member Function Documentation

◆ assign() [1/5]

template<class S>
void SF::dmat< S >::assign ( const dmat< S > &  m)
inline

copy a mtrix.

Definition at line 135 of file dense_mat.hpp.

Here is the caller graph for this function:

◆ assign() [2/5]

template<class S>
void SF::dmat< S >::assign ( const S  v)
inline

set all entries to a value

Definition at line 143 of file dense_mat.hpp.

◆ assign() [3/5]

template<class S>
void SF::dmat< S >::assign ( const S *  v)
inline

set all entries to a value

Definition at line 148 of file dense_mat.hpp.

◆ assign() [4/5]

template<class S>
void SF::dmat< S >::assign ( const short  irows,
const short  icols,
const S  v 
)
inline

resize and set all entries to a value

Definition at line 154 of file dense_mat.hpp.

◆ assign() [5/5]

template<class S>
void SF::dmat< S >::assign ( const short  irows,
const short  icols,
const S *  v 
)
inline

resize and set all entries to a value

Definition at line 160 of file dense_mat.hpp.

◆ cols()

template<class S>
short SF::dmat< S >::cols ( ) const
inline

Definition at line 177 of file dense_mat.hpp.

Here is the caller graph for this function:

◆ data() [1/2]

template<class S>
S* SF::dmat< S >::data ( )
inline

Definition at line 264 of file dense_mat.hpp.

Here is the caller graph for this function:

◆ data() [2/2]

template<class S>
const S* SF::dmat< S >::data ( ) const
inline

Definition at line 268 of file dense_mat.hpp.

◆ diag()

template<class S>
void SF::dmat< S >::diag ( const S  v)
inline

set all diagonal entries to a value

Definition at line 167 of file dense_mat.hpp.

◆ disp()

template<class S>
void SF::dmat< S >::disp ( const char *  name)
inline

Definition at line 254 of file dense_mat.hpp.

Here is the caller graph for this function:

◆ double_cont()

template<class S>
double SF::dmat< S >::double_cont ( const dmat< S > &  in) const
inline

mat-mat double contraction

Definition at line 195 of file dense_mat.hpp.

◆ lu_decomp()

template<class S>
bool SF::dmat< S >::lu_decomp ( )
inline

Definition at line 273 of file dense_mat.hpp.

◆ lu_solve()

template<class S>
void SF::dmat< S >::lu_solve ( S *  rhs)
inline

Definition at line 342 of file dense_mat.hpp.

◆ mult() [1/2]

template<class S>
void SF::dmat< S >::mult ( const dmat< S > &  in,
dmat< S > &  out 
) const
inline

mat-mat multiplication

Definition at line 182 of file dense_mat.hpp.

Here is the caller graph for this function:

◆ mult() [2/2]

template<class S>
void SF::dmat< S >::mult ( const S *  in,
S *  out 
)
inline

mat-vec multiplication

Definition at line 208 of file dense_mat.hpp.

◆ mult_transp()

template<class S>
void SF::dmat< S >::mult_transp ( const S *  in,
S *  out 
)
inline

Definition at line 218 of file dense_mat.hpp.

◆ operator*=()

template<class S>
void SF::dmat< S >::operator*= ( const S  s)
inline

Definition at line 124 of file dense_mat.hpp.

◆ operator+=()

template<class S>
void SF::dmat< S >::operator+= ( const dmat< S > &  m)
inline

Definition at line 110 of file dense_mat.hpp.

◆ operator-=()

template<class S>
void SF::dmat< S >::operator-= ( const dmat< S > &  m)
inline

Definition at line 117 of file dense_mat.hpp.

◆ operator/=()

template<class S>
void SF::dmat< S >::operator/= ( const S  s)
inline

Definition at line 129 of file dense_mat.hpp.

◆ operator=() [1/2]

template<class S>
dmat<S>& SF::dmat< S >::operator= ( dmat< S > &&  m)
inline

Definition at line 83 of file dense_mat.hpp.

◆ operator=() [2/2]

template<class S>
dmat<S>& SF::dmat< S >::operator= ( const dmat< S > &  m)
inline

Definition at line 91 of file dense_mat.hpp.

◆ operator[]() [1/2]

template<class S>
const S* SF::dmat< S >::operator[] ( short  ridx) const
inline

[] operator returns the pointer to the beginning of a given row

Definition at line 100 of file dense_mat.hpp.

◆ operator[]() [2/2]

template<class S>
S* SF::dmat< S >::operator[] ( short  ridx)
inline

[] operator returns the pointer to the beginning of a given row

Definition at line 105 of file dense_mat.hpp.

◆ rows()

template<class S>
short SF::dmat< S >::rows ( ) const
inline

Definition at line 173 of file dense_mat.hpp.

Here is the caller graph for this function:

◆ set_size()

template<class S>
void SF::dmat< S >::set_size ( const short  irows,
const short  icols 
)
inline

set the matrix dimensions

Definition at line 73 of file dense_mat.hpp.

Here is the caller graph for this function:

◆ transpose()

template<class S>
void SF::dmat< S >::transpose ( )
inline

Definition at line 227 of file dense_mat.hpp.

Here is the caller graph for this function:

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