MyraMath
lopcgn.h
Go to the documentation of this file.
1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
6 #ifndef MYRAMATH_ITERATIVE_LOPCG_H
7 #define MYRAMATH_ITERATIVE_LOPCG_H
8 
14 #include <myramath/MYRAMATH_EXPORT.h>
15 
16 // For std::pair
17 #include <utility>
18 
19 namespace myra {
20 
21 // Forward declarations.
22 template<class Number> class Action;
23 template<class Number> class Vector;
24 template<class Number> class Matrix;
25 template<class Number> class CMatrixRange;
26 template<class Number> class DiagonalMatrix;
27 
29 // Note the eigenvector is drawn from/restricted to the orthogonal complement of Q (regularly deflated)
30 MYRAMATH_EXPORT std::pair< Matrix<float >, DiagonalMatrix<float > > lopcgN(const Action<float >& M, const Action<float >& A, const CMatrixRange<float >& Q, int N, float tolerance = 1.0e-4, int iterations = 100);
31 MYRAMATH_EXPORT std::pair< Matrix<double>, DiagonalMatrix<double> > lopcgN(const Action<double>& M, const Action<double>& A, const CMatrixRange<double>& Q, int N, double tolerance = 1.0e-8, int iterations = 100);
32 
33 } // namespace myra
34 
35 #endif
Definition: syntax.dox:1