Honeycomb  0.1
Component-Model Framework
LinearLeastSqr.h
Go to the documentation of this file.
1 // Honeycomb, Copyright (C) 2015 NewGamePlus Inc. Distributed under the Boost Software License v1.0.
2 #pragma once
3 
6 
7 namespace honey
8 {
9 
11 template<class Real>
13 {
14  typedef Alge_<Real> Alge;
15  typedef Svd<Real> Svd;
16  typedef Qrd<Real> Qrd;
17  typedef BackSub<Real> BackSub;
18 
19 public:
22 
24 
26 
55  void calc(const Matrix& x, const Vec& y, Vec& b);
56 
58 
67  void calc(const Matrix& x, const Vec& y, const Vec& w, Vec& b);
68 
70 
80  void calc(const Matrix& x, const Vec& y, const Vec& w, const Matrix& c, const Vec& d, Vec& b);
81 
82 private:
85  Svd _svd;
87 
90  Matrix _x;
91  Vec _y;
92  Vec _w;
94 
97  Qrd _qrd;
98  Matrix _ct;
99  Matrix _xq;
100  Matrix _rt;
101  Vec _y0;
102  Vec _y1;
103  Vec _yTmp;
105 };
106 
107 extern template class LinearLeastSqr<Float>;
108 extern template class LinearLeastSqr<Double>;
109 
110 }
111 
Algebra.
Definition: Alge.h:13
Linear least squares solver.
Definition: LinearLeastSqr.h:12
Matrix< matrix::dynamic, matrix::dynamic, Real > Matrix
Definition: LinearLeastSqr.h:20
Vec< matrix::dynamic, Real > Vec
Definition: LinearLeastSqr.h:21
void calc(const Matrix &x, const Vec &y, Vec &b)
Linear least squares.
Definition: LinearLeastSqr.cpp:9
LinearLeastSqr()
Definition: LinearLeastSqr.h:23
Global Honeycomb namespace.