Bridge++  Ver. 2.0.2
eigen_QR_Cmplx.h
Go to the documentation of this file.
1 
14 #ifndef EIGEN_QR_CMPLX_INCLUDED
15 #define EIGEN_QR_CMPLX_INCLUDED
16 
17 #include <cfloat>
18 #include <valarray>
19 #include <string>
20 
22 
24 {
25  public:
26  static const std::string class_name;
27 
28  public:
29  Eigen_QR_Cmplx(const size_t N) : N(N), N2(2 * N), size(N2 * N),
30  m_mat(size), m_q(size)
31  {
32  }
33 
34  std::valarray<double> solve(const double *matrix);
35  void get_R(double *r);
36  void get_Q(double *q);
37 
38  private:
39  size_t N;
40  size_t N2;
41  size_t size;
42 
43  std::valarray<double> m_mat;
44  std::valarray<double> m_q;
45  inline size_t re(const size_t i, const size_t j)
46  {
47  return N2 * i + 2 * j;
48  }
49 
50  inline size_t im(const size_t i, const size_t j)
51  {
52  return N2 * i + 2 * j + 1;
53  }
54 
55  inline size_t re(const size_t i)
56  {
57  return 2 * i;
58  }
59 
60  inline size_t im(const size_t i)
61  {
62  return 2 * i + 1;
63  }
64 
65  void qr_step(const int rank);
66 };
67 #endif
Eigen_QR_Cmplx::qr_step
void qr_step(const int rank)
Definition: eigen_QR_Cmplx.cpp:99
Eigen_QR_Cmplx::im
size_t im(const size_t i)
Definition: eigen_QR_Cmplx.h:60
Eigen_QR_Cmplx
Definition: eigen_QR_Cmplx.h:23
Eigen_QR_Cmplx::solve
std::valarray< double > solve(const double *matrix)
Definition: eigen_QR_Cmplx.cpp:19
Eigen_QR_Cmplx::re
size_t re(const size_t i, const size_t j)
Definition: eigen_QR_Cmplx.h:45
Eigen_QR_Cmplx::im
size_t im(const size_t i, const size_t j)
Definition: eigen_QR_Cmplx.h:50
Eigen_QR_Cmplx::re
size_t re(const size_t i)
Definition: eigen_QR_Cmplx.h:55
Eigen_QR_Cmplx::Eigen_QR_Cmplx
Eigen_QR_Cmplx(const size_t N)
Definition: eigen_QR_Cmplx.h:29
Eigen_QR_Cmplx::size
size_t size
Definition: eigen_QR_Cmplx.h:41
Eigen_QR_Cmplx::m_q
std::valarray< double > m_q
Definition: eigen_QR_Cmplx.h:44
Eigen_QR_Cmplx::N
size_t N
Definition: eigen_QR_Cmplx.h:39
decompose_Hessenberg_Cmplx.h
Eigen_QR_Cmplx::get_R
void get_R(double *r)
Definition: eigen_QR_Cmplx.cpp:207
Eigen_QR_Cmplx::class_name
static const std::string class_name
Definition: eigen_QR_Cmplx.h:26
Eigen_QR_Cmplx::N2
size_t N2
Definition: eigen_QR_Cmplx.h:40
Eigen_QR_Cmplx::get_Q
void get_Q(double *q)
Definition: eigen_QR_Cmplx.cpp:198
Eigen_QR_Cmplx::m_mat
std::valarray< double > m_mat
Definition: eigen_QR_Cmplx.h:43