ergo
mat::MatrixGeneral< Treal, Tmatrix > Class Template Reference

Normal matrix. More...

#include <MatrixBase.h>

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

Public Types

typedef VectorGeneral< Treal, typename Tmatrix::VectorType > VectorType
 

Public Member Functions

 MatrixGeneral ()
 Default constructor. More...
 
 MatrixGeneral (const MatrixGeneral< Treal, Tmatrix > &matr)
 Copy constructor. More...
 
 MatrixGeneral (const MatrixSymmetric< Treal, Tmatrix > &symm)
 Copy from symmetric matrix constructor. More...
 
 MatrixGeneral (const MatrixTriangular< Treal, Tmatrix > &triang)
 Copy from triangular matrix constructor. More...
 
void assignFromFull (std::vector< Treal > const &fullMat)
 
void fullMatrix (std::vector< Treal > &fullMat) const
 
void fullMatrix (std::vector< Treal > &fullMat, std::vector< int > const &rowInversePermutation, std::vector< int > const &colInversePermutation) const
 Save matrix as full matrix. More...
 
void assign_from_sparse (std::vector< int > const &rowind, std::vector< int > const &colind, std::vector< Treal > const &values, SizesAndBlocks const &newRows, SizesAndBlocks const &newCols)
 Assign from sparse matrix given by three arrays. More...
 
void assign_from_sparse (std::vector< int > const &rowind, std::vector< int > const &colind, std::vector< Treal > const &values, std::vector< int > const &rowPermutation, std::vector< int > const &colPermutation)
 Same as above, except taking two additional arguments specifying the permutation of rows and columns. More...
 
void assign_from_sparse (std::vector< int > const &rowind, std::vector< int > const &colind, std::vector< Treal > const &values, SizesAndBlocks const &newRows, SizesAndBlocks const &newCols, std::vector< int > const &rowPermutation, std::vector< int > const &colPermutation)
 Same as above, except not assuming that sizes and blocks are set. More...
 
void get_values (std::vector< int > const &rowind, std::vector< int > const &colind, std::vector< Treal > &values) const
 Get values given by row and column index lists. More...
 
void get_values (std::vector< int > const &rowind, std::vector< int > const &colind, std::vector< Treal > &values, std::vector< int > const &rowPermutation, std::vector< int > const &colPermutation) const
 Same as above, except taking two additional arguments specifying the permutation of rows and columns. More...
 
void get_all_values (std::vector< int > &rowind, std::vector< int > &colind, std::vector< Treal > &values) const
 Get all values and corresponding row and column index lists, in matrix. More...
 
void get_all_values (std::vector< int > &rowind, std::vector< int > &colind, std::vector< Treal > &values, std::vector< int > const &rowInversePermutation, std::vector< int > const &colInversePermutation) const
 Same as above, except taking two additional arguments specifying the permutation of rows and columns. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const MatrixGeneral< Treal, Tmatrix > &mat)
 
MatrixGeneral< Treal, Tmatrix > & operator= (const Xtrans< MatrixGeneral< Treal, Tmatrix > > &mt)
 
MatrixGeneral< Treal, Tmatrix > & operator= (const MatrixSymmetric< Treal, Tmatrix > &symm)
 
MatrixGeneral< Treal, Tmatrix > & operator= (const MatrixTriangular< Treal, Tmatrix > &triang)
 
MatrixGeneral< Treal, Tmatrix > & operator= (int const k)
 
Treal frob () const
 
Treal eucl (Treal const requestedAccuracy, int maxIter=-1) const
 
void thresh (Treal const threshold, normType const norm)
 
void frob_thresh (Treal threshold)
 
Treal eucl_thresh (Treal const threshold)
 
void gershgorin (Treal &lmin, Treal &lmax)
 
size_t nnz () const
 
size_t nvalues () const
 
void write_to_buffer (void *buffer, const int n_bytes) const
 
void read_from_buffer (void *buffer, const int n_bytes)
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &smm)
 C = alpha * op(A) * op(B) More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XY< MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &mm)
 C = op(A) * op(B) More...
 
MatrixGeneral< Treal, Tmatrix > & operator+= (const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &smm)
 C += alpha * op(A) * op(B) More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZpUV< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &smmpsm)
 C = alpha * op(A) * op(B) + beta * C. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (XpY< MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > const &mpm)
 C = A + B. More...
 
MatrixGeneral< Treal, Tmatrix > & operator+= (MatrixGeneral< Treal, Tmatrix > const &A)
 B += A. More...
 
MatrixGeneral< Treal, Tmatrix > & operator-= (MatrixGeneral< Treal, Tmatrix > const &A)
 
MatrixGeneral< Treal, Tmatrix > & operator+= (XY< Treal, MatrixGeneral< Treal, Tmatrix > > const &sm)
 B += alpha * A. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &smm)
 C = alpha * A * B : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XY< MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &mm)
 C = A * B : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator+= (const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &smm)
 C += alpha * A * B : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZpUV< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &smmpsm)
 C = alpha * A * B + beta * C : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &smm)
 C = alpha * B * A : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XY< MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &mm)
 C = B * A : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator+= (const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &smm)
 C += alpha * B * A : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZpUV< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &smmpsm)
 C = alpha * B * A + beta * C : A is symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &smm)
 C = alpha * A * B : A and B are symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XY< MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &mm)
 C = A * B : A and B are symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator+= (const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &smm)
 C += alpha * A * B : A and B are symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZpUV< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &smmpsm)
 C = alpha * A * B + beta * C : A and B are symmetric. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZ< Treal, MatrixTriangular< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &smm)
 B = alpha * op(A) * B : A is upper triangular. More...
 
MatrixGeneral< Treal, Tmatrix > & operator= (const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixTriangular< Treal, Tmatrix > > &smm)
 B = alpha * B * op(A) : A is upper triangular. More...
 
void random ()
 
void randomZeroStructure (Treal probabilityBeingZero)
 
template<typename TRule >
void setElementsByRule (TRule &rule)
 
std::string obj_type_id () const
 
- Public Member Functions inherited from mat::MatrixBase< Treal, Tmatrix >
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. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from mat::FileWritable
void writeToFile ()
 Write object to file if filewrite is active. More...
 
void readFromFile ()
 Read object from file if filewrite is active. More...
 
void copyToFile (const char *destFileName)
 
void copyFromFile (const char *sourceFileName)
 
bool isOnFile ()
 Check if object is on file. More...
 
long int fileSize ()
 Return file size. More...
 

Static Public Member Functions

static Treal frob_diff (const MatrixGeneral< Treal, Tmatrix > &A, const MatrixGeneral< Treal, Tmatrix > &B)
 
static Treal trace_ab (const MatrixGeneral< Treal, Tmatrix > &A, const MatrixGeneral< Treal, Tmatrix > &B)
 
static Treal trace_aTb (const MatrixGeneral< Treal, Tmatrix > &A, const MatrixGeneral< Treal, Tmatrix > &B)
 
- Static Public Member Functions inherited from mat::FileWritable
static void setPath (char const *const newPath)
 Set the path to which the objects will be written. More...
 
static void activate ()
 Activate the filewriting. More...
 
static std::string getStatsFileSizes ()
 
static std::string writeAndReadAll ()
 
static void resetStats ()
 
static std::string getStatsTimeWrite ()
 
static std::string getStatsTimeRead ()
 
static std::string getStatsTimeCopyAndAssign ()
 
static std::string getStatsCountWrite ()
 
static std::string getStatsCountRead ()
 
static std::string getStatsCountCopyAndAssign ()
 

Protected Member Functions

void writeToFileProt (std::ofstream &file) const
 Write object to file. More...
 
void readFromFileProt (std::ifstream &file)
 Read object from file. More...
 
- Protected Member Functions inherited from mat::MatrixBase< Treal, Tmatrix >
 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)
 
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. More...
 
- Protected Member Functions inherited from mat::FileWritable
 FileWritable ()
 Gives each object a unique ID-number and filename. More...
 
virtual ~FileWritable ()
 Removes file, if any. More...
 
 FileWritable (FileWritable const &)
 
FileWritableoperator= (FileWritable const &)
 

Additional Inherited Members

- Protected Types inherited from mat::FileWritable
typedef std::map< std::string, double > TypeTimeMap
 
typedef std::map< std::string, int > TypeCountMap
 
typedef std::set< FileWritable * > ObjPtrSet
 
- Static Protected Member Functions inherited from mat::MatrixBase< Treal, Tmatrix >
static void getPermutedIndexes (std::vector< int > const &index, std::vector< int > const &permutation, std::vector< int > &newIndex)
 
- Static Protected Member Functions inherited from mat::FileWritable
static std::string getStatsTime (TypeTimeMap &theMap)
 
static std::string getStatsCount (TypeCountMap &theMap)
 
static std::string getStatsFileSizes (ObjPtrSet const &set)
 
- Protected Attributes inherited from mat::MatrixBase< Treal, Tmatrix >
ValidPtr< Tmatrix > matrixPtr
 

Detailed Description

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

Normal matrix.

This class belongs to the matrix API

Treal: Type for real numbers

Tmatrix: The matrix class

Tperm: Permutation used in the matrix class

See also
MatrixBase
MatrixSymmetric
MatrixTriangular

Member Typedef Documentation

◆ VectorType

template<typename Treal, typename Tmatrix>
typedef VectorGeneral<Treal, typename Tmatrix::VectorType> mat::MatrixGeneral< Treal, Tmatrix >::VectorType

Constructor & Destructor Documentation

◆ MatrixGeneral() [1/4]

template<typename Treal, typename Tmatrix>
mat::MatrixGeneral< Treal, Tmatrix >::MatrixGeneral ( )
inline

Default constructor.

◆ MatrixGeneral() [2/4]

template<typename Treal, typename Tmatrix>
mat::MatrixGeneral< Treal, Tmatrix >::MatrixGeneral ( const MatrixGeneral< Treal, Tmatrix > &  matr)
inlineexplicit

Copy constructor.

◆ MatrixGeneral() [3/4]

template<typename Treal, typename Tmatrix>
mat::MatrixGeneral< Treal, Tmatrix >::MatrixGeneral ( const MatrixSymmetric< Treal, Tmatrix > &  symm)
inlineexplicit

Copy from symmetric matrix constructor.

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

◆ MatrixGeneral() [4/4]

template<typename Treal, typename Tmatrix>
mat::MatrixGeneral< Treal, Tmatrix >::MatrixGeneral ( const MatrixTriangular< Treal, Tmatrix > &  triang)
inlineexplicit

Copy from triangular matrix constructor.

Member Function Documentation

◆ assign_from_sparse() [1/3]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse ( std::vector< int > const &  rowind,
std::vector< int > const &  colind,
std::vector< Treal > const &  values,
SizesAndBlocks const &  newRows,
SizesAndBlocks const &  newCols 
)
inline

Assign from sparse matrix given by three arrays.

The arrays contain row indices, column indices and values. The indices start at zero. nval is the length of the three arrays.

Warning
All indexing start at zero.

References mat::MatrixBase< Treal, Tmatrix >::matrixPtr, and mat::MatrixBase< Treal, Tmatrix >::resetSizesAndBlocks().

Referenced by mat::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse(), and mainFun().

◆ assign_from_sparse() [2/3]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse ( std::vector< int > const &  rowind,
std::vector< int > const &  colind,
std::vector< Treal > const &  values,
std::vector< int > const &  rowPermutation,
std::vector< int > const &  colPermutation 
)
inline

Same as above, except taking two additional arguments specifying the permutation of rows and columns.

Also assuming that sizes and blocks are already known

References mat::MatrixBase< Treal, Tmatrix >::getPermutedIndexes(), and mat::MatrixBase< Treal, Tmatrix >::matrixPtr.

◆ assign_from_sparse() [3/3]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse ( std::vector< int > const &  rowind,
std::vector< int > const &  colind,
std::vector< Treal > const &  values,
SizesAndBlocks const &  newRows,
SizesAndBlocks const &  newCols,
std::vector< int > const &  rowPermutation,
std::vector< int > const &  colPermutation 
)
inline

Same as above, except not assuming that sizes and blocks are set.

References mat::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse(), and mat::MatrixBase< Treal, Tmatrix >::resetSizesAndBlocks().

◆ assignFromFull()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::assignFromFull ( std::vector< Treal > const &  fullMat)
inline

◆ eucl()

◆ eucl_thresh()

template<typename Treal , typename Tmatrix >
Treal mat::MatrixGeneral< Treal, Tmatrix >::eucl_thresh ( Treal const  threshold)

◆ frob()

template<typename Treal, typename Tmatrix>
Treal mat::MatrixGeneral< Treal, Tmatrix >::frob ( ) const
inline

◆ frob_diff()

template<typename Treal, typename Tmatrix>
static Treal mat::MatrixGeneral< Treal, Tmatrix >::frob_diff ( const MatrixGeneral< Treal, Tmatrix > &  A,
const MatrixGeneral< Treal, Tmatrix > &  B 
)
inlinestatic

References A, and B.

◆ frob_thresh()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::frob_thresh ( Treal  threshold)
inline

◆ fullMatrix() [1/2]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::fullMatrix ( std::vector< Treal > &  fullMat) const
inline

◆ fullMatrix() [2/2]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::fullMatrix ( std::vector< Treal > &  fullMat,
std::vector< int > const &  rowInversePermutation,
std::vector< int > const &  colInversePermutation 
) const
inline

Save matrix as full matrix.

Whole matrix is written in columnwise order. Both lower and upper triangle. Permutation is used.

References mat::MatrixGeneral< Treal, Tmatrix >::get_all_values(), mat::MatrixBase< Treal, Tmatrix >::get_ncols(), and mat::MatrixBase< Treal, Tmatrix >::get_nrows().

◆ gershgorin()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::gershgorin ( Treal &  lmin,
Treal &  lmax 
)
inline

◆ get_all_values() [1/2]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::get_all_values ( std::vector< int > &  rowind,
std::vector< int > &  colind,
std::vector< Treal > &  values 
) const
inline

Get all values and corresponding row and column index lists, in matrix.

nval is the length of the three arrays and is preferably computed with nvalues() before hand. Returns the number of values.

See also
nvalues()
Warning
All indexing start at zero.

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

Referenced by mat::MatrixGeneral< Treal, Tmatrix >::fullMatrix().

◆ get_all_values() [2/2]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::get_all_values ( std::vector< int > &  rowind,
std::vector< int > &  colind,
std::vector< Treal > &  values,
std::vector< int > const &  rowInversePermutation,
std::vector< int > const &  colInversePermutation 
) const
inline

Same as above, except taking two additional arguments specifying the permutation of rows and columns.

Note, however, that this permutation is the inverse permutation compared to the permutations provided in the functions "assign_from_sparse", "add_values", and "get_values"

Warning
permutation is inverse compared to other functions

References mat::MatrixBase< Treal, Tmatrix >::getPermutedIndexes(), and mat::MatrixBase< Treal, Tmatrix >::matrixPtr.

◆ get_values() [1/2]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::get_values ( std::vector< int > const &  rowind,
std::vector< int > const &  colind,
std::vector< Treal > &  values 
) const
inline

Get values given by row and column index lists.

Input arrays contain row and column indices. The output array contains values for the given indices. nval is the length of the three arrays.

Warning
All indexing start at zero.

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

Referenced by main(), and mainFun().

◆ get_values() [2/2]

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::get_values ( std::vector< int > const &  rowind,
std::vector< int > const &  colind,
std::vector< Treal > &  values,
std::vector< int > const &  rowPermutation,
std::vector< int > const &  colPermutation 
) const
inline

Same as above, except taking two additional arguments specifying the permutation of rows and columns.

References mat::MatrixBase< Treal, Tmatrix >::getPermutedIndexes(), and mat::MatrixBase< Treal, Tmatrix >::matrixPtr.

◆ nnz()

template<typename Treal, typename Tmatrix>
size_t mat::MatrixGeneral< Treal, Tmatrix >::nnz ( ) const
inline

◆ nvalues()

template<typename Treal, typename Tmatrix>
size_t mat::MatrixGeneral< Treal, Tmatrix >::nvalues ( ) const
inline

◆ obj_type_id()

template<typename Treal, typename Tmatrix>
std::string mat::MatrixGeneral< Treal, Tmatrix >::obj_type_id ( ) const
inlinevirtual

Reimplemented from mat::MatrixBase< Treal, Tmatrix >.

◆ operator+=() [1/6]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator+= ( const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &  smm)

C += alpha * op(A) * op(B)

References mat::gemm().

◆ operator+=() [2/6]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator+= ( MatrixGeneral< Treal, Tmatrix > const &  A)
inline

B += A.

References A.

◆ operator+=() [3/6]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator+= ( XY< Treal, MatrixGeneral< Treal, Tmatrix > > const &  sm)
inline

B += alpha * A.

◆ operator+=() [4/6]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator+= ( const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &  smm)

C += alpha * A * B : A is symmetric.

References mat::symm().

◆ operator+=() [5/6]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator+= ( const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &  smm)

C += alpha * B * A : A is symmetric.

References mat::symm().

◆ operator+=() [6/6]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator+= ( const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &  smm)

C += alpha * A * B : A and B are symmetric.

◆ operator-=()

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator-= ( MatrixGeneral< Treal, Tmatrix > const &  A)
inline

References A.

◆ operator=() [1/20]

template<typename Treal, typename Tmatrix>
MatrixGeneral<Treal, Tmatrix>& mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const MatrixGeneral< Treal, Tmatrix > &  mat)
inline

◆ operator=() [2/20]

template<typename Treal, typename Tmatrix>
MatrixGeneral<Treal, Tmatrix>& mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const Xtrans< MatrixGeneral< Treal, Tmatrix > > &  mt)
inline

◆ operator=() [3/20]

template<typename Treal, typename Tmatrix>
MatrixGeneral<Treal, Tmatrix>& mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const MatrixSymmetric< Treal, Tmatrix > &  symm)
inline

◆ operator=() [4/20]

template<typename Treal, typename Tmatrix>
MatrixGeneral<Treal, Tmatrix>& mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const MatrixTriangular< Treal, Tmatrix > &  triang)
inline

◆ operator=() [5/20]

template<typename Treal, typename Tmatrix>
MatrixGeneral<Treal, Tmatrix>& mat::MatrixGeneral< Treal, Tmatrix >::operator= ( int const  k)
inline

◆ operator=() [6/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &  smm)

C = alpha * op(A) * op(B)

References mat::gemm().

◆ operator=() [7/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XY< MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &  mm)

C = op(A) * op(B)

References mat::gemm().

◆ operator=() [8/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZpUV< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &  smmpsm)

C = alpha * op(A) * op(B) + beta * C.

References mat::gemm().

◆ operator=() [9/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( XpY< MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > const &  mpm)
inline

C = A + B.

◆ operator=() [10/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &  smm)

C = alpha * A * B : A is symmetric.

References mat::symm().

◆ operator=() [11/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XY< MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &  mm)

C = A * B : A is symmetric.

References mat::symm().

◆ operator=() [12/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZpUV< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &  smmpsm)

C = alpha * A * B + beta * C : A is symmetric.

References mat::symm().

◆ operator=() [13/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &  smm)

C = alpha * B * A : A is symmetric.

References mat::symm().

◆ operator=() [14/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XY< MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &  mm)

C = B * A : A is symmetric.

References mat::symm().

◆ operator=() [15/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZpUV< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &  smmpsm)

C = alpha * B * A + beta * C : A is symmetric.

References mat::symm().

◆ operator=() [16/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &  smm)

C = alpha * A * B : A and B are symmetric.

◆ operator=() [17/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XY< MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix > > &  mm)

C = A * B : A and B are symmetric.

◆ operator=() [18/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZpUV< Treal, MatrixSymmetric< Treal, Tmatrix >, MatrixSymmetric< Treal, Tmatrix >, Treal, MatrixGeneral< Treal, Tmatrix > > &  smmpsm)

C = alpha * A * B + beta * C : A and B are symmetric.

◆ operator=() [19/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZ< Treal, MatrixTriangular< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &  smm)

B = alpha * op(A) * B : A is upper triangular.

References mat::trmm().

◆ operator=() [20/20]

template<typename Treal , typename Tmatrix >
MatrixGeneral< Treal, Tmatrix > & mat::MatrixGeneral< Treal, Tmatrix >::operator= ( const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixTriangular< Treal, Tmatrix > > &  smm)

B = alpha * B * op(A) : A is upper triangular.

References mat::trmm().

◆ random()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::random ( )
inline

◆ randomZeroStructure()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::randomZeroStructure ( Treal  probabilityBeingZero)
inline

◆ read_from_buffer()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::read_from_buffer ( void *  buffer,
const int  n_bytes 
)
inline

◆ readFromFileProt()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::readFromFileProt ( std::ifstream &  )
inlineprotectedvirtual

Read object from file.

Defined in derived class.

Implements mat::FileWritable.

References mat::matrix_matr, and mat::MatrixBase< Treal, Tmatrix >::readFromFileBase().

◆ setElementsByRule()

template<typename Treal, typename Tmatrix>
template<typename TRule >
void mat::MatrixGeneral< Treal, Tmatrix >::setElementsByRule ( TRule &  rule)
inline

◆ thresh()

template<typename Treal , typename Tmatrix >
void mat::MatrixGeneral< Treal, Tmatrix >::thresh ( Treal const  threshold,
normType const  norm 
)

References mat::frobNorm.

◆ trace_ab()

template<typename Treal, typename Tmatrix>
static Treal mat::MatrixGeneral< Treal, Tmatrix >::trace_ab ( const MatrixGeneral< Treal, Tmatrix > &  A,
const MatrixGeneral< Treal, Tmatrix > &  B 
)
inlinestatic

References A, and B.

Referenced by mat::trace().

◆ trace_aTb()

template<typename Treal, typename Tmatrix>
static Treal mat::MatrixGeneral< Treal, Tmatrix >::trace_aTb ( const MatrixGeneral< Treal, Tmatrix > &  A,
const MatrixGeneral< Treal, Tmatrix > &  B 
)
inlinestatic

References A, and B.

Referenced by mat::trace().

◆ write_to_buffer()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::write_to_buffer ( void *  buffer,
const int  n_bytes 
) const
inline

◆ writeToFileProt()

template<typename Treal, typename Tmatrix>
void mat::MatrixGeneral< Treal, Tmatrix >::writeToFileProt ( std::ofstream &  ) const
inlineprotectedvirtual

Write object to file.

Defined in derived class.

Implements mat::FileWritable.

References mat::matrix_matr, and mat::MatrixBase< Treal, Tmatrix >::writeToFileBase().


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