42cf5bc1 |
1 | // Created on: 2005-12-15 |
2 | // Created by: Julia GERASIMOVA |
3 | // Copyright (c) 2005-2014 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _math_EigenValuesSearcher_HeaderFile |
17 | #define _math_EigenValuesSearcher_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_DefineAlloc.hxx> |
21 | #include <Standard_Handle.hxx> |
22 | |
23 | #include <TColStd_HArray1OfReal.hxx> |
24 | #include <Standard_Boolean.hxx> |
25 | #include <Standard_Integer.hxx> |
26 | #include <TColStd_HArray2OfReal.hxx> |
27 | #include <TColStd_Array1OfReal.hxx> |
28 | #include <Standard_Real.hxx> |
29 | #include <math_Vector.hxx> |
30 | class StdFail_NotDone; |
31 | |
32 | |
33 | //! This class finds eigen values and vectors of |
34 | //! real symmetric tridiagonal matrix |
35 | class math_EigenValuesSearcher |
36 | { |
37 | public: |
38 | |
39 | DEFINE_STANDARD_ALLOC |
40 | |
41 | |
42 | Standard_EXPORT math_EigenValuesSearcher(const TColStd_Array1OfReal& Diagonal, const TColStd_Array1OfReal& Subdiagonal); |
43 | |
44 | //! Returns Standard_True if computation is performed |
45 | //! successfully. |
46 | Standard_EXPORT Standard_Boolean IsDone() const; |
47 | |
48 | //! Returns the dimension of matrix |
49 | Standard_EXPORT Standard_Integer Dimension() const; |
50 | |
51 | //! Returns the Index_th eigen value of matrix |
52 | //! Index must be in [1, Dimension()] |
53 | Standard_EXPORT Standard_Real EigenValue (const Standard_Integer Index) const; |
54 | |
55 | //! Returns the Index_th eigen vector of matrix |
56 | //! Index must be in [1, Dimension()] |
57 | Standard_EXPORT math_Vector EigenVector (const Standard_Integer Index) const; |
58 | |
59 | |
60 | |
61 | |
62 | protected: |
63 | |
64 | |
65 | |
66 | |
67 | |
68 | private: |
69 | |
70 | |
71 | |
72 | Handle(TColStd_HArray1OfReal) myDiagonal; |
73 | Handle(TColStd_HArray1OfReal) mySubdiagonal; |
74 | Standard_Boolean myIsDone; |
75 | Standard_Integer myN; |
76 | Handle(TColStd_HArray1OfReal) myEigenValues; |
77 | Handle(TColStd_HArray2OfReal) myEigenVectors; |
78 | |
79 | |
80 | }; |
81 | |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | #endif // _math_EigenValuesSearcher_HeaderFile |