tjacobi.h - numeric - C++ library with numerical algorithms
(HTM) git clone git://src.adamsgaard.dk/numeric
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tjacobi.h (763B)
---
1 // Make sure header is only included once per object
2 #ifndef JACOBI_H_
3 #define JACOBI_H_
4
5 #include <armadillo>
6 #include "header.h"
7
8 // lsfit structure
9 class Jacobi {
10 private:
11 const Lengthtype n; // Matrix width and height
12
13 // Transformed matrix A: At
14 arma::Mat<Floattype> At;
15
16 // Diagonal
17 arma::Col<Floattype> e;
18
19 // Matrix of eigenvectors
20 arma::Mat<Floattype> V;
21
22 public:
23
24 // Constructor. Arguments: input matrix
25 Jacobi(const arma::Mat<Floattype> &A);
26
27 // Destructor
28 //~Jacobi();
29
30 // Return transformed matrix
31 arma::Mat<Floattype> trans();
32
33 // Return matrix of eigenvectors
34 arma::Mat<Floattype> eigenvectors();
35
36 // Return vector of eigenvalues
37 arma::Col<Floattype> eigenvalues();
38 };
39 #endif