File indexing completed on 2024-04-06 11:59:28
0001 #ifndef GenericHouseholder_h
0002 #define GenericHouseholder_h
0003
0004
0005
0006
0007
0008
0009
0010 #include <vector>
0011 #include <iostream>
0012
0013 class GenericHouseholder {
0014 public:
0015
0016
0017 GenericHouseholder(bool normalise = false);
0018
0019
0020 ~GenericHouseholder();
0021
0022
0023 std::vector<float> iterate(const std::vector<std::vector<float> >& eventMatrix,
0024 const std::vector<float>& energyVector,
0025 const int nIter);
0026
0027
0028 std::vector<float> iterate(const std::vector<std::vector<float> >& eventMatrix,
0029 const std::vector<float>& energyVector);
0030
0031 private:
0032
0033
0034
0035
0036 bool decompose(const int m,
0037 const int n,
0038 std::vector<std::vector<float> >& qr,
0039 std::vector<float>& alpha,
0040 std::vector<int>& pivot);
0041
0042
0043
0044 void solve(int m,
0045 int n,
0046 const std::vector<std::vector<float> >& qr,
0047 const std::vector<float>& alpha,
0048 const std::vector<int>& pivot,
0049 std::vector<float>& r,
0050 std::vector<float>& y);
0051
0052 bool normaliseFlag;
0053 };
0054
0055 #endif