#include "GeoSpecialShapes/LArWheelCalculator.h"
#include "CxxUtils/sincos.h"
#include "TMath.h"
#include "TMatrixD.h"
#include "TVectorD.h"
#include "TMatrixDLazy.h"
#include "TDecompLU.h"
#include "TDecompSVD.h"
#include <sys/time.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <mutex>
#include "GeoModelKernel/Units.h"
Go to the source code of this file.
◆ DEBUGPRINT
◆ MATRIX
◆ SYMMATRIX
◆ VECTOR
◆ findLinearApproximation()
| VECTOR findLinearApproximation |
( |
const Int_t | dataLen, |
|
|
const Int_t | nBasisFuntions, |
|
|
const VECTOR & | y, |
|
|
const MATRIX & | bf ) |
|
static |
Definition at line 60 of file sincos_poly.cxx.
63{
64#ifndef SINCOSPOLY_USE_EIGEN
67#else
68 SYMMATRIX A=SYMMATRIX::Zero(nBasisFuntions,nBasisFuntions);
69 VECTOR vY=VECTOR::Zero(nBasisFuntions);
70#endif
71 for(Int_t j = 0; j < nBasisFuntions; ++ j){
72 for(Int_t k = 0;
k < nBasisFuntions; ++
k){
73 Double_t Ajk = 0.0;
74 for(Int_t i = 0;
i < dataLen; ++
i){
75 Ajk += bf(j, i) * bf(k, i);
76 }
78 }
79 }
80
81 for(Int_t k = 0;
k < nBasisFuntions; ++
k){
82 Double_t vYk = 0.0;
83 for(Int_t i = 0;
i < dataLen; ++
i){
85 }
87 }
88#ifndef SINCOSPOLY_USE_EIGEN
90 Ainv.Invert();
91 return Ainv*vY;
92#else
93 return A.inverse()*vY;
94#endif
95}
hold the test vectors and ease the comparison
◆ operator<<()
template<typename T, typename Q>
| std::ostream & operator<< |
( |
std::ostream & | ostr, |
|
|
const TVectorT< T > & | v ) |
Definition at line 44 of file sincos_poly.cxx.
45{
46 std::ios_base::fmtflags save_flags(ostr.flags());
47 ostr << '[';
48 ostr << std::scientific;
49 for(Int_t idx=
v.GetLwb();idx<
v.GetUpb();idx++) {
50 ostr <<
v[
idx] <<
", ";
51 }
52 ostr <<
v[
v.GetUpb()];
53 ostr << ']';
54 ostr.flags(save_flags);
55 return ostr;
56}