7fd59977 |
1 | //#ifndef DEB |
2 | #define No_Standard_RangeError |
3 | #define No_Standard_OutOfRange |
4 | #define No_Standard_DimensionError |
5 | //#endif |
6 | |
7 | #include <math_Jacobi.ixx> |
8 | |
9 | #include <math_Recipes.hxx> |
10 | #include <math_NotSquare.hxx> |
11 | |
12 | math_Jacobi::math_Jacobi(const math_Matrix& A) : AA(1, A.RowNumber(), |
13 | 1, A.RowNumber()), |
14 | EigenValues(1, A.RowNumber()), |
15 | EigenVectors(1, A.RowNumber(), |
16 | 1, A.RowNumber()) { |
17 | |
18 | math_NotSquare_Raise_if(A.RowNumber() != A.ColNumber(), " "); |
19 | |
20 | AA = A; |
21 | Standard_Integer Error = Jacobi(AA, EigenValues, EigenVectors, NbRotations); |
22 | if(!Error) { |
23 | Done = Standard_True; |
24 | } |
25 | else { |
26 | Done = Standard_False; |
27 | } |
28 | } |
29 | |
30 | void math_Jacobi::Dump(Standard_OStream& o) const { |
31 | |
32 | o <<"math_Jacobi "; |
33 | if (Done) { |
34 | o << " Status = Done \n"; |
35 | o << " The eigenvalues vector is: " << EigenValues << endl; |
36 | } |
37 | else { |
38 | o << "Status = not Done \n"; |
39 | } |
40 | } |
41 | |
42 | |
43 | |