169 if ( ynorm1 <= inv_norm1 ) {
174 for (i = 0; i <
n; i++)
175 z(i) = (
y(i) >= 0.0 ? 1.0 : -1.0 );
180 for (i = 1; i <
n; i++) {
187 stop = (maxz <= b*
z);
194 }
while (!stop && iter);
221 for (
Int_t i = 0; (((i <
n) && (t1 !=zero ))); i++) {
228 if ( niter2>100)
break;
234 if (niter3>100)
break;
264 Error(
"Condition()",
"Hager procedure did NOT converge");
281 for (
Int_t icol = colLwb; icol <= colUpb &&
status; icol++) {
304 for (
Int_t i = 0; i < diagv.GetNrows(); i++)
332 if (
this != &source) {
355 for (i = l; i <
n; i++)
366 for (i = l; i <
n; i++) {
372 if (vp[lp] > 0.) vpprim = -vpprim;
374 beta = 1./(vpprim*up);
389 Error(
"ApplyHouseHolder(const TVectorD &,..,TMatrixDRow &)",
"matrix row too short");
399 for (i = l; i < nv; i++)
400 s += cp[i*inc_c]*vp[i];
403 cp[lp*inc_c] += s*up;
404 for (i = l; i < nv; i++)
405 cp[i*inc_c] += s*vp[i];
418 Error(
"ApplyHouseHolder(const TVectorD &,..,TMatrixDRow &)",
"matrix column too short");
428 for (i = l; i < nv; i++)
429 s += cp[i*inc_c]*vp[i];
432 cp[lp*inc_c] += s*up;
433 for (i = l; i < nv; i++)
434 cp[i*inc_c] += s*vp[i];
447 Error(
"ApplyHouseHolder(const TVectorD &,..,TVectorD &)",
"vector too short");
456 for (i = l; i < nv; i++)
461 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
void Print(Option_t *opt="") const
Print class members.
virtual const TMatrixDBase & GetDecompMatrix() const =0
const TMatrixTBase< Element > * GetMatrix() 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.
std::map< std::string, std::string >::const_iterator iter
TObject & operator=(const TObject &rhs)
TObject assignment operator.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Error(const char *location, const char *msgfmt,...)
static void DiagProd(const TVectorD &diag, Double_t tol, Double_t &d1, Double_t &d2)
Element * GetMatrixArray()
virtual Bool_t Solve(TVectorD &b)=0
Bool_t TestBit(UInt_t f) const
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 compenents 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.
const TMatrixTBase< Element > * GetMatrix() const
Element Norm1() const
Compute the 1-norm of the vector SUM{ |v[i]| }.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
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.
virtual Double_t Condition()
Matrix condition number.
Short_t Max(Short_t a, Short_t b)
ClassImp(TDecompBase) TDecompBase
Default constructor.
Double_t Sqrt(Double_t x)