concepts::ElementMatrixBase< F > Class Template Reference

Base class for element matrices. More...

#include <element.hh>

Public Types

typedef F value_type
 

Public Member Functions

 ElementMatrixBase ()
 Constructor. More...
 
const Array< F > & getData () const
 Returns the data array
More...
 
bool isTranspose () const
 Returns true if the matrix is internally stored as transposed (column-major). More...
 
uint m () const
 Returns the number of rows. More...
 
uint n () const
 Returns the number of columns. More...
 
 operator const F * () const
 Returns a pointer to the data array. More...
 
const F & operator() (const uint i, const uint j) const
 Returns element (i, j) More...
 
uint size () const
 Returns the number of entries in the matrix. More...
 
bool storeMatlab (const std::string filename, std::string name="", bool append=false) const
 Stores the matrix in a Matlab matrix. More...
 

Protected Attributes

Array< F > data_
 Data. More...
 
uint m_
 Number of rows. More...
 
uint n_
 Number of columns. More...
 
bool t_
 Transpose. More...
 

Detailed Description

template<class F>
class concepts::ElementMatrixBase< F >

Base class for element matrices.

The class has only constant methods. Active methods have to be defined in derived classes.

Author
Kersten Schmidt, 2009.

Definition at line 139 of file element.hh.

Member Typedef Documentation

◆ value_type

template<class F >
typedef F concepts::ElementMatrixBase< F >::value_type

Definition at line 141 of file element.hh.

Constructor & Destructor Documentation

◆ ElementMatrixBase()

template<class F >
concepts::ElementMatrixBase< F >::ElementMatrixBase ( )
inline

Constructor.

Initializes an empty matrix which is not transposed, which correspond to row-major storage order.

Definition at line 148 of file element.hh.

Member Function Documentation

◆ getData()

template<class F >
const Array<F>& concepts::ElementMatrixBase< F >::getData ( ) const
inline

Returns the data array

Definition at line 172 of file element.hh.

◆ isTranspose()

template<class F >
bool concepts::ElementMatrixBase< F >::isTranspose ( ) const
inline

Returns true if the matrix is internally stored as transposed (column-major).

Definition at line 177 of file element.hh.

◆ m()

template<class F >
uint concepts::ElementMatrixBase< F >::m ( ) const
inline

Returns the number of rows.

Definition at line 151 of file element.hh.

◆ n()

template<class F >
uint concepts::ElementMatrixBase< F >::n ( ) const
inline

Returns the number of columns.

Definition at line 153 of file element.hh.

◆ operator const F *()

template<class F >
concepts::ElementMatrixBase< F >::operator const F * ( ) const
inline

Returns a pointer to the data array.

Definition at line 169 of file element.hh.

◆ operator()()

template<class F >
const F& concepts::ElementMatrixBase< F >::operator() ( const uint  i,
const uint  j 
) const
inline

Returns element (i, j)

Definition at line 156 of file element.hh.

◆ size()

template<class F >
uint concepts::ElementMatrixBase< F >::size ( ) const
inline

Returns the number of entries in the matrix.

Definition at line 166 of file element.hh.

◆ storeMatlab()

template<class F >
bool concepts::ElementMatrixBase< F >::storeMatlab ( const std::string  filename,
std::string  name = "",
bool  append = false 
) const

Stores the matrix in a Matlab matrix.

Parameters
filenamename of the matlab file, with ending '.m'
namename of the variable, e.g. "A"
appendif false, create new file, otherwise append to it
Returns
true if the writes was successfull

Member Data Documentation

◆ data_

template<class F >
Array<F> concepts::ElementMatrixBase< F >::data_
protected

Data.

Definition at line 189 of file element.hh.

◆ m_

template<class F >
uint concepts::ElementMatrixBase< F >::m_
protected

Number of rows.

Definition at line 191 of file element.hh.

◆ n_

template<class F >
uint concepts::ElementMatrixBase< F >::n_
protected

Number of columns.

Definition at line 193 of file element.hh.

◆ t_

template<class F >
bool concepts::ElementMatrixBase< F >::t_
protected

Transpose.

Definition at line 195 of file element.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich