mat::MatrixBase< Treal, Tmatrix > Class Template Reference

Base class for matrix API. More...

#include <MatrixBase.h>

Inheritance diagram for mat::MatrixBase< Treal, Tmatrix >:
mat::FileWritable mat::MatrixGeneral< Treal, Tmatrix > mat::MatrixSymmetric< Treal, Tmatrix > mat::MatrixTriangular< Treal, Tmatrix >

List of all members.

Public Member Functions

void resetSizesAndBlocks (SizesAndBlocks const &newRows, SizesAndBlocks const &newCols)
void getRows (SizesAndBlocks &rowsCopy) const
void getCols (SizesAndBlocks &colsCopy) const
bool is_empty () const
 Check if matrix is empty.
Treal trace () const
void add_identity (Treal alpha)
MatrixBase< Treal, Tmatrix > & operator*= (Treal const alpha)
bool operator== (int k) const
void clear ()
 Release memory for the information written to file.
size_t memory_usage () const
void write_to_buffer_count (int &n_bytes) const
int get_nrows () const
int get_ncols () const
Tmatrix const & getMatrix () const
Tmatrix & getMatrix ()
Treal maxAbsValue () const
 Get largest absolute value of matrix element in the matrix.

Protected Member Functions

 MatrixBase ()
 MatrixBase (const MatrixBase< Treal, Tmatrix > &other)
MatrixBase< Treal, Tmatrix > & operator= (const MatrixBase< Treal, Tmatrix > &other)
MatrixBase< Treal, Tmatrix > & operator= (const Xtrans< MatrixGeneral< Treal, Tmatrix > > &mt)
void write_to_buffer_base (void *buffer, const int n_bytes, const matrix_type mattype) const
void read_from_buffer_base (void *buffer, const int n_bytes, const matrix_type mattype)
void writeToFileBase (std::ofstream &file, matrix_type const mattype) const
void readFromFileBase (std::ifstream &file, matrix_type const mattype)
std::string obj_type_id () const
void inMemorySet (bool inMem)
 Make object invalid (false) via this function when object is written to file and valid (true) when object is read from file.

Static Protected Member Functions

static void getPermutedIndexes (std::vector< int > const &index, std::vector< int > const &permutation, std::vector< int > &newIndex)

Protected Attributes

ValidPtr< Tmatrix > matrixPtr

Friends

class MatrixGeneral< Treal, Tmatrix >
class MatrixSymmetric< Treal, Tmatrix >
class MatrixTriangular< Treal, Tmatrix >

Detailed Description

template<typename Treal, typename Tmatrix>
class mat::MatrixBase< Treal, Tmatrix >

Base class for matrix API.

This class provides a base for an API to a matrix library built up from three types which are also the template arguments to this class.

Treal: Type for real numbers

Tmatrix: The matrix class


Constructor & Destructor Documentation

template<typename Treal, typename Tmatrix>
mat::MatrixBase< Treal, Tmatrix >::MatrixBase (  )  [inline, protected]
template<typename Treal, typename Tmatrix>
mat::MatrixBase< Treal, Tmatrix >::MatrixBase ( const MatrixBase< Treal, Tmatrix > &  other  )  [inline, protected]

Member Function Documentation

template<typename Treal, typename Tmatrix>
void mat::MatrixBase< Treal, Tmatrix >::add_identity ( Treal  alpha  )  [inline]
template<typename Treal, typename Tmatrix>
void mat::MatrixBase< Treal, Tmatrix >::clear (  )  [inline, virtual]
template<typename Treal, typename Tmatrix>
int mat::MatrixBase< Treal, Tmatrix >::get_ncols (  )  const [inline]
template<typename Treal, typename Tmatrix>
int mat::MatrixBase< Treal, Tmatrix >::get_nrows (  )  const [inline]
template<typename Treal, typename Tmatrix>
void mat::MatrixBase< Treal, Tmatrix >::getCols ( SizesAndBlocks colsCopy  )  const [inline]
template<typename Treal, typename Tmatrix>
Tmatrix& mat::MatrixBase< Treal, Tmatrix >::getMatrix (  )  [inline]
template<typename Treal, typename Tmatrix>
Tmatrix const& mat::MatrixBase< Treal, Tmatrix >::getMatrix (  )  const [inline]
template<typename Treal, typename Tmatrix>
static void mat::MatrixBase< Treal, Tmatrix >::getPermutedIndexes ( std::vector< int > const &  index,
std::vector< int > const &  permutation,
std::vector< int > &  newIndex 
) [inline, static, protected]
template<typename Treal, typename Tmatrix>
void mat::MatrixBase< Treal, Tmatrix >::getRows ( SizesAndBlocks rowsCopy  )  const [inline]
template<typename Treal, typename Tmatrix>
void mat::MatrixBase< Treal, Tmatrix >::inMemorySet ( bool   )  [inline, protected, virtual]

Make object invalid (false) via this function when object is written to file and valid (true) when object is read from file.

Implements mat::FileWritable.

References mat::ValidPtr< Tobj >::inMemorySet(), and mat::MatrixBase< Treal, Tmatrix >::matrixPtr.

template<typename Treal, typename Tmatrix>
bool mat::MatrixBase< Treal, Tmatrix >::is_empty (  )  const [inline]

Check if matrix is empty.

Being empty is not the same as being zero. A matrix being empty means that the data structure has not been set.

References mat::ValidPtr< Tobj >::haveDataStructureGet(), and mat::MatrixBase< Treal, Tmatrix >::matrixPtr.

Referenced by mat::MatrixBase< Treal, Tmatrix >::clear(), mat::MatrixBase< Treal, Tmatrix >::readFromFileBase(), and mat::MatrixBase< Treal, Tmatrix >::writeToFileBase().

template<typename Treal, typename Tmatrix>
Treal mat::MatrixBase< Treal, Tmatrix >::maxAbsValue (  )  const [inline]

Get largest absolute value of matrix element in the matrix.

References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.

template<typename Treal, typename Tmatrix>
size_t mat::MatrixBase< Treal, Tmatrix >::memory_usage (  )  const [inline]
template<typename Treal, typename Tmatrix>
std::string mat::MatrixBase< Treal, Tmatrix >::obj_type_id (  )  const [inline, protected, virtual]
template<typename Treal, typename Tmatrix>
MatrixBase<Treal, Tmatrix>& mat::MatrixBase< Treal, Tmatrix >::operator*= ( Treal const   alpha  )  [inline]
template<typename Treal, typename Tmatrix>
MatrixBase<Treal, Tmatrix>& mat::MatrixBase< Treal, Tmatrix >::operator= ( const Xtrans< MatrixGeneral< Treal, Tmatrix > > &  mt  )  [inline, protected]
template<typename Treal, typename Tmatrix>
MatrixBase<Treal, Tmatrix>& mat::MatrixBase< Treal, Tmatrix >::operator= ( const MatrixBase< Treal, Tmatrix > &  other  )  [inline, protected]
template<typename Treal, typename Tmatrix>
bool mat::MatrixBase< Treal, Tmatrix >::operator== ( int  k  )  const [inline]
template<typename Treal , typename Tmatrix >
void mat::MatrixBase< Treal, Tmatrix >::read_from_buffer_base ( void *  buffer,
const int  n_bytes,
const matrix_type  mattype 
) [inline, protected]
template<typename Treal , typename Tmatrix >
void mat::MatrixBase< Treal, Tmatrix >::readFromFileBase ( std::ifstream &  file,
matrix_type const   mattype 
) [inline, protected]
template<typename Treal, typename Tmatrix>
void mat::MatrixBase< Treal, Tmatrix >::resetSizesAndBlocks ( SizesAndBlocks const &  newRows,
SizesAndBlocks const &  newCols 
) [inline]
template<typename Treal, typename Tmatrix>
Treal mat::MatrixBase< Treal, Tmatrix >::trace (  )  const [inline]
template<typename Treal , typename Tmatrix >
void mat::MatrixBase< Treal, Tmatrix >::write_to_buffer_base ( void *  buffer,
const int  n_bytes,
const matrix_type  mattype 
) const [inline, protected]
template<typename Treal, typename Tmatrix>
void mat::MatrixBase< Treal, Tmatrix >::write_to_buffer_count ( int &  n_bytes  )  const [inline]
template<typename Treal , typename Tmatrix >
void mat::MatrixBase< Treal, Tmatrix >::writeToFileBase ( std::ofstream &  file,
matrix_type const   mattype 
) const [inline, protected]

Friends And Related Function Documentation

template<typename Treal, typename Tmatrix>
friend class MatrixGeneral< Treal, Tmatrix > [friend]
template<typename Treal, typename Tmatrix>
friend class MatrixSymmetric< Treal, Tmatrix > [friend]
template<typename Treal, typename Tmatrix>
friend class MatrixTriangular< Treal, Tmatrix > [friend]

Member Data Documentation

template<typename Treal, typename Tmatrix>
ValidPtr<Tmatrix> mat::MatrixBase< Treal, Tmatrix >::matrixPtr [protected]

Referenced by mat::MatrixSymmetric< Treal, Tmatrix >::accumulateWith(), mat::MatrixBase< Treal, Tmatrix >::add_identity(), mat::MatrixTriangular< Treal, Tmatrix >::add_values(), mat::MatrixSymmetric< Treal, Tmatrix >::add_values(), mat::MatrixTriangular< Treal, Tmatrix >::assign_from_sparse(), mat::MatrixSymmetric< Treal, Tmatrix >::assign_from_sparse(), mat::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse(), mat::MatrixSymmetric< Treal, Tmatrix >::assignFromFull(), mat::MatrixGeneral< Treal, Tmatrix >::assignFromFull(), mat::MatrixBase< Treal, Tmatrix >::clear(), mat::MatrixTriangular< Treal, Tmatrix >::frob(), mat::MatrixSymmetric< Treal, Tmatrix >::frob(), mat::MatrixGeneral< Treal, Tmatrix >::frob(), mat::MatrixSymmetric< Treal, Tmatrix >::frob_diff(), mat::MatrixGeneral< Treal, Tmatrix >::frob_diff(), mat::MatrixTriangular< Treal, Tmatrix >::frob_thresh(), mat::MatrixSymmetric< Treal, Tmatrix >::frob_thresh(), mat::MatrixGeneral< Treal, Tmatrix >::frob_thresh(), mat::MatrixSymmetric< Treal, Tmatrix >::fullMatrix(), mat::MatrixGeneral< Treal, Tmatrix >::fullMatrix(), mat::MatrixSymmetric< Treal, Tmatrix >::gershgorin(), mat::MatrixGeneral< Treal, Tmatrix >::gershgorin(), mat::MatrixTriangular< Treal, Tmatrix >::get_all_values(), mat::MatrixSymmetric< Treal, Tmatrix >::get_all_values(), mat::MatrixGeneral< Treal, Tmatrix >::get_all_values(), mat::MatrixBase< Treal, Tmatrix >::get_ncols(), mat::MatrixBase< Treal, Tmatrix >::get_nrows(), mat::MatrixTriangular< Treal, Tmatrix >::get_values(), mat::MatrixSymmetric< Treal, Tmatrix >::get_values(), mat::MatrixGeneral< Treal, Tmatrix >::get_values(), mat::MatrixBase< Treal, Tmatrix >::getCols(), mat::MatrixBase< Treal, Tmatrix >::getMatrix(), mat::MatrixBase< Treal, Tmatrix >::getRows(), mat::MatrixTriangular< Treal, Tmatrix >::inch(), mat::MatrixBase< Treal, Tmatrix >::inMemorySet(), mat::MatrixBase< Treal, Tmatrix >::is_empty(), mat::MatrixBase< Treal, Tmatrix >::MatrixBase(), mat::MatrixGeneral< Treal, Tmatrix >::MatrixGeneral(), mat::MatrixSymmetric< Treal, Tmatrix >::MatrixSymmetric(), mat::MatrixBase< Treal, Tmatrix >::maxAbsValue(), mat::MatrixBase< Treal, Tmatrix >::memory_usage(), mat::MatrixTriangular< Treal, Tmatrix >::nnz(), mat::MatrixSymmetric< Treal, Tmatrix >::nnz(), mat::MatrixGeneral< Treal, Tmatrix >::nnz(), mat::MatrixTriangular< Treal, Tmatrix >::nvalues(), mat::MatrixSymmetric< Treal, Tmatrix >::nvalues(), mat::MatrixGeneral< Treal, Tmatrix >::nvalues(), mat::MatrixBase< Treal, Tmatrix >::operator*=(), mat::MatrixSymmetric< Treal, Tmatrix >::operator+=(), mat::MatrixGeneral< Treal, Tmatrix >::operator+=(), mat::MatrixSymmetric< Treal, Tmatrix >::operator-=(), mat::MatrixGeneral< Treal, Tmatrix >::operator-=(), mat::MatrixTriangular< Treal, Tmatrix >::operator=(), mat::MatrixSymmetric< Treal, Tmatrix >::operator=(), mat::MatrixGeneral< Treal, Tmatrix >::operator=(), mat::MatrixBase< Treal, Tmatrix >::operator=(), mat::MatrixBase< Treal, Tmatrix >::operator==(), mat::MatrixTriangular< Treal, Tmatrix >::random(), mat::MatrixSymmetric< Treal, Tmatrix >::random(), mat::MatrixGeneral< Treal, Tmatrix >::random(), mat::MatrixSymmetric< Treal, Tmatrix >::randomZeroStructure(), mat::MatrixGeneral< Treal, Tmatrix >::randomZeroStructure(), mat::MatrixBase< Treal, Tmatrix >::read_from_buffer_base(), mat::MatrixBase< Treal, Tmatrix >::readFromFileBase(), mat::MatrixBase< Treal, Tmatrix >::resetSizesAndBlocks(), mat::MatrixTriangular< Treal, Tmatrix >::setElementsByRule(), mat::MatrixSymmetric< Treal, Tmatrix >::setElementsByRule(), mat::MatrixGeneral< Treal, Tmatrix >::setElementsByRule(), mat::MatrixSymmetric< Treal, Tmatrix >::simple_blockwise_frob_thresh(), mat::MatrixSymmetric< Treal, Tmatrix >::ssmmUpperTriangleOnly(), mat::MatrixBase< Treal, Tmatrix >::trace(), mat::MatrixSymmetric< Treal, Tmatrix >::trace_ab(), mat::MatrixGeneral< Treal, Tmatrix >::trace_ab(), mat::MatrixGeneral< Treal, Tmatrix >::trace_aTb(), mat::MatrixSymmetric< Treal, Tmatrix >::transfer(), mat::MatrixBase< Treal, Tmatrix >::write_to_buffer_base(), mat::MatrixBase< Treal, Tmatrix >::write_to_buffer_count(), and mat::MatrixBase< Treal, Tmatrix >::writeToFileBase().


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

Generated on 10 Jul 2018 for ergo by  doxygen 1.6.1