00001 /* QR_Q: Using LaPack routines dgeqrf, dorgqr (Real) and zgeqrf, zungqr (Cmplx) 00002 */ 00003 00004 #ifndef QR_Q_hh 00005 #define QR_Q_hh 00006 00007 #include <cfloat> 00008 #include "basics/typedefs.hh" 00009 #include "basics/outputOperator.hh" 00010 #include "function/vector.hh" 00011 #include "toolbox/array.hh" 00012 00013 using concepts::Real; 00014 using concepts::Cmplx; 00015 00016 namespace concepts { 00017 00018 // *************************************************************** QR_Q ** 00019 00023 template<class F> 00024 class QR_Q { 00025 public: 00026 QR_Q(const concepts::Array<concepts::Vector<F>*>& A, const int m); 00027 virtual ~QR_Q(); 00028 virtual const concepts::Array<concepts::Vector<F>*>& getQ(); 00029 protected: 00030 virtual std::ostream& info(std::ostream& os) const; 00031 private: 00033 const concepts::Array<concepts::Vector<F>*>& A_; 00035 concepts::Array<concepts::Vector<F>*> Q_; 00037 int m_; 00038 int n_; 00040 bool computed_; 00042 void compute_(); 00043 }; 00044 00045 } // namespace conepts 00046 00047 #endif // QR_Q_hh