MyraMath
lopcg1.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_LOPCG1_H
7 #define MYRAMATH_ITERATIVE_LOPCG1_H
8 
20 #include <myramath/MYRAMATH_EXPORT.h>
21 
22 // For std::pair
23 #include <utility>
24 
25 namespace myra {
26 
27 // Forward declarations.
28 template<class Number> class Action;
29 template<class Number> class Vector;
30 template<class Number> class CMatrixRange;
31 template<class Number> class CVectorRange;
32 
34 MYRAMATH_EXPORT std::pair< Vector<float >, float > lopcg1(const Action<float >& M, const Action<float >& A, float tolerance = 1.0e-4, int iterations = 100);
35 MYRAMATH_EXPORT std::pair< Vector<double>, double> lopcg1(const Action<double>& M, const Action<double>& A, double tolerance = 1.0e-8, int iterations = 100);
36 
38 // Note the eigenvector is drawn from/restricted to the orthogonal complement of Q (regularly deflated)
39 MYRAMATH_EXPORT std::pair< Vector<float >, float > lopcg1(const Action<float >& M, const Action<float >& A, const CMatrixRange<float >& Q, float tolerance = 1.0e-4, int iterations = 100);
40 MYRAMATH_EXPORT std::pair< Vector<double>, double> lopcg1(const Action<double>& M, const Action<double>& A, const CMatrixRange<double>& Q, double tolerance = 1.0e-8, int iterations = 100);
41 
43 // Note the eigenvector is drawn from/restricted to the orthogonal complement of Q (regularly deflated)
44 // Note this version requires the seed vector s, making it completely deterministic.
45 MYRAMATH_EXPORT std::pair< Vector<float >, float > lopcg1(const Action<float >& M, const Action<float >& A, const CMatrixRange<float >& Q, const CVectorRange<float >& s, float tolerance = 1.0e-4, int iterations = 100);
46 MYRAMATH_EXPORT std::pair< Vector<double>, double> lopcg1(const Action<double>& M, const Action<double>& A, const CMatrixRange<double>& Q, const CVectorRange<double>& s, double tolerance = 1.0e-8, int iterations = 100);
47 
48 } // namespace myra
49 
50 #endif
Definition: syntax.dox:1