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