#include <Array2D.h>
Public Member Functions | |
T * | array () |
Gets a pointer to an array containing the array elements. | |
int | dim1 () const |
Gets the number of elements in the array's first dimension. | |
int | dim2 () const |
Gets the number of elements in the array's second dimension. | |
int | size () const |
Gets the total number of elements in the array. | |
void | allocate (int i, int j) |
Allocates memory for the array. | |
void | deallocate () |
Deallocates memory for the array. | |
void | setupMatrixMultiply (const Array2D< T > &rhs, Array2D< T > &result, const bool rhsIsTransposed) const |
void | gemm (const Array2D< T > &rhs, Array2D< T > &result, const bool rhsIsTransposed) const |
T | dotAllElectrons (const Array2D< T > &rhs) |
Calculates a dot product between all the elements in one Array2D and all the elements in another Array2D. | |
T | dotOneElectron (const Array2D< T > &rhs, int whichElectron) |
Calculates a dot product between all the elements in one row from one Array2D and one row in another Array2D. | |
void | operator+= (const Array2D< T > &rhs) |
Array2D< T > | operator* (const Array2D< T > &rhs) const |
void | setToIdentity (int i) |
void | setToIdentity () |
bool | isIdentity () |
void | transpose () |
Transpose the matrix. | |
double | nonSymmetry () |
A measurement of how far this matrix is from being symmetric. | |
template<class _RHS> | |
double | compare (const Array2D< _RHS > &rhs, double reallyBad, bool print, bool &same) |
Compare two Array2D objects to see if they're the same. | |
bool | operator== (const Array2D &rhs) |
Checks whether two Array2D objects are the same, to within a certain tolerance, 1e-8. | |
void | operator= (const Array2D &rhs) |
template<class _RHS> | |
void | operator= (const Array2D< _RHS > &rhs) |
Sets two arrays equal. | |
void | operator= (const T C) |
Sets all of the elements in an array equal to the same value. | |
double | addLL () |
Array2D | operator* (const T C) |
Returns the product of an array and a scalar. | |
Array2D< T > | operator- (const Array2D< T > &rhs) const |
Returns the difference between two Array2Ds. | |
Array2D< T > | operator+ (const Array2D< T > &rhs) const |
Returns the sum of two Array2Ds. | |
void | operator*= (const T C) |
Sets this array equal to itself times a scalar value. | |
void | operator/= (const T C) |
Sets this array equal to itself divided by a scalar value. | |
Array2D () | |
Creates an array. | |
Array2D (int i, int j) | |
Creates an array and allocates memory. | |
Array2D (int i, int j, double shift, double range, long &iseed) | |
Create a random matrix. | |
Array2D (const Array2D< T > &rhs) | |
Creates an array and sets it equal to another array. | |
void | setRow (int whichRow, Array1D< T > &rhs) |
This function makes it easy to replace a row with an Array1D. | |
void | setRows (int to, int from, int numRows, const Array2D< T > &rhs) |
This function takes advantage of the row-major format of the matricies to copy numRows worth of data from one Array2D to another. | |
void | swapRows (int i, int j) |
void | setColumn (int to, int from, const Array2D< T > &rhs) |
Copies a column from one Array2D to another. | |
~Array2D () | |
Destroy's the array and cleans up the memory. | |
int | map (int i, int j) const |
This particular choice indicates row-major format. | |
T * | operator[] (int row) |
T & | operator() (int i, int j) |
Accesses element (i,j) of the array. | |
T | get (int i, int j) const |
Accesses element (i,j) of the array, except this prevents modification of that element. | |
double | frobeniusNorm () |
double | pInfNorm () |
double | p1Norm () |
void | printArray2D (ostream &strm, int numSigFig, int columnSpace, int maxJ, char sep, bool sci) const |
This makes it easier to print out the Array2D for input into Mathematica. | |
void | ludcmp (double *d, bool *calcOK) |
LU decomposition using the algorithm in numerical recipes for a dense matrix. | |
void | lubksb (Array1D< T > &b) |
LU backsubstitution using the algorithm in numerical recipes for a dense matrix. | |
void | mprove (const Array2D< T > &A, Array2D< T > &inv) |
This method is supposed to improve the numerical precision of the inverse. | |
void | determinant_and_inverse (Array2D< T > &inv, double &det, bool *calcOK) |
Calculates the inverse and determinant of a matrix using a dense LU solver. | |
template<class _RHS> | |
double | inverseUpdateOneRow (int row, Array2D< _RHS > &newD, int rowInD) |
template<class _RHS> | |
double | inverseUpdateOneColumn (int column, Array2D< _RHS > &newD, int columnInD) |
void | rref () |
Interpret this Array2D has a system of equations, and by using elementary row operations, convert it to its row reduced echelon form. | |
void | rref (int t) |
Interpret this Array2D as a system of equations, and solve for one variable (column index). | |
int | numDependent () |
int | isDependent (int column) |
int | constraintUsed (int r) |
This function is useful in conjunction with rref(int). | |
void | generalizedEigenvectors (Array2D< double > A, Array2D< double > B, Array1D< Complex > &eigval) |
Solves: A x = lambda B x. | |
Array1D< double > | eigenvaluesRS () |
Find the eigenvalues for a real, symmetric matrix. | |
Private Attributes | |
int | n_1 |
Number of elements in the array's first dimension. | |
int | n_2 |
Number of elements in the array's second dimension. | |
T * | pArray |
Array containing the data. | |
Array1D< T > | diCol |
These three arrays are used in the determinant/inverse calculations. | |
Array1D< int > | diINDX |
Array1D< T > | diVV |
Friends | |
ostream & | operator<< (ostream &strm, const Array2D< T > &rhs) |
Try to fit as many columns as possible in a width approximately that of a terminal. |
All of the memory allocation and deallocation details are dealt with by the class. Some of the operators require the Array2D to contain doubles or floats.
Definition at line 95 of file Array2D.h.
Array2D< T >::Array2D | ( | int | i, | |
int | j, | |||
double | shift, | |||
double | range, | |||
long & | iseed | |||
) | [inline] |
Create a random matrix.
It uses the UNIX rand function, which will produce a uniform random number, [0,1)
shift | will be added to the random value | |
range | after adding shift, we'll multiply by range | |
iseed | will be used to initialize srand, if iseed > 0 |
T* Array2D< T >::array | ( | ) | [inline] |
Gets a pointer to an array containing the array elements.
The ordering of this array is NOT specified.
Definition at line 129 of file Array2D.h.
Referenced by QMCBasisFunction::basisFunctionsOnGrid(), QMCSlater::calculate_DerivativeRatios(), QMCManager::gatherExtraProperties(), Array2D< QMCProperty >::generalizedEigenvectors(), QMCConfigIO::readCorrelatedSamplingConfiguration(), and QMCConfigIO::writeCorrelatedSamplingConfiguration().
int Array2D< T >::dim1 | ( | ) | const [inline] |
Gets the number of elements in the array's first dimension.
Definition at line 139 of file Array2D.h.
Referenced by _SVDecompose(), _SVDFwBackSubst(), QMCBasisFunction::angularGrid(), Array2D< QMCProperty >::Array2D(), QMCBasisFunction::basisFunctionsOnGrid(), QMCMikesBetterWalkerInitialization::BoundGradOccupations(), QMCPotential_Energy::calc_P_ee(), QMCPotential_Energy::calc_P_en(), QMCPotential_Energy::calc_P_nn(), QMCSlater::calculate_DerivativeRatios(), QMCSCFJastrow::calculate_Modified_Grad_PsiRatio(), QMCWalker::calculateObservables(), QMCWalker::calculateReverseGreensFunctionImportanceSampling(), QMCThreeBodyCorrelationFunctionParameters::checkCuspAndSymmetry(), Array2D< QMCProperty >::compare(), QMCSurfer::equipotentialSurface(), QMCJastrowElectronNuclear::evaluate(), QMCBasisFunction::evaluateBasisFunctions(), QMCMolecule::evaluatePotential(), QMCPotential_Energy::evaluatePsuedoPotential(), QMCMikesBetterWalkerInitialization::FixConstraints(), QMCManager::gatherExtraProperties(), QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix(), QMCWavefunction::getDataForCI(), QMCNuclearForces::getDensities(), QMCMolecule::getGrid(), QMCWavefunction::getNumberOrbitals(), QMCDerivativeProperties::getParameterGradient(), QMCDerivativeProperties::getParameterHamiltonian(), QMCDerivativeProperties::getParameterHessian(), QMCDerivativeProperties::getParameterOverlap(), QMCEigenSearch::getParameters(), QMCNuclearForces::getTemperTerm(), QMCWalker::initialize(), QMCPotential_Energy::initialize(), QMCJastrow::initialize(), QMCWalker::initializePropagation(), QMCAmosBoringWalkerInitialization::initializeWalkerPosition(), QMCSurfer::interparticleDistanceMatrix(), Array2D< QMCProperty >::inverseUpdateOneColumn(), Array2D< QMCProperty >::inverseUpdateOneRow(), Array2D< QMCProperty >::isDependent(), QMCThreeBodyJastrow::jastrowOnGrid(), QMCJastrowElectronNuclear::jastrowOnGrid(), QMCJastrowElectronElectron::jastrowOnGrid(), QMCWavefunction::makeCoefficients(), QMCPropertyArrays::matchParametersTo(), QMCWalker::moveElectronsImportanceSampling(), QMCWalker::moveElectronsNoImportanceSampling(), QMCMikesBetterWalkerInitialization::MoveOccupations(), operator<<(), QMCWalker::operator=(), Array2D< QMCProperty >::operator=(), QMCLineSearch::optimize(), QMCNuclearForces::printCubeLengths(), QMCNuclearForces::printPoints(), QMCNuclearForces::randomlyRotate(), QMCConfigIO::readCorrelatedSamplingConfiguration(), QMCWalker::readXML(), QMCElectronNucleusCusp::replaceCusps(), QMCWalker::resetFutureWalking(), QMCSurfer::scanEnergies(), QMCWalker::setR(), Array2D< QMCProperty >::setRows(), Array2D< QMCProperty >::setupMatrixMultiply(), QMCWalker::toXML(), Array2D< QMCProperty >::transpose(), QMCSlater::update_Ds(), QMCThreeBodyJastrow::updateAll(), QMCJastrowElectronElectron::updateAll(), QMCWalkerData::updateDistances(), QMCThreeBodyJastrow::updateOne(), QMCJastrowElectronElectron::updateOne(), QMCNuclearForces::waveMemorization(), QMCConfigIO::writeCorrelatedSamplingConfiguration(), QMCJastrow::~QMCJastrow(), QMCNuclearForces::~QMCNuclearForces(), and QMCWalker::~QMCWalker().
int Array2D< T >::dim2 | ( | ) | const [inline] |
Gets the number of elements in the array's second dimension.
Definition at line 149 of file Array2D.h.
Referenced by _SVDecompose(), _SVDFwBackSubst(), Array2D< QMCProperty >::Array2D(), QMCMikesBetterWalkerInitialization::BoundGradOccupations(), QMCSlater::calculate_DerivativeRatios(), QMCSCFJastrow::calculate_Modified_Grad_PsiRatio(), QMCWalker::calculateObservables(), QMCWalker::calculateReverseGreensFunctionImportanceSampling(), Array2D< QMCProperty >::compare(), QMCMikesBetterWalkerInitialization::FixConstraints(), QMCManager::gatherExtraProperties(), QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix(), QMCWavefunction::getDataForCI(), QMCWavefunction::getNumberOrbitals(), QMCDerivativeProperties::getParameterGradient(), QMCWalker::initialize(), QMCJastrow::initialize(), QMCAmosBoringWalkerInitialization::initializeWalkerPosition(), Array2D< QMCProperty >::inverseUpdateOneColumn(), Array2D< QMCProperty >::inverseUpdateOneRow(), QMCPropertyArrays::matchParametersTo(), QMCWalker::moveElectronsImportanceSampling(), QMCWalker::moveElectronsNoImportanceSampling(), QMCMikesBetterWalkerInitialization::MoveOccupations(), Array2D< QMCProperty >::numDependent(), operator<<(), QMCWalker::operator=(), Array2D< QMCProperty >::operator=(), QMCLineSearch::optimize(), QMCWalker::readXML(), QMCWalker::resetFutureWalking(), QMCWalker::setR(), Array2D< QMCProperty >::setRows(), Array2D< QMCProperty >::setupMatrixMultiply(), QMCWalker::toXML(), Array2D< QMCProperty >::transpose(), QMCSlater::update_Ds(), QMCJastrow::~QMCJastrow(), QMCNuclearForces::~QMCNuclearForces(), and QMCWalker::~QMCWalker().
int Array2D< T >::size | ( | ) | const [inline] |
void Array2D< T >::allocate | ( | int | i, | |
int | j | |||
) | [inline] |
Allocates memory for the array.
i | size of the array's first dimension. | |
j | size of the array's second dimension. |
Definition at line 171 of file Array2D.h.
Referenced by QMCSlater::allocate(), QMCSlater::allocateIteration(), Array2D< QMCProperty >::Array2D(), QMCSlater::calculate_DerivativeRatios(), QMCNuclearForces::calculateNuclearContributions(), Array2D< QMCProperty >::determinant_and_inverse(), QMCPotential_Energy::evaluatePsuedoPotential(), QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix(), Array2D< QMCProperty >::generalizedEigenvectors(), QMCNuclearForces::generateCube(), QMCDerivativeProperties::getParameterHamiltonian(), QMCDerivativeProperties::getParameterHessian(), QMCDerivativeProperties::getParameterOverlap(), QMCWalkerData::initialize(), QMCWalker::initialize(), QMCReadAndEvaluateConfigs::initialize(), QMCNuclearForces::initialize(), QMCJastrow::initialize(), QMCHartreeFock::Initialize(), QMCElectronNucleusCusp::initialize(), QMCDansWalkerInitialization::initializeArrays(), QMCBasisFunction::initializeInterpolations(), CambridgeThreeBodyCorrelationFunction::initializeParameters(), QMCDansWalkerInitialization::initializeWalkerPosition(), QMCWavefunction::makeCoefficients(), QMCThreeBodyCorrelationFunctionParameters::makeParamDepMatrix(), QMCWalker::operator=(), Array2D< QMCProperty >::operator=(), operator>>(), QMCEquilibrationArray::QMCEquilibrationArray(), QMCMolecule::readPsuedoPotential(), Array2D< QMCProperty >::setupMatrixMultiply(), QMCNuclearForces::waveMemorization(), and QMCPropertyArrays::zeroOut().
void Array2D< T >::deallocate | ( | ) | [inline] |
Deallocates memory for the array.
Definition at line 204 of file Array2D.h.
Referenced by Array2D< QMCProperty >::allocate(), QMCNuclearForces::calcCoefficients(), Array2D< QMCProperty >::eigenvaluesRS(), QMCNuclearForces::randomlyRotate(), QMCThreeBodyCorrelationFunctionParameters::read(), Array2D< QMCProperty >::transpose(), QMCSlater::update_Ds(), QMCNuclearForces::waveMemorization(), QMCPropertyArrays::zeroOut(), Array2D< QMCProperty >::~Array2D(), CambridgeThreeBodyCorrelationFunction::~CambridgeThreeBodyCorrelationFunction(), QMCDansWalkerInitialization::~QMCDansWalkerInitialization(), QMCHartreeFock::~QMCHartreeFock(), QMCJastrow::~QMCJastrow(), QMCNuclearForces::~QMCNuclearForces(), QMCPropertyArrays::~QMCPropertyArrays(), QMCSlater::~QMCSlater(), QMCSurfer::~QMCSurfer(), and QMCWalker::~QMCWalker().
void Array2D< T >::gemm | ( | const Array2D< T > & | rhs, | |
Array2D< T > & | result, | |||
const bool | rhsIsTransposed | |||
) | const [inline] |
Definition at line 425 of file Array2D.h.
Referenced by _SVDFwBackSubst(), QMCNuclearForces::calcCoefficients(), QMCPotential_Energy::evaluatePsuedoPotential(), Array2D< QMCProperty >::operator*(), and QMCSlater::update_Ds().
Calculates a dot product between all the elements in one Array2D and all the elements in another Array2D.
Definition at line 510 of file Array2D.h.
Referenced by QMCWalker::calculateObservables().
void Array2D< T >::setToIdentity | ( | int | i | ) | [inline] |
Definition at line 548 of file Array2D.h.
Referenced by QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix(), and QMCLineSearch::optimize().
void Array2D< T >::setToIdentity | ( | ) | [inline] |
bool Array2D< T >::isIdentity | ( | ) | [inline] |
void Array2D< T >::transpose | ( | ) | [inline] |
Transpose the matrix.
Definition at line 580 of file Array2D.h.
Referenced by QMCThreeBodyCorrelationFunctionParameters::checkCuspAndSymmetry().
double Array2D< T >::nonSymmetry | ( | ) | [inline] |
A measurement of how far this matrix is from being symmetric.
A returned value of 0.0 means it is perfectly symmetric.
Definition at line 598 of file Array2D.h.
Referenced by Array2D< QMCProperty >::eigenvaluesRS(), and QMCLineSearch::optimize().
double Array2D< T >::compare | ( | const Array2D< _RHS > & | rhs, | |
double | reallyBad, | |||
bool | print, | |||
bool & | same | |||
) | [inline] |
Compare two Array2D objects to see if they're the same.
reallyBad | is the cutoff at which we'll print out the two values | |
if false, this function will not print anything. |
Definition at line 634 of file Array2D.h.
Referenced by Array2D< QMCProperty >::operator==().
void Array2D< T >::operator= | ( | const T | C | ) | [inline] |
Sets all of the elements in an array equal to the same value.
There's an obvious shortcut if the constant happens to be 0. in retrospect, while memset works well for doubles, floats, etc, using this operator would probably crash the program if T was a class.
void Array2D< T >::operator*= | ( | const T | C | ) | [inline] |
Sets this array equal to itself times a scalar value.
Definition at line 848 of file Array2D.h.
Referenced by Array2D< QMCProperty >::operator/=().
void Array2D< T >::operator/= | ( | const T | C | ) | [inline] |
void Array2D< T >::setRows | ( | int | to, | |
int | from, | |||
int | numRows, | |||
const Array2D< T > & | rhs | |||
) | [inline] |
This function takes advantage of the row-major format of the matricies to copy numRows worth of data from one Array2D to another.
Definition at line 964 of file Array2D.h.
Referenced by QMCWavefunction::makeCoefficients(), Array2D< QMCProperty >::swapRows(), QMCWavefunction::unlinkDeterminants(), QMCWavefunction::unlinkOrbitals(), and QMCSlater::update_Ds().
void Array2D< T >::swapRows | ( | int | i, | |
int | j | |||
) | [inline] |
int Array2D< T >::map | ( | int | i, | |
int | j | |||
) | const [inline] |
This particular choice indicates row-major format.
Definition at line 1019 of file Array2D.h.
Referenced by QMCSlater::calculate_DerivativeRatios(), Array2D< QMCProperty >::constraintUsed(), Array2D< QMCProperty >::get(), Array2D< QMCProperty >::inverseUpdateOneColumn(), Array2D< QMCProperty >::inverseUpdateOneRow(), Array2D< QMCProperty >::isDependent(), Array2D< QMCProperty >::ludcmp(), Array2D< QMCProperty >::operator()(), Array2D< QMCProperty >::operator=(), Array2D< QMCProperty >::printArray2D(), Array2D< QMCProperty >::rref(), and Array2D< QMCProperty >::setColumn().
T* Array2D< T >::operator[] | ( | int | row | ) | [inline] |
T& Array2D< T >::operator() | ( | int | i, | |
int | j | |||
) | [inline] |
T Array2D< T >::get | ( | int | i, | |
int | j | |||
) | const [inline] |
Accesses element (i,j)
of the array, except this prevents modification of that element.
Definition at line 1081 of file Array2D.h.
Referenced by _SVDFwBackSubst(), QMCSlater::calculate_DerivativeRatios(), QMCSCFJastrow::calculate_OrbitalDerivatives(), Array2D< QMCProperty >::compare(), QMCWavefunction::getDataForCI(), Array2D< QMCProperty >::inverseUpdateOneColumn(), Array2D< QMCProperty >::inverseUpdateOneRow(), Array2D< QMCProperty >::mprove(), QMCWalker::operator=(), Array2D< QMCProperty >::operator=(), and QMCThreeBodyCorrelationFunctionParameters::totalDerivativesToFree().
double Array2D< T >::frobeniusNorm | ( | ) | [inline] |
double Array2D< T >::pInfNorm | ( | ) | [inline] |
double Array2D< T >::p1Norm | ( | ) | [inline] |
void Array2D< T >::printArray2D | ( | ostream & | strm, | |
int | numSigFig, | |||
int | columnSpace, | |||
int | maxJ, | |||
char | sep, | |||
bool | sci | |||
) | const [inline] |
This makes it easier to print out the Array2D for input into Mathematica.
In Mathematica, you will still have to replace all the scientific notational "e" with "*^".
Definition at line 1164 of file Array2D.h.
Referenced by QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix(), QMCEigenSearch::getParameters(), and QMCLineSearch::optimize().
void Array2D< T >::ludcmp | ( | double * | d, | |
bool * | calcOK | |||
) | [inline] |
LU decomposition using the algorithm in numerical recipes for a dense matrix.
a | a matrix which is destroyed during the operation. The resulting LU decompositon is placed here. | |
indx | a dimensional array which records the row permutation from partial pivoting. | |
d | used to give det(a) the correct sign | |
calcOK | returns false if the calculation is singular and true otherwise |
Definition at line 1204 of file Array2D.h.
Referenced by Array2D< QMCProperty >::determinant_and_inverse().
LU backsubstitution using the algorithm in numerical recipes for a dense matrix.
a | the LU decomposition of a matrix produced by ludcmp | |
indx | a dimensional array which records the row permutation from partial pivoting generated by ludcmp | |
b | the dimensional array right hand side of the system of equations to solve |
Definition at line 1352 of file Array2D.h.
Referenced by Array2D< QMCProperty >::determinant_and_inverse(), and Array2D< QMCProperty >::mprove().
void Array2D< T >::determinant_and_inverse | ( | Array2D< T > & | inv, | |
double & | det, | |||
bool * | calcOK | |||
) | [inline] |
Calculates the inverse and determinant of a matrix using a dense LU solver.
This method scales as .
a | a matrix | |
inv | inverse of a is returned here | |
det | determinant of a is returned here | |
calcOK | returns false if the calculation is singular and true otherwise this is O(1*N^3) I originally had several of the arrays here as function-static variables, but this was causing the program to randomly crash in other parts of the code. I don't know why. |
Definition at line 1521 of file Array2D.h.
Referenced by QMCNuclearForces::calcCoefficients(), QMCSlater::calculate_DerivativeRatios(), and QMCLineSearch::optimize().
void Array2D< T >::rref | ( | ) | [inline] |
Interpret this Array2D has a system of equations, and by using elementary row operations, convert it to its row reduced echelon form.
If rank(n_1) = n_2, then this should produce the identity matrix.
If rank(n_1) > n_2, then you'll get row(s) of zeros since the system is overdetermined.
If rank(n_1) < n_2, then you'll get an identity matrix the size of rank(n_1), and columns containing data for the remaining unconstrained variables.
Note: this function does not have the same improvements that rref(int) has.
Definition at line 1690 of file Array2D.h.
Referenced by QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix().
void Array2D< T >::rref | ( | int | t | ) | [inline] |
Interpret this Array2D as a system of equations, and solve for one variable (column index).
This will turn the column into all 0.0 and one 1.0, causing this variable to be entirely dependend upon the other variables.
We can eliminate at most as many independent variables as the rank of the matrix, rank(n_1) <= n_1. If you solve for more, then the code will arbitrarily choose others to "unsolve".
Note, this will replace column t with 0.0s and one 1.0. The position of the 1.0 is arbitrary.
t | the variable to make completely dependent |
int Array2D< T >::numDependent | ( | ) | [inline] |
Definition at line 1910 of file Array2D.h.
Referenced by QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix().
int Array2D< T >::isDependent | ( | int | column | ) | [inline] |
Definition at line 1925 of file Array2D.h.
Referenced by QMCThreeBodyCorrelationFunctionParameters::checkCuspAndSymmetry(), Array2D< QMCProperty >::constraintUsed(), QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix(), Array2D< QMCProperty >::numDependent(), and Array2D< QMCProperty >::rref().
int Array2D< T >::constraintUsed | ( | int | r | ) | [inline] |
This function is useful in conjunction with rref(int).
It will determine whether a particular row (interpreted as a constraint) has been used to make a variable dependent. If it has, then it will return the index of the dependent variable that uses this constraint.
Definition at line 1956 of file Array2D.h.
Referenced by QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix(), and Array2D< QMCProperty >::rref().
void Array2D< T >::generalizedEigenvectors | ( | Array2D< double > | A, | |
Array2D< double > | B, | |||
Array1D< Complex > & | eigval | |||
) | [inline] |
Solves: A x = lambda B x.
Where lambda is the eigenvalue that corresponds to the (right-side) eigenvector x.
The eigenvectors are stored as rows in this->pArray
Notice: A and B are over written.
Definition at line 1976 of file Array2D.h.
Referenced by QMCEigenSearch::getParameters().
Find the eigenvalues for a real, symmetric matrix.
I found this routine at: http://www3.telus.net/thothworks/EigRSvaloCPP0.html
Definition at line 2044 of file Array2D.h.
Referenced by QMCLineSearch::optimize().
ostream& operator<< | ( | ostream & | strm, | |
const Array2D< T > & | rhs | |||
) | [friend] |
Number of elements in the array's first dimension.
Definition at line 102 of file Array2D.h.
Referenced by Array2D< QMCProperty >::addLL(), Array2D< QMCProperty >::allocate(), Array2D< QMCProperty >::Array2D(), Array2D< QMCProperty >::compare(), Array2D< QMCProperty >::deallocate(), Array2D< QMCProperty >::dim1(), Array2D< QMCProperty >::dotAllElectrons(), Array2D< QMCProperty >::dotOneElectron(), Array2D< QMCProperty >::frobeniusNorm(), Array2D< QMCProperty >::gemm(), Array2D< QMCProperty >::generalizedEigenvectors(), Array2D< QMCProperty >::get(), Array2D< QMCProperty >::isIdentity(), Array2D< QMCProperty >::lubksb(), Array2D< QMCProperty >::ludcmp(), Array2D< QMCProperty >::map(), Array2D< QMCProperty >::mprove(), Array2D< QMCProperty >::nonSymmetry(), Array2D< QMCProperty >::operator()(), Array2D< QMCProperty >::operator*(), Array2D< QMCProperty >::operator*=(), Array2D< QMCProperty >::operator+(), Array2D< QMCProperty >::operator+=(), Array2D< QMCProperty >::operator-(), Array2D< QMCProperty >::operator/=(), Array2D< QMCProperty >::operator=(), Array2D< QMCProperty >::operator[](), Array2D< QMCProperty >::p1Norm(), Array2D< QMCProperty >::pInfNorm(), Array2D< QMCProperty >::printArray2D(), Array2D< QMCProperty >::setColumn(), Array2D< QMCProperty >::setRow(), Array2D< QMCProperty >::setRows(), Array2D< QMCProperty >::setToIdentity(), Array2D< QMCProperty >::setupMatrixMultiply(), Array2D< QMCProperty >::size(), and Array2D< QMCProperty >::transpose().
Number of elements in the array's second dimension.
Definition at line 109 of file Array2D.h.
Referenced by Array2D< QMCProperty >::addLL(), Array2D< QMCProperty >::allocate(), Array2D< QMCProperty >::Array2D(), Array2D< QMCProperty >::compare(), Array2D< QMCProperty >::constraintUsed(), Array2D< QMCProperty >::deallocate(), Array2D< QMCProperty >::dim2(), Array2D< QMCProperty >::dotAllElectrons(), Array2D< QMCProperty >::dotOneElectron(), Array2D< QMCProperty >::eigenvaluesRS(), Array2D< QMCProperty >::frobeniusNorm(), Array2D< QMCProperty >::gemm(), Array2D< QMCProperty >::get(), Array2D< QMCProperty >::inverseUpdateOneColumn(), Array2D< QMCProperty >::inverseUpdateOneRow(), Array2D< QMCProperty >::isIdentity(), Array2D< QMCProperty >::map(), Array2D< QMCProperty >::mprove(), Array2D< QMCProperty >::nonSymmetry(), Array2D< QMCProperty >::operator()(), Array2D< QMCProperty >::operator*(), Array2D< QMCProperty >::operator*=(), Array2D< QMCProperty >::operator+(), Array2D< QMCProperty >::operator+=(), Array2D< QMCProperty >::operator-(), Array2D< QMCProperty >::operator/=(), Array2D< QMCProperty >::operator=(), Array2D< QMCProperty >::operator[](), Array2D< QMCProperty >::p1Norm(), Array2D< QMCProperty >::pInfNorm(), Array2D< QMCProperty >::printArray2D(), Array2D< QMCProperty >::rref(), Array2D< QMCProperty >::setRow(), Array2D< QMCProperty >::setRows(), Array2D< QMCProperty >::setToIdentity(), Array2D< QMCProperty >::setupMatrixMultiply(), Array2D< QMCProperty >::size(), and Array2D< QMCProperty >::transpose().
Array containing the data.
Definition at line 114 of file Array2D.h.
Referenced by Array2D< QMCProperty >::addLL(), Array2D< QMCProperty >::allocate(), Array2D< QMCProperty >::array(), Array2D< QMCProperty >::Array2D(), Array2D< QMCProperty >::deallocate(), Array2D< QMCProperty >::dotAllElectrons(), Array2D< QMCProperty >::dotOneElectron(), Array2D< QMCProperty >::frobeniusNorm(), Array2D< QMCProperty >::gemm(), Array2D< QMCProperty >::get(), Array2D< QMCProperty >::ludcmp(), Array2D< QMCProperty >::map(), Array2D< QMCProperty >::operator()(), Array2D< QMCProperty >::operator*(), Array2D< QMCProperty >::operator*=(), Array2D< QMCProperty >::operator+(), Array2D< QMCProperty >::operator+=(), Array2D< QMCProperty >::operator-(), Array2D< QMCProperty >::operator=(), Array2D< QMCProperty >::operator[](), Array2D< QMCProperty >::printArray2D(), Array2D< QMCProperty >::setColumn(), Array2D< QMCProperty >::setRow(), and Array2D< QMCProperty >::setRows().
These three arrays are used in the determinant/inverse calculations.
Definition at line 120 of file Array2D.h.
Referenced by Array2D< QMCProperty >::deallocate(), and Array2D< QMCProperty >::determinant_and_inverse().
Definition at line 121 of file Array2D.h.
Referenced by Array2D< QMCProperty >::deallocate(), Array2D< QMCProperty >::determinant_and_inverse(), Array2D< QMCProperty >::lubksb(), and Array2D< QMCProperty >::ludcmp().
Definition at line 122 of file Array2D.h.
Referenced by Array2D< QMCProperty >::deallocate(), and Array2D< QMCProperty >::ludcmp().