39 template<
class Element>
41 :
TMatrixTLazy<Element>(1<<order, no_cols == 0 ? 1<<order : no_cols)
44 Error(
"THaarMatrixT",
"Haar order(%d) should be > 0",order);
46 Error(
"THaarMatrixT",
"#cols(%d) in Haar should be >= 0",no_cols);
59 template<
class Element>
66 if (no_rows < no_cols) {
67 Error(
"MakeHaarMat",
"#rows(%d) should be >= #cols(%d)",no_rows,no_cols);
71 Error(
"MakeHaarMat",
"#cols(%d) should be > 0",no_cols);
82 Element norm_factor = 1/
TMath::Sqrt((Element)no_rows);
86 for (j = 0; j < no_rows; j++)
93 Int_t step_length = no_rows/2;
94 while (cp < m_end && step_length > 0) {
95 for (Int_t step_position = 0; cp < m_end && step_position < no_rows;
96 step_position += 2*step_length, cp += no_rows) {
97 Element *ccp = cp+step_position;
98 for (j = 0; j < step_length; j++)
100 for (j = 0; j < step_length; j++)
101 *ccp++ = -norm_factor;
107 R__ASSERT(step_length != 0 || cp == m_end);
108 R__ASSERT(no_rows != no_cols || step_length == 0);
115 template<
class Element>
123 template<
class Element>
128 Error(
"THilbertMatrixT",
"#rows(%d) in Hilbert should be > 0",no_rows);
130 Error(
"THilbertMatrixT",
"#cols(%d) in Hilbert should be > 0",no_cols);
135 template<
class Element>
137 :
TMatrixTLazy<Element>(row_lwb,row_upb,col_lwb,col_upb)
139 if (row_upb < row_lwb)
140 Error(
"THilbertMatrixT",
"row_upb(%d) in Hilbert should be >= row_lwb(%d)",row_upb,row_lwb);
141 if (col_upb < col_lwb)
142 Error(
"THilbertMatrixT",
"col_upb(%d) in Hilbert should be >= col_lwb(%d)",col_upb,col_lwb);
149 template<
class Element>
157 Error(
"MakeHilbertMat",
"#rows(%d) should be > 0",no_rows);
161 Error(
"MakeHilbertMat",
"#cols(%d) should be > 0",no_cols);
166 for (Int_t i = 0; i < no_rows; i++)
167 for (Int_t j = 0; j < no_cols; j++)
168 *cp++ = 1.0/(i+j+1.0);
173 template<
class Element>
181 template<
class Element>
186 Error(
"THilbertMatrixTSym",
"#rows(%d) in Hilbert should be > 0",no_rows);
191 template<
class Element>
195 if (row_upb < row_lwb)
196 Error(
"THilbertMatrixTSym",
"row_upb(%d) in Hilbert should be >= row_lwb(%d)",row_upb,row_lwb);
203 template<
class Element>
209 Error(
"MakeHilbertMat",
"#rows(%d) should be > 0",no_rows);
214 for (Int_t i = 0; i < no_rows; i++)
215 for (Int_t j = 0; j < no_rows; j++)
216 *cp++ = 1.0/(i+j+1.0);
221 template<
class Element>
TMatrixT< Element > & Transpose(const TMatrixT< Element > &source)
Transpose matrix source.
void FillIn(TMatrixTSym< Element > &m) const
void MakeHilbertMat(TMatrixT< Element > &m)
Make a Hilbert matrix.
virtual const Element * GetMatrixArray() const
virtual const Element * GetMatrixArray() const
void MakeHaarMat(TMatrixT< Element > &m)
Create an orthonormal (2^n)*(no_cols) Haar (sub)matrix, whose columns are Haar functions.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t Int_t m
void FillIn(TMatrixT< Element > &m) const
void FillIn(TMatrixT< Element > &m) const
Templates of Lazy Matrix classes.
Double_t Sqrt(Double_t x)