176 if ( ynorm1 <= inv_norm1 ) {
181 for (i = 0; i <
n; i++)
182 z(i) = (
y(i) >= 0.0 ? 1.0 : -1.0 );
187 for (i = 1; i <
n; i++) {
194 stop = (maxz <= b*
z);
201 }
while (!stop && iter);
228 for (
Int_t i = 0; (((i <
n) && (t1 !=zero ))); i++) {
235 if ( niter2>100)
break;
241 if (niter3>100)
break;
271 Error(
"Condition()",
"Hager procedure did NOT converge");
288 for (
Int_t icol = colLwb; icol <= colUpb && status; icol++) {
311 for (
Int_t i = 0; i < diagv.GetNrows(); i++)
326 printf(
"fTol = %.4e\n",
fTol);
327 printf(
"fDet1 = %.4e\n",
fDet1);
328 printf(
"fDet2 = %.4e\n",
fDet2);
330 printf(
"fRowLwb = %d\n",
fRowLwb);
331 printf(
"fColLwb = %d\n",
fColLwb);
339 if (
this != &source) {
362 for (i = l; i <
n; i++)
373 for (i = l; i <
n; i++) {
379 if (vp[lp] > 0.) vpprim = -vpprim;
381 beta = 1./(vpprim*up);
396 Error(
"ApplyHouseHolder(const TVectorD &,..,TMatrixDRow &)",
"matrix row too short");
406 for (i = l; i < nv; i++)
407 s += cp[i*inc_c]*vp[i];
410 cp[lp*inc_c] += s*up;
411 for (i = l; i < nv; i++)
412 cp[i*inc_c] += s*vp[i];
425 Error(
"ApplyHouseHolder(const TVectorD &,..,TMatrixDRow &)",
"matrix column too short");
435 for (i = l; i < nv; i++)
436 s += cp[i*inc_c]*vp[i];
439 cp[lp*inc_c] += s*up;
440 for (i = l; i < nv; i++)
441 cp[i*inc_c] += s*vp[i];
454 Error(
"ApplyHouseHolder(const TVectorD &,..,TVectorD &)",
"vector too short");
463 for (i = l; i < nv; i++)
468 for (i = l; i < nv; i++)
virtual Bool_t MultiSolve(TMatrixD &B)
Solve set of equations with RHS in columns of B.
virtual Bool_t TransSolve(TVectorD &b)=0
Int_t Hager(Double_t &est, Int_t iter=5)
void DefAplGivens(Double_t &v1, Double_t &v2, Double_t &c, Double_t &s)
Define and apply a Givens-rotation by calculating 2 rotation parameters c and s.
void ApplyHouseHolder(const TVectorD &vc, Double_t up, Double_t beta, Int_t lp, Int_t l, TMatrixDRow &cr)
Apply Householder-transformation.
virtual Bool_t Decompose()=0
Decomposition Base class.
TDecompBase()
Default constructor.
virtual const TMatrixDBase & GetDecompMatrix() const =0
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
double beta(double x, double y)
Calculates the beta function.
Bool_t DefHouseHolder(const TVectorD &vc, Int_t lp, Int_t l, Double_t &up, Double_t &beta, Double_t tol)
Define a Householder-transformation through the parameters up and b .
TDecompBase & operator=(const TDecompBase &source)
Assignment operator.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
static void DiagProd(const TVectorD &diag, Double_t tol, Double_t &d1, Double_t &d2)
Element * GetMatrixArray()
virtual Int_t GetNcols() const =0
virtual Bool_t Solve(TVectorD &b)=0
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Print(Option_t *opt="") const
Print class members.
void ApplyGivens(Double_t &z1, Double_t &z2, Double_t c, Double_t s)
Apply a Givens transformation as defined by c and s to the vector components v1 and v2 ...
void DefGivens(Double_t v1, Double_t v2, Double_t &c, Double_t &s)
Defines a Givens-rotation by calculating 2 rotation parameters c and s.
Element Norm1() const
Compute the 1-norm of the vector SUM{ |v[i]| }.
virtual Int_t GetNrows() const =0
const TMatrixTBase< Element > * GetMatrix() const
static constexpr double s
Double_t Hypot(Double_t x, Double_t y)
virtual void Det(Double_t &d1, Double_t &d2)
Matrix determinant det = d1*TMath::Power(2.,d2)
Mother of all ROOT objects.
const TMatrixTBase< Element > * GetMatrix() const
you should not use this method at all Int_t Int_t z
virtual Double_t Condition()
Matrix condition number.
Short_t Max(Short_t a, Short_t b)
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 b
Double_t Sqrt(Double_t x)