#include <PuriStepInfo.h>
Inheritance diagram for mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >:
Public Member Functions | |
PuriStepInfo (int nn=-1, int noc=-1, Treal eigvalConvCrit=0.0) | |
~PuriStepInfo () | |
bool | converged () const |
void | setChosenThresh (Treal const thr) |
Treal | getChosenThresh () const |
void | setActualThresh (Treal const thr) |
Treal | getActualThresh () const |
void | setEstimatedStepsLeft (int const stepsleft) |
int | getEstimatedStepsLeft () const |
void | setTraceX (Treal const trX) |
void | setTraceX2 (Treal const trX2) |
Treal | getTraceX () const |
Treal | getTraceX2 () const |
void | setPoly () |
int | getPoly () const |
void | setXmX2EuclNorm (Interval< Treal > const XmX2eucl) |
Sets XmX2EuclNorm bounds. | |
Interval< Treal > | getXmX2EuclNorm () const |
void | setEigVecPtr (Tvector *eigVecPtr_) |
Improves homo and lumo bounds if the new ones are better. | |
Tvector const *const | getEigVecPtr () const |
void | improveHomoLumo (Interval< Treal > const homoInt, Interval< Treal > const lumoInt) |
Interval< Treal > const & | getHomo () const |
Interval< Treal > const & | getLumo () const |
Interval< Treal > const & | getEigInterval () const |
void | exchangeInfoWithNext (PuriStepInfo< Treal, Tvector, TdebugPolicy > &next) |
void | setCorrectOccupation () |
Set correct occ. | |
int | getCorrectOccupation () const |
Treal | subspaceError () const |
void | improveEigInterval (Interval< Treal > const eInt) |
Improve eigenvalue bounds and delta if possible. | |
void | setNnzX (size_t const nzX) |
size_t | getNnzX () const |
void | setNnzX2 (size_t const nzX2) |
size_t | getNnzX2 () const |
void | computeEigAccLoss () |
Computes a probable upper bound of the accuracy that is lost in the eigenvalues of X * X because of limited relative precision in the storage of X. | |
Treal | getEigAccLoss () const |
Treal | getN0 () const |
Treal | getN1 () const |
Treal | getDelta () const |
void | checkIntervals (const char *descriptionString) const |
template<typename Tmatrix> | |
void | computeExactValues (Tmatrix const &X, Tmatrix const &X2) |
void | setMemUsageBeforeTrunc () |
void | setMemUsageInXmX2Diff (MemUsage::Values &memUsage) |
void | setTimeThresh (float t) |
void | setTimeSquare (float t) |
void | setTimeXmX2Norm (float t) |
void | setTimeTotal (float t) |
void | setTimeXX2Write (float t) |
void | setTimeXX2Read (float t) |
MemUsage::Values | getMemUsageBeforeTrunc () |
MemUsage::Values | getMemUsageInXmX2Diff () |
float | getTimeThresh () |
float | getTimeSquare () |
float | getTimeXmX2Norm () |
float | getTimeTotal () |
float | getTimeXX2Write () |
float | getTimeXX2Read () |
bool | homoIsAccuratelyKnown (Treal accuracyLimit) const |
bool | lumoIsAccuratelyKnown (Treal accuracyLimit) const |
bool | getLumoWasComputed () |
bool | getHomoWasComputed () |
Protected Member Functions | |
void | computen0n1 () |
Compute n0 and n1 Called by improveEigInterval. | |
Protected Attributes | |
int | n |
System size. | |
int | nocc |
Number of occupied orbitals. | |
Treal | traceX |
Trace of the matrix X. | |
Treal | traceX2 |
Trace of the squared matrix X^2. | |
int | poly |
Choice of polynomial 0 for x^2 and 1 for 2 * x - x^2. | |
Treal | chosenThresh |
Chosen threshold value applied before step. | |
Treal | actualThresh |
Actual threshold value applied before step. | |
int | estimatedStepsLeft |
Estimated steps left in purification. | |
Interval< Treal > | eigInterval |
Interval containing the eigenvalue spectrum. | |
Treal | delta |
Largest possible deviation from the [0 1] interval. | |
int | correctOccupation |
Takes the values: 1 meaning all eigenvalues supposed to go to 1 are larger than 0.5 and all eigenvalues supposed to go to 0 are smaller than 0.5 for sure. | |
Interval< Treal > | XmX2EuclNorm |
Interval containing the euclidean norm ||X-X^2||_2 before step. | |
Tvector * | eigVecPtr |
Eigenvector possibly containing the homo or lumo eigenvector. | |
bool | lumoWasComputed |
Flag indicating if lumo was computed. | |
bool | homoWasComputed |
Flag indicating if homo was computed. | |
Treal | n0 |
Lower bound on the number of eigenvalues in [lambdaMin, 0.5]. | |
Treal | n1 |
Lower bound on the number of eigenvalues in [0.5, 1 + delta]. | |
Interval< Treal > | homo |
Interval containing the homo eigenvalue. | |
Interval< Treal > | lumo |
Interval containing the lumo eigenvalue. | |
Treal | eigConvCrit |
Tolerated deviation from 0 and 1 of converged eigenvalues. | |
size_t | nnzX |
Number of nonzeros in the matrix X. | |
size_t | nnzX2 |
Number of nonzeros in the matrix X2. | |
Treal | eigAccLoss |
A probable upper bound of the accuracy that is lost in the eigenvalues of X * X because of limited relative precision in the storage of X. | |
MemUsage::Values | memUsageBeforeTrunc |
MemUsage::Values | memUsageInXmX2Diff |
float | timeThresh |
float | timeSquare |
float | timeXmX2Norm |
float | timeTotal |
float | timeXX2Write |
float | timeXX2Read |
All info is for the truncated matrix in the current step. We use inheritance for test class so that empty base class optimization can be used in case of an empty test class.
mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::PuriStepInfo | ( | int | nn = -1 , |
|
int | noc = -1 , |
|||
Treal | eigvalConvCrit = 0.0 | |||
) | [inline, explicit] |
mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::~PuriStepInfo | ( | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::checkIntervals | ( | const char * | descriptionString | ) | const [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::computeEigAccLoss | ( | ) |
Computes a probable upper bound of the accuracy that is lost in the eigenvalues of X * X because of limited relative precision in the storage of X.
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::computeExactValues | ( | Tmatrix const & | X, | |
Tmatrix const & | X2 | |||
) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::computen0n1 | ( | ) | [protected] |
Compute n0 and n1 Called by improveEigInterval.
bool mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::converged | ( | ) | const [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::exchangeInfoWithNext | ( | PuriStepInfo< Treal, Tvector, TdebugPolicy > & | next | ) |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getActualThresh | ( | ) | const [inline] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getChosenThresh | ( | ) | const [inline] |
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getCorrectOccupation | ( | ) | const [inline] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getDelta | ( | ) | const [inline] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getEigAccLoss | ( | ) | const [inline] |
Interval<Treal> const& mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getEigInterval | ( | ) | const [inline] |
Tvector const* const mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getEigVecPtr | ( | ) | const [inline] |
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getEstimatedStepsLeft | ( | ) | const [inline] |
Interval<Treal> const& mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getHomo | ( | ) | const [inline] |
bool mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getHomoWasComputed | ( | ) | [inline] |
Interval<Treal> const& mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getLumo | ( | ) | const [inline] |
bool mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getLumoWasComputed | ( | ) | [inline] |
MemUsage::Values mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getMemUsageBeforeTrunc | ( | ) | [inline] |
MemUsage::Values mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getMemUsageInXmX2Diff | ( | ) | [inline] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getN0 | ( | ) | const [inline] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getN1 | ( | ) | const [inline] |
size_t mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getNnzX | ( | ) | const [inline] |
size_t mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getNnzX2 | ( | ) | const [inline] |
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getPoly | ( | ) | const [inline] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTimeSquare | ( | ) | [inline] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTimeThresh | ( | ) | [inline] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTimeTotal | ( | ) | [inline] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTimeXmX2Norm | ( | ) | [inline] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTimeXX2Read | ( | ) | [inline] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTimeXX2Write | ( | ) | [inline] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTraceX | ( | ) | const [inline] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getTraceX2 | ( | ) | const [inline] |
Interval<Treal> mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::getXmX2EuclNorm | ( | ) | const [inline] |
bool mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::homoIsAccuratelyKnown | ( | Treal | accuracyLimit | ) | const [inline] |
accuracyLimit | HOMO estimation is considered to be accurate if the error is smaller than this value. |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::improveEigInterval | ( | Interval< Treal > const | eInt | ) |
Improve eigenvalue bounds and delta if possible.
Returns delta.
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::improveHomoLumo | ( | Interval< Treal > const | homoInt, | |
Interval< Treal > const | lumoInt | |||
) |
bool mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::lumoIsAccuratelyKnown | ( | Treal | accuracyLimit | ) | const [inline] |
accuracyLimit | LUMO estimation is considered to be accurate if the error is smaller than this value. |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setActualThresh | ( | Treal const | thr | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setChosenThresh | ( | Treal const | thr | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setCorrectOccupation | ( | ) | [inline] |
Set correct occ.
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setEigVecPtr | ( | Tvector * | eigVecPtr_ | ) | [inline] |
Improves homo and lumo bounds if the new ones are better.
Uses XmX2EuclNorm if possible.
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setEstimatedStepsLeft | ( | int const | stepsleft | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setMemUsageBeforeTrunc | ( | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setMemUsageInXmX2Diff | ( | MemUsage::Values & | memUsage | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setNnzX | ( | size_t const | nzX | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setNnzX2 | ( | size_t const | nzX2 | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setPoly | ( | ) |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTimeSquare | ( | float | t | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTimeThresh | ( | float | t | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTimeTotal | ( | float | t | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTimeXmX2Norm | ( | float | t | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTimeXX2Read | ( | float | t | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTimeXX2Write | ( | float | t | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTraceX | ( | Treal const | trX | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setTraceX2 | ( | Treal const | trX2 | ) | [inline] |
void mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::setXmX2EuclNorm | ( | Interval< Treal > const | XmX2eucl | ) | [inline] |
Sets XmX2EuclNorm bounds.
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::subspaceError | ( | ) | const |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::actualThresh [protected] |
Actual threshold value applied before step.
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::chosenThresh [protected] |
Chosen threshold value applied before step.
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::correctOccupation [protected] |
Takes the values: 1 meaning all eigenvalues supposed to go to 1 are larger than 0.5 and all eigenvalues supposed to go to 0 are smaller than 0.5 for sure.
0 otherwise
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::delta [protected] |
Largest possible deviation from the [0 1] interval.
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::eigAccLoss [protected] |
A probable upper bound of the accuracy that is lost in the eigenvalues of X * X because of limited relative precision in the storage of X.
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::eigConvCrit [protected] |
Tolerated deviation from 0 and 1 of converged eigenvalues.
Interval<Treal> mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::eigInterval [protected] |
Interval containing the eigenvalue spectrum.
Tvector* mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::eigVecPtr [protected] |
Eigenvector possibly containing the homo or lumo eigenvector.
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::estimatedStepsLeft [protected] |
Estimated steps left in purification.
Used to chose threshold. -1 indicates no estimation possible.
Interval<Treal> mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::homo [protected] |
Interval containing the homo eigenvalue.
bool mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::homoWasComputed [protected] |
Flag indicating if homo was computed.
Interval<Treal> mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::lumo [protected] |
Interval containing the lumo eigenvalue.
bool mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::lumoWasComputed [protected] |
Flag indicating if lumo was computed.
(Eigenvector exists.)
MemUsage::Values mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::memUsageBeforeTrunc [protected] |
MemUsage::Values mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::memUsageInXmX2Diff [protected] |
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::n [protected] |
System size.
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::n0 [protected] |
Lower bound on the number of eigenvalues in [lambdaMin, 0.5].
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::n1 [protected] |
Lower bound on the number of eigenvalues in [0.5, 1 + delta].
size_t mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::nnzX [protected] |
Number of nonzeros in the matrix X.
size_t mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::nnzX2 [protected] |
Number of nonzeros in the matrix X2.
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::nocc [protected] |
Number of occupied orbitals.
int mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::poly [protected] |
Choice of polynomial 0 for x^2 and 1 for 2 * x - x^2.
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::timeSquare [protected] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::timeThresh [protected] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::timeTotal [protected] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::timeXmX2Norm [protected] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::timeXX2Read [protected] |
float mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::timeXX2Write [protected] |
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::traceX [protected] |
Trace of the matrix X.
Treal mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::traceX2 [protected] |
Trace of the squared matrix X^2.
Interval<Treal> mat::PuriStepInfo< Treal, Tvector, TdebugPolicy >::XmX2EuclNorm [protected] |
Interval containing the euclidean norm ||X-X^2||_2 before step.