MFsym_eigenvalues
| MDsym_eigenvalues |
MEsym_eigenvalues |
|
Function | Eigenvalues and/or Eigenvectors of a real symmetric matrix |
|
Syntax C/C++ | #include <MFstd.h>
int MFsym_eigenvalues( fVector EigVals, fMatrix EigVecs, fMatrix MA, ui len, int CalcEigenVec ); |
C++ MatObj | #include <OptiVec.h>
int matrix<T>::sym_eigenvalues( matrix<T> EigVecs, const matrix<T>& MA, int CalcEigenVec );
int matrix<T>::sym_eigenvalues( matrix<T>* EigVecs, const matrix<T>& MA, int CalcEigenVec ); |
Pascal/Delphi | uses MFstd;
function MFsym_eigenvalues( EigVals:fVector; EigVecs, MA:fMatrix; len:UIntSize; CalcEigenVec:IntBool ): IntBool; |
|
Description | The eigenvalues, with or without the eigenvectors, of MA are calculated. This function is for non-singular symmetric real matrices only! It takes the following arguments:
- EigVals: a vector in which the eigenvalues will be returned
- EigVecs: a matrix of size len*len. If the eigenvectors are desired, the routine will fill the columns of EigVecs with the eigenvectors; otherwise, EigVecs is just needed as workspace.
- MA: the input matrix, which may or may not be overwritten by EigVecs
- len: the length of the rows (which is the same as the height of the columns, as MA must be a symmetric square matrix)
- CalcEigenVec: an int or IntBool, deciding if only the eigenvalues are needed (CalcEigenVec = FALSE or 0), or if the eigenvectors are desired as well (CalcEigenVec = TRUE or 1). Calculating the eigenvalues alone, without the eigenvectors, can speed up the calculation by up to a factor of two.
The eigenvalues (and eigenvectors) are returned in no specific order. |
|
Return value | FALSE (0), if no error occurred, otherwise TRUE (non-zero). It is highly recommended to check the return value, as deficiencies of the input matrix usually are not known beforehand, but would lead to failure of this function. |
|
|