|
ergo
|
Base class for matrix API. More...
#include <MatrixBase.h>
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. 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... | |
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. More... | |
Protected Member Functions inherited from mat::FileWritable | |
| virtual void | writeToFileProt (std::ofstream &) const =0 |
| Write object to file. More... | |
| virtual void | readFromFileProt (std::ifstream &)=0 |
| Read object from file. More... | |
| FileWritable () | |
| Gives each object a unique ID-number and filename. More... | |
| virtual | ~FileWritable () |
| Removes file, if any. More... | |
| FileWritable (FileWritable const &) | |
| FileWritable & | operator= (FileWritable const &) |
Static Protected Member Functions | |
| 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 | |
| ValidPtr< Tmatrix > | matrixPtr |
Friends | |
| class | MatrixGeneral< Treal, Tmatrix > |
| class | MatrixSymmetric< Treal, Tmatrix > |
| class | MatrixTriangular< Treal, Tmatrix > |
Additional Inherited Members | |
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 Types inherited from mat::FileWritable | |
| typedef std::map< std::string, double > | TypeTimeMap |
| typedef std::map< std::string, int > | TypeCountMap |
| typedef std::set< FileWritable * > | ObjPtrSet |
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
|
inlineprotected |
|
inlineprotected |
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
Referenced by mainFun().
|
inlinevirtual |
Release memory for the information written to file.
Implements mat::FileWritable.
References mat::MatrixBase< Treal, Tmatrix >::is_empty(), and mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
Referenced by SCF_unrestricted::clear_error_matrices(), SCF_restricted::clear_error_matrices(), and mat::MatrixSymmetric< Treal, Tmatrix >::transfer().
|
inline |
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
Referenced by mat::MatrixGeneral< Treal, Tmatrix >::assignFromFull(), mat::MatrixSymmetric< Treal, Tmatrix >::assignFromFull(), mat::MatrixGeneral< Treal, Tmatrix >::fullMatrix(), mat::MatrixSymmetric< Treal, Tmatrix >::fullMatrix(), main(), mainFun(), and mat::MatrixSymmetric< Treal, Tmatrix >::quickEuclBounds().
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
inlinestaticprotected |
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
inlineprotectedvirtual |
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.
|
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().
|
inline |
Get largest absolute value of matrix element in the matrix.
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
Referenced by mainFun().
|
inlineprotectedvirtual |
Implements mat::FileWritable.
Reimplemented in mat::MatrixSymmetric< Treal, Tmatrix >, mat::MatrixGeneral< Treal, Tmatrix >, and mat::MatrixTriangular< Treal, Tmatrix >.
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
inlineprotected |
References mat::ValidPtr< Tobj >::getConstRefForCopying(), mat::ValidPtr< Tobj >::haveDataStructureGet(), mat::ValidPtr< Tobj >::haveDataStructureSet(), mat::ValidPtr< Tobj >::inMemoryGet(), mat::ValidPtr< Tobj >::inMemorySet(), mat::MatrixBase< Treal, Tmatrix >::matrixPtr, and mat::FileWritable::operator=().
Referenced by mat::MatrixTriangular< Treal, Tmatrix >::operator=(), mat::MatrixGeneral< Treal, Tmatrix >::operator=(), and mat::MatrixSymmetric< Treal, Tmatrix >::operator=().
|
inlineprotected |
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
protected |
|
protected |
|
inline |
References mat::ValidPtr< Tobj >::haveDataStructureSet(), and mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
Referenced by mat::MatrixTriangular< Treal, Tmatrix >::assign_from_sparse(), mat::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse(), mat::MatrixSymmetric< Treal, Tmatrix >::assign_from_sparse(), SCF_unrestricted::get_2e_part_and_energy(), SCF_unrestricted::get_S2(), SCF_unrestricted::initialize_matrices(), SCF_restricted::initialize_matrices(), main(), mainFun(), MatAccInvestigator< Treal, Tworker >::Scan(), and SCF_general::SCF_general().
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
protected |
|
inline |
References mat::MatrixBase< Treal, Tmatrix >::matrixPtr.
|
protected |
|
friend |
|
friend |
|
friend |
|
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::MatrixGeneral< Treal, Tmatrix >::assign_from_sparse(), mat::MatrixSymmetric< Treal, Tmatrix >::assign_from_sparse(), mat::MatrixGeneral< Treal, Tmatrix >::assignFromFull(), mat::MatrixSymmetric< Treal, Tmatrix >::assignFromFull(), mat::MatrixBase< Treal, Tmatrix >::clear(), mat::MatrixTriangular< Treal, Tmatrix >::frob(), mat::MatrixGeneral< Treal, Tmatrix >::frob(), mat::MatrixSymmetric< Treal, Tmatrix >::frob(), mat::MatrixTriangular< Treal, Tmatrix >::frob_thresh(), mat::MatrixGeneral< Treal, Tmatrix >::frob_thresh(), mat::MatrixSymmetric< Treal, Tmatrix >::frob_thresh(), mat::MatrixGeneral< Treal, Tmatrix >::fullMatrix(), mat::MatrixSymmetric< Treal, Tmatrix >::fullMatrix(), mat::MatrixGeneral< Treal, Tmatrix >::gershgorin(), mat::MatrixSymmetric< Treal, Tmatrix >::gershgorin(), mat::MatrixTriangular< Treal, Tmatrix >::get_all_values(), mat::MatrixGeneral< Treal, Tmatrix >::get_all_values(), mat::MatrixSymmetric< Treal, Tmatrix >::get_all_values(), mat::MatrixBase< Treal, Tmatrix >::get_ncols(), mat::MatrixBase< Treal, Tmatrix >::get_nrows(), mat::MatrixTriangular< Treal, Tmatrix >::get_values(), mat::MatrixGeneral< Treal, Tmatrix >::get_values(), mat::MatrixSymmetric< 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::MatrixGeneral< Treal, Tmatrix >::nnz(), mat::MatrixSymmetric< Treal, Tmatrix >::nnz(), mat::MatrixTriangular< Treal, Tmatrix >::nvalues(), mat::MatrixGeneral< Treal, Tmatrix >::nvalues(), mat::MatrixSymmetric< Treal, Tmatrix >::nvalues(), mat::MatrixBase< Treal, Tmatrix >::operator*=(), mat::MatrixTriangular< Treal, Tmatrix >::operator=(), mat::MatrixBase< Treal, Tmatrix >::operator=(), mat::MatrixGeneral< Treal, Tmatrix >::operator=(), mat::MatrixSymmetric< Treal, Tmatrix >::operator=(), mat::MatrixBase< Treal, Tmatrix >::operator==(), mat::MatrixTriangular< Treal, Tmatrix >::random(), mat::MatrixGeneral< Treal, Tmatrix >::random(), mat::MatrixSymmetric< Treal, Tmatrix >::random(), mat::MatrixGeneral< Treal, Tmatrix >::randomZeroStructure(), mat::MatrixSymmetric< Treal, Tmatrix >::randomZeroStructure(), mat::MatrixBase< Treal, Tmatrix >::resetSizesAndBlocks(), mat::MatrixTriangular< Treal, Tmatrix >::setElementsByRule(), mat::MatrixGeneral< Treal, Tmatrix >::setElementsByRule(), mat::MatrixSymmetric< Treal, Tmatrix >::setElementsByRule(), mat::MatrixSymmetric< Treal, Tmatrix >::simple_blockwise_frob_thresh(), mat::MatrixBase< Treal, Tmatrix >::trace(), mat::MatrixSymmetric< Treal, Tmatrix >::transfer(), and mat::MatrixBase< Treal, Tmatrix >::write_to_buffer_count().