ergo
|
#include <VectorGeneral.h>
Public Member Functions | |
void | resetSizesAndBlocks (SizesAndBlocks const &newRows) |
bool | is_empty () const |
void | clear_structure () |
VectorGeneral (SizesAndBlocks const &newRows) | |
VectorGeneral () | |
VectorGeneral (const VectorGeneral< Treal, Tvector > &other) | |
void | assign_from_full (std::vector< Treal > const &fullVector, SizesAndBlocks const &newRows) |
void | fullvector (std::vector< Treal > &fullVector) const |
VectorGeneral< Treal, Tvector > & | operator= (const VectorGeneral< Treal, Tvector > &other) |
void | clear () |
Release memory for the information written to file. | |
void | rand () |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator= (const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > &smv) |
y = alpha * op(A) * x | |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator+= (const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > &smv) |
y += alpha * op(A) * x | |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator= (const XYZpUV< Treal, MatrixGeneral< Treal, Tmatrix >, VectorGeneral< Treal, Tvector >, Treal, VectorGeneral< Treal, Tvector > > &smvpsv) |
y = alpha * op(A) * x + beta * y | |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator= (const XY< MatrixGeneral< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > &mv) |
y = op(A) * x : A is general | |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator= (const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > &smv) |
y = alpha * A * x : A is symmetric | |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator+= (const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > &smv) |
y += alpha * A * x : A is symmetric | |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator= (const XYZpUV< Treal, MatrixSymmetric< Treal, Tmatrix >, VectorGeneral< Treal, Tvector >, Treal, VectorGeneral< Treal, Tvector > > &smvpsv) |
y = alpha * A * x + beta * y : A is symmetric | |
template<typename Tmatrix > | |
VectorGeneral< Treal, Tvector > & | operator= (const XY< MatrixTriangular< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > &mv) |
y = op(A) * x : A is triangular | |
Treal | eucl () const |
VectorGeneral< Treal, Tvector > & | operator*= (Treal const alpha) |
VectorGeneral< Treal, Tvector > & | operator= (int const k) |
VectorGeneral< Treal, Tvector > & | operator+= (const XY< Treal, VectorGeneral< Treal, Tvector > > &sv) |
y += alpha * x | |
Tvector const & | getVector () const |
std::string | obj_type_id () const |
![]() | |
void | writeToFile () |
Write object to file if filewrite is active. | |
void | readFromFile () |
Read object from file if filewrite is active. | |
void | copyToFile (const char *destFileName) |
void | copyFromFile (const char *sourceFileName) |
bool | isOnFile () |
Check if object is on file. | |
long int | fileSize () |
Return file size. | |
Protected Member Functions | |
void | writeToFileProt (std::ofstream &file) const |
Write object to file. | |
void | readFromFileProt (std::ifstream &file) |
Read object from file. | |
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. | |
![]() | |
virtual void | clear ()=0 |
Release memory for the information written to file. | |
virtual void | inMemorySet (bool)=0 |
Make object invalid (false) via this function when object is written to file and valid (true) when object is read from file. | |
virtual void | writeToFileProt (std::ofstream &) const =0 |
Write object to file. | |
virtual void | readFromFileProt (std::ifstream &)=0 |
Read object from file. | |
FileWritable () | |
Gives each object a unique ID-number and filename. | |
virtual | ~FileWritable () |
Removes file, if any. | |
FileWritable (FileWritable const &) | |
FileWritable & | operator= (FileWritable const &) |
virtual std::string | obj_type_id () const =0 |
Protected Attributes | |
ValidPtr< Tvector > | vectorPtr |
Additional Inherited Members | |
![]() | |
static void | setPath (char const *const newPath) |
Set the path to which the objects will be written. | |
static void | activate () |
Activate the filewriting. | |
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 () |
![]() | |
typedef std::map< std::string, double > | TypeTimeMap |
typedef std::map< std::string, int > | TypeCountMap |
typedef std::set< FileWritable * > | ObjPtrSet |
![]() | |
static std::string | getStatsTime (TypeTimeMap &theMap) |
static std::string | getStatsCount (TypeCountMap &theMap) |
static std::string | getStatsFileSizes (ObjPtrSet const &set) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Release memory for the information written to file.
Implements mat::FileWritable.
References mat::VectorGeneral< Treal, Tvector >::is_empty(), and mat::VectorGeneral< Treal, Tvector >::vectorPtr.
|
inline |
|
inline |
References mat::VectorGeneral< Treal, Tvector >::vectorPtr.
Referenced by eigvec::compute_rayleigh_quotient(), eigvec::lanczos_method(), main(), mainFun(), and eigvec::power_method().
|
inline |
References mat::VectorGeneral< Treal, Tvector >::vectorPtr.
Referenced by SCF_restricted::create_eigvec_file(), SCF_unrestricted::create_eigvec_file(), SCF_restricted::get_expected_values_pos_operator(), main(), mainFun(), SCF_restricted::output_density_images_orbital(), PurificationGeneral< MatrixType >::save_selected_eigenvector_to_file(), and test1().
|
inline |
References mat::VectorGeneral< Treal, Tvector >::vectorPtr.
Referenced by mat::operator*().
|
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::VectorGeneral< Treal, Tvector >::vectorPtr.
|
inline |
References mat::ValidPtr< Tobj >::haveDataStructureGet(), and mat::VectorGeneral< Treal, Tvector >::vectorPtr.
Referenced by mat::VectorGeneral< Treal, Tvector >::clear(), GetDensFromFock::create_checkpoint(), SCF_restricted::create_eigvec_file(), SCF_unrestricted::create_eigvec_file(), SCF_restricted::get_expected_values_pos_operator(), SCF_restricted::output_density_images_orbital(), mat::VectorGeneral< Treal, Tvector >::readFromFileProt(), test1(), and mat::VectorGeneral< Treal, Tvector >::writeToFileProt().
|
inlinevirtual |
Implements mat::FileWritable.
|
inline |
References mat::VectorGeneral< Treal, Tvector >::vectorPtr.
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator+= | ( | const XY< Treal, VectorGeneral< Treal, Tvector > > & | sv | ) |
y += alpha * x
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator+= | ( | const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > & | smv | ) |
y += alpha * op(A) * x
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator+= | ( | const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > & | smv | ) |
y += alpha * A * x : A is symmetric
|
inline |
|
inline |
y = op(A) * x : A is general
References mat::VectorGeneral< Treal, Tvector >::operator=().
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator= | ( | const XY< MatrixTriangular< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > & | mv | ) |
y = op(A) * x : A is triangular
x = op(A) * x : A is triangular
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator= | ( | const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > & | smv | ) |
y = alpha * op(A) * x
References mat::VectorGeneral< Treal, Tvector >::vectorPtr.
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator= | ( | const XYZ< Treal, MatrixSymmetric< Treal, Tmatrix >, VectorGeneral< Treal, Tvector > > & | smv | ) |
y = alpha * A * x : A is symmetric
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator= | ( | const XYZpUV< Treal, MatrixGeneral< Treal, Tmatrix >, VectorGeneral< Treal, Tvector >, Treal, VectorGeneral< Treal, Tvector > > & | smvpsv | ) |
y = alpha * op(A) * x + beta * y
VectorGeneral< Treal, Tvector > & mat::VectorGeneral< Treal, Tvector >::operator= | ( | const XYZpUV< Treal, MatrixSymmetric< Treal, Tmatrix >, VectorGeneral< Treal, Tvector >, Treal, VectorGeneral< Treal, Tvector > > & | smvpsv | ) |
y = alpha * A * x + beta * y : A is symmetric
|
inline |
References mat::VectorGeneral< Treal, Tvector >::vectorPtr.
|
inline |
|
inlineprotectedvirtual |
Read object from file.
Defined in derived class.
Implements mat::FileWritable.
References mat::VectorGeneral< Treal, Tvector >::is_empty(), and mat::VectorGeneral< Treal, Tvector >::vectorPtr.
|
inline |
References mat::ValidPtr< Tobj >::haveDataStructureSet(), and mat::VectorGeneral< Treal, Tvector >::vectorPtr.
Referenced by mat::VectorGeneral< Treal, Tvector >::assign_from_full(), mat::MatrixGeneral< Treal, Tmatrix >::eucl(), mat::MatrixSymmetric< Treal, Tmatrix >::eucl(), mat::MatrixTriangular< Treal, Tmatrix >::eucl(), main(), mainFun(), GetDensFromFock::restore_from_checkpoint(), and mat::VectorGeneral< Treal, Tvector >::VectorGeneral().
|
inlineprotectedvirtual |
Write object to file.
Defined in derived class.
Implements mat::FileWritable.
References mat::VectorGeneral< Treal, Tvector >::is_empty(), and mat::VectorGeneral< Treal, Tvector >::vectorPtr.
|
protected |
Referenced by mat::VectorGeneral< Treal, Tvector >::assign_from_full(), mat::VectorGeneral< Treal, Tvector >::clear(), mat::VectorGeneral< Treal, Tvector >::clear_structure(), mat::VectorGeneral< Treal, Tvector >::eucl(), mat::VectorGeneral< Treal, Tvector >::fullvector(), mat::VectorGeneral< Treal, Tvector >::getVector(), mat::VectorGeneral< Treal, Tvector >::inMemorySet(), mat::VectorGeneral< Treal, Tvector >::is_empty(), mat::VectorGeneral< Treal, Tvector >::operator*=(), mat::VectorGeneral< Treal, Tvector >::operator=(), mat::VectorGeneral< Treal, Tvector >::rand(), mat::VectorGeneral< Treal, Tvector >::readFromFileProt(), mat::VectorGeneral< Treal, Tvector >::resetSizesAndBlocks(), mat::VectorGeneral< Treal, Tvector >::VectorGeneral(), and mat::VectorGeneral< Treal, Tvector >::writeToFileProt().