12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef EigenproblemINCLUDE
- #define EigenproblemINCLUDE
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #include <vector>
- #include <string.h>
- #include "vislearning/math/algebra/EigValues.h"
- namespace OBJREC {
- /** Real Symmetric Eigenproblem - no parallel mode,
- the eigenpairs returned by the method solve are ordered increasingly */
- class EigValuesTRLAN : public EigValues {
-
- private:
- int magnitude;
- int restarting_scheme;
- double tolerance;
- int max_mult;
- int mult_flops;
- public:
- /** Init the TRLAN lanczos routine with the following parameters:
- magnitude - Specifies the nature of the EigValuesTRLAN:
- find eigenpair with respect to the k largest (magnitude>0)
- or smallest (magnitude<0) eigenvalues
- restarting_... - restarting scheme of TRLAN
- max_mult - maximum number of matrix-vector multiplications to perform
- tolerance - stop criterion (abs. resudual |A*x-lambda*x|?)
- mult_flops - number of flops per matrix multiplication (used for statistics calculation)
- */
- EigValuesTRLAN( int magnitude=1,
- int restarting_scheme=1,
- double tolerance=1e-8,
- int max_mult=-1,
- int mult_flops=-1 );
- ~EigValuesTRLAN(){};
- /**
- * @param data matrix interface that does allow matrix-vector multiplications
- * @param k number of eigenvalues/eigenvectors
- * @param eigenvectors output Eigenvectors as Matrix
- * @param eigenvalues output Eigenvalues as Vector
- */
- virtual void getEigenvalues ( const GenericMatrix &data, NICE::Vector & eigenvalues, NICE::Matrix & eigenvectors, uint k );
- };
- } // namespace
- #endif
|