52template<
class Element>
 
   66template<
class Element>
 
   69   if (
size == 0) 
return nullptr;
 
   71      if ( 
size <= kSizeMax )
 
   74         Element *heap = 
new Element[
size];
 
   83template<
class Element>
 
   87      Error(
"Add(TVectorT<Element> &)",
"vector's not compatible");
 
   91   const Element *
sp = 
v.GetMatrixArray();
 
   92         Element *
tp = this->GetMatrixArray();
 
   93   const Element * 
const tp_last = 
tp+fNrows;
 
  101template<
class Element>
 
  106         Error(
"Add(TVectorT<Element> &)",
"vectors not compatible");
 
  111   const Element *
sv1 = 
v1.GetMatrixArray();
 
  112   const Element *
sv2 = 
v2.GetMatrixArray();
 
  113         Element *
tp = this->GetMatrixArray();
 
  123template<
class Element>
 
  150template<
class Element>
 
  168   fElements = New_m(fNrows);
 
  170      memset(fElements,0,fNrows*
sizeof(Element));
 
  176template<
class Element>
 
  185template<
class Element>
 
  194template<
class Element>
 
  198   SetElements(elements);
 
 
  204template<
class Element>
 
  208   SetElements(elements);
 
 
  214template<
class Element>
 
  225template<
class Element>
 
  230   Allocate(mt->GetColUpb()-mt->GetColLwb()+1,mt->GetColLwb());
 
 
  237template<
class Element>
 
  242   Allocate(mt->GetRowUpb()-mt->GetRowLwb()+1,mt->GetRowLwb());
 
 
  249template<
class Element>
 
  264template<
class Element>
 
  268      Error(
"TVectorT(Int_t, Int_t, ...)",
"upb(%d) < lwb(%d)",
upb,
lwb);
 
  283      Error(
"TVectorT(Int_t, Int_t, ...)",
"argument list must be terminated by \"END\"");
 
 
  293template<
class Element>
 
  298      Error(
"ResizeTo(lwb,upb)",
"Not owner of data array,cannot resize");
 
  319      if (fNrows > kSizeMax || 
nrows_old > kSizeMax)
 
  320         memset(GetMatrixArray(),0,fNrows*
sizeof(Element));
 
 
  348template<
class Element>
 
  372template<
class Element>
 
  378         Error(
"GetSub",
"row_lwb out of bounds");
 
  382         Error(
"GetSub",
"row_upb out of bounds");
 
  386         Error(
"GetSub",
"row_upb < row_lwb");
 
  408   const Element *
ap = this->GetMatrixArray()+(
row_lwb-fRowLwb);
 
  409         Element *
bp = 
target.GetMatrixArray();
 
 
  421template<
class Element>
 
  429         Error(
"SetSub",
"row_lwb outof bounds");
 
  433         Error(
"SetSub",
"source vector too large");
 
  440   const Element *
bp = 
source.GetMatrixArray();
 
  441         Element *
ap = this->GetMatrixArray()+(
row_lwb-fRowLwb);
 
 
  452template<
class Element>
 
  456   memset(this->GetMatrixArray(),0,fNrows*
sizeof(Element));
 
 
  463template<
class Element>
 
  468         Element *
ep = this->GetMatrixArray();
 
  469   const Element * 
const fp = 
ep+fNrows;
 
 
  481template<
class Element>
 
  486         Element *
ep = this->GetMatrixArray();
 
  487   const Element * 
const fp = 
ep+fNrows;
 
 
  499template<
class Element>
 
  504         Element *
ep = this->GetMatrixArray();
 
  505   const Element * 
const fp = 
ep+fNrows;
 
  511         Error(
"Sqrt()",
"v(%ld) = %g < 0",
Long_t(
ep-this->GetMatrixArray()),(
float)*
ep);
 
 
  521template<
class Element>
 
  526         Element *
ep = this->GetMatrixArray();
 
  527   const Element * 
const fp = 
ep+fNrows;
 
  533         Error(
"Invert()",
"v(%ld) = %g",
Long_t(
ep-this->GetMatrixArray()),(
float)*
ep);
 
 
  543template<
class Element>
 
  547      Error(
"SelectNonZeros(const TVectorT<Element> &",
"vector's not compatible");
 
  551   const Element *
sp = 
select.GetMatrixArray();
 
  552         Element *
ep = this->GetMatrixArray();
 
  553   const Element * 
const fp = 
ep+fNrows;
 
 
  566template<
class Element>
 
  572   const Element *
ep = this->GetMatrixArray();
 
  573   const Element * 
const fp = 
ep+fNrows;
 
 
  583template<
class Element>
 
  589   const Element *
ep = this->GetMatrixArray();
 
  590   const Element * 
const fp = 
ep+fNrows;
 
  592      norm += (*ep) * (*ep);
 
 
  602template<
class Element>
 
  608   const Element *
ep = this->GetMatrixArray();
 
  609   const Element * 
const fp = 
ep+fNrows;
 
 
  619template<
class Element>
 
  625   const Element *
ep = this->GetMatrixArray();
 
  626   const Element * 
const fp = 
ep+fNrows;
 
 
  636template<
class Element>
 
  642   const Element *
ep = this->GetMatrixArray();
 
  643   const Element * 
const fp = 
ep+fNrows;
 
 
  653template<
class Element>
 
  659   return fElements[
index];
 
 
  665template<
class Element>
 
  671   return fElements[
index];
 
 
  679template<
class Element>
 
  683      Error(
"operator=(const TVectorT<Element> &)",
"vectors not compatible");
 
  687   if (this->GetMatrixArray() != 
source.GetMatrixArray()) {
 
  689      memcpy(fElements,
source.GetMatrixArray(),fNrows*
sizeof(Element));
 
 
  697template<
class Element>
 
  705      if (mt->GetColLwb() != fRowLwb || mt->GetNcols() != fNrows) {
 
  706         Error(
"operator=(const TMatrixTRow_const &)",
"vector and row not compatible");
 
  712   const Element *
rp = 
mr.GetPtr();              
 
  713         Element *
ep = this->GetMatrixArray();   
 
  714   const Element * 
const fp = 
ep+fNrows;
 
 
  728template<
class Element>
 
  736      if (mt->GetRowLwb() != fRowLwb || mt->GetNrows() != fNrows) {
 
  737         Error(
"operator=(const TMatrixTColumn_const &)",
"vector and column not compatible");
 
  743   const Element *
cp = 
mc.GetPtr();              
 
  744         Element *
ep = this->GetMatrixArray();   
 
  745   const Element * 
const fp = 
ep+fNrows;
 
 
  759template<
class Element>
 
  767      if (
md.GetNdiags() != fNrows) {
 
  768         Error(
"operator=(const TMatrixTDiag_const &)",
"vector and matrix-diagonal not compatible");
 
  774   const Element *
dp = 
md.GetPtr();              
 
  775         Element *
ep = this->GetMatrixArray();   
 
  776   const Element * 
const fp = 
ep+fNrows;
 
 
  791template<
class Element>
 
  799      if (mt->GetColLwb() != fRowLwb || mt->GetNcols() != fNrows) {
 
  800         Error(
"operator=(const TMatrixTSparseRow_const &)",
"vector and row not compatible");
 
  806   const Element * 
const prData = 
mr.GetDataPtr();          
 
  808         Element * 
const pvData = this->GetMatrixArray();   
 
 
  822template<
class Element>
 
  830      if (
md.GetNdiags() != fNrows) {
 
  831         Error(
"operator=(const TMatrixTSparseDiag_const &)",
"vector and matrix-diagonal not compatible");
 
  836   Element * 
const pvData = this->GetMatrixArray();
 
 
  846template<
class Element>
 
  851         Element *
ep = this->GetMatrixArray();
 
  852   const Element * 
const fp = 
ep+fNrows;
 
 
  862template<
class Element>
 
  867         Element *
ep = this->GetMatrixArray();
 
  868   const Element * 
const fp = 
ep+fNrows;
 
 
  878template<
class Element>
 
  883         Element *
ep = this->GetMatrixArray();
 
  884   const Element * 
const fp = 
ep+fNrows;
 
 
  894template<
class Element>
 
  899         Element *
ep = this->GetMatrixArray();
 
  900   const Element * 
const fp = 
ep+fNrows;
 
 
  910template<
class Element>
 
  914      Error(
"operator+=(const TVectorT<Element> &)",
"vector's not compatible");
 
  918   const Element *
sp = 
source.GetMatrixArray();
 
  919         Element *
tp = this->GetMatrixArray();
 
  920   const Element * 
const tp_last = 
tp+fNrows;
 
 
  930template<
class Element>
 
  934      Error(
"operator-=(const TVectorT<Element> &)",
"vector's not compatible");
 
  938   const Element *
sp = 
source.GetMatrixArray();
 
  939         Element *
tp = this->GetMatrixArray();
 
  940   const Element * 
const tp_last = 
tp+fNrows;
 
 
  951template<
class Element>
 
  957      if (
a.GetNcols() != fNrows || 
a.GetColLwb() != fRowLwb) {
 
  958         Error(
"operator*=(const TMatrixT &)",
"vector and matrix incompatible");
 
  963   const Bool_t doResize = (fNrows != 
a.GetNrows() || fRowLwb != 
a.GetRowLwb());
 
  965      Error(
"operator*=(const TMatrixT &)",
"vector has to be resized but not owner");
 
  969   Element 
work[kWorkMax];
 
  984   memset(fElements,0,fNrows*
sizeof(Element));
 
  986   const Element *
mp = 
a.GetMatrixArray();     
 
  987         Element *
tp = this->GetMatrixArray(); 
 
  989   if (
typeid(Element) == 
typeid(
Double_t))
 
  992   else if (
typeid(Element) != 
typeid(
Float_t))
 
  996      Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
 
  998   const Element * 
const tp_last = 
tp+fNrows;
 
 
 1018template<
class Element>
 
 1024      if (
a.GetNcols() != fNrows || 
a.GetColLwb() != fRowLwb) {
 
 1025         Error(
"operator*=(const TMatrixTSparse &)",
"vector and matrix incompatible");
 
 1030   const Bool_t doResize = (fNrows != 
a.GetNrows() || fRowLwb != 
a.GetRowLwb());
 
 1032      Error(
"operator*=(const TMatrixTSparse &)",
"vector has to be resized but not owner");
 
 1036   Element 
work[kWorkMax];
 
 1051   memset(fElements,0,fNrows*
sizeof(Element));
 
 1055   const Element * 
const mp        = 
a.GetMatrixArray();     
 
 1058         Element *       
tp = this->GetMatrixArray(); 
 
 
 1081template<
class Element>
 
 1087     if (
a.GetNcols() != fNrows || 
a.GetColLwb() != fRowLwb) {
 
 1088        Error(
"operator*=(const TMatrixTSym &)",
"vector and matrix incompatible");
 
 1093   Element 
work[kWorkMax];
 
 1102   memset(fElements,0,fNrows*
sizeof(Element));
 
 1104   const Element *
mp = 
a.GetMatrixArray();     
 
 1105         Element *
tp = this->GetMatrixArray(); 
 
 1107   if (
typeid(Element) == 
typeid(
Double_t))
 
 1110   else if (
typeid(Element) != 
typeid(
Float_t))
 
 1114      Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
 
 1116   const Element * 
const tp_last = 
tp+fNrows;
 
 
 1135template<
class Element>
 
 1140   const Element *
ep = this->GetMatrixArray();
 
 1141   const Element * 
const fp = 
ep+fNrows;
 
 1143      if (!(*
ep++ == val))
 
 
 1152template<
class Element>
 
 1157   const Element *
ep = this->GetMatrixArray();
 
 1158   const Element * 
const fp = 
ep+fNrows;
 
 1160      if (!(*
ep++ != val))
 
 
 1169template<
class Element>
 
 1174   const Element *
ep = this->GetMatrixArray();
 
 1175   const Element * 
const fp = 
ep+fNrows;
 
 
 1186template<
class Element>
 
 1191   const Element *
ep = this->GetMatrixArray();
 
 1192   const Element * 
const fp = 
ep+fNrows;
 
 1194      if (!(*
ep++ <= val))
 
 
 1203template<
class Element>
 
 1208   const Element *
ep = this->GetMatrixArray();
 
 1209   const Element * 
const fp = 
ep+fNrows;
 
 
 1220template<
class Element>
 
 1225   const Element *
ep = this->GetMatrixArray();
 
 1226   const Element * 
const fp = 
ep+fNrows;
 
 1228      if (!(*
ep++ >= val))
 
 
 1237template<
class Element>
 
 1241      Error(
"MatchesNonZeroPattern(const TVectorT&)",
"vector's not compatible");
 
 1245   const Element *
sp = 
select.GetMatrixArray();
 
 1246   const Element *
ep = this->GetMatrixArray();
 
 1247   const Element * 
const fp = 
ep+fNrows;
 
 1249      if (*
sp == 0.0 && *
ep != 0.0)
 
 
 1260template<
class Element>
 
 1264      Error(
"SomePositive(const TVectorT&)",
"vector's not compatible");
 
 1268   const Element *
sp = 
select.GetMatrixArray();
 
 1269   const Element *
ep = this->GetMatrixArray();
 
 1270   const Element * 
const fp = 
ep+fNrows;
 
 1272      if (*
sp != 0.0 && *
ep <= 0.0)
 
 
 1283template<
class Element>
 
 1287      Error(
"AddSomeConstant(Element,const TVectorT&)(const TVectorT&)",
"vector's not compatible");
 
 1289   const Element *
sp = 
select.GetMatrixArray();
 
 1290         Element *
ep = this->GetMatrixArray();
 
 1291   const Element * 
const fp = 
ep+fNrows;
 
 
 1304template<
class Element>
 
 1309   const Element 
scale = beta-alpha;
 
 1310   const Element shift = alpha/
scale;
 
 1312         Element *       
ep = GetMatrixArray();
 
 1313   const Element * 
const fp = 
ep+fNrows;
 
 
 1321template<
class Element>
 
 1325   for (Element *
ep = fElements; 
ep < fElements+fNrows; 
ep++)
 
 
 1334template<
class Element>
 
 1339   Element *
ep = fElements;
 
 
 1352template<
class Element>
 
 1355   gROOT->ProcessLine(
Form(
"THistPainter::PaintSpecialObjects((TObject*)0x%zx,\"%s\");",
 
 
 1362template<
class Element>
 
 1366      Error(
"Print",
"Vector is invalid");
 
 1370   printf(
"\nVector (%d) %s is as follows",fNrows,
flag);
 
 1372   printf(
"\n\n     |   %6d  |", 1);
 
 1373   printf(
"\n%s\n", 
"------------------");
 
 1374   for (
Int_t i = 0; i < fNrows; i++) {
 
 1375      printf(
"%4d |",i+fRowLwb);
 
 1377      printf(
"%g \n",(*
this)(i+fRowLwb));
 
 
 1385template<
class Element>
 
 1389   return (
memcmp(
v1.GetMatrixArray(),
v2.GetMatrixArray(),
v1.GetNrows()*
sizeof(Element)) == 0);
 
 
 1395template<
class Element>
 
 1400         Error(
"operator*(const TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
 
 
 1411template<
class Element>
 
 1422template<
class Element>
 
 1433template<
class Element>
 
 1444template<
class Element>
 
 1455template<
class Element>
 
 1466template<
class Element>
 
 1477template<
class Element>
 
 1480   const Element *
v1p = 
v1.GetMatrixArray();
 
 1481   const Element *
v2p = 
v2.GetMatrixArray();
 
 1483   const Element * 
const fv1p = 
v1p+
v1.GetNrows();
 
 
 1493template <
class Element1, 
class Element2>
 
 1509template <
class Element1,
class Element2,
class Element3>
 
 1513   target.ResizeTo(
v1.GetLwb(), 
v1.GetUpb(), 
v2.GetLwb(), 
v2.GetUpb());
 
 
 1541template <
class Element1, 
class Element2, 
class Element3>
 
 1547         ::Error(
"Mult", 
"Vector v1 and matrix m incompatible");
 
 1551         ::Error(
"Mult", 
"Matrix m and vector v2 incompatible");
 
 
 1586template<
class Element>
 
 1590      Error(
"Add(TVectorT<Element> &,Element,const TVectorT<Element> &)",
"vector's are incompatible");
 
 1594   const Element *       
sp  = 
source.GetMatrixArray();
 
 1595         Element *       
tp  = 
target.GetMatrixArray();
 
 1600   } 
else if (
scalar == -1.0) {
 
 
 1615template<
class Element>
 
 1622      if (
a.GetNrows() != 
target.GetNrows() || 
a.GetRowLwb() != 
target.GetLwb()) {
 
 1623         Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"target vector and matrix are incompatible");
 
 1628      if (
a.GetNcols() != 
source.GetNrows() || 
a.GetColLwb() != 
source.GetLwb()) {
 
 1629         Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"source vector and matrix are incompatible");
 
 1634   const Element * 
const sp = 
source.GetMatrixArray();  
 
 1635   const Element *       
mp = 
a.GetMatrixArray();       
 
 1636         Element *       
tp = 
target.GetMatrixArray();  
 
 1638   if (
typeid(Element) == 
typeid(
Double_t))
 
 1640                  fNrows,
sp,1,0.0,
tp,1);
 
 1641   else if (
typeid(Element) != 
typeid(
Float_t))
 
 1643                  fNrows,
sp,1,0.0,
tp,1);
 
 1645      Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
 
 1651         const Element *
sp1 = 
sp;
 
 1657   } 
else if (
scalar == 0.0) {
 
 1659         const Element *
sp1 = 
sp;
 
 1665   } 
else if (
scalar == -1.0) {
 
 1667         const Element *
sp1 = 
sp;
 
 1675        const Element *
sp1 = 
sp;
 
 
 1693template<
class Element>
 
 1701      if (
a.GetNrows() != 
target.GetNrows() || 
a.GetRowLwb() != 
target.GetLwb()) {
 
 1702         Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"target vector and matrix are incompatible");
 
 1707   const Element * 
const sp = 
source.GetMatrixArray();  
 
 1708   const Element *       
mp = 
a.GetMatrixArray();       
 
 1709         Element *       
tp = 
target.GetMatrixArray();  
 
 1711   if (
typeid(Element) == 
typeid(
Double_t))
 
 1713                  fNrows,
sp,1,0.0,
tp,1);
 
 1714   else if (
typeid(Element) != 
typeid(
Float_t))
 
 1716                  fNrows,
sp,1,0.0,
tp,1);
 
 1718      Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
 
 1724         const Element *
sp1 = 
sp;
 
 1730   } 
else if (
scalar == 0.0) {
 
 1732         const Element *
sp1 = 
sp;
 
 1738   } 
else if (
scalar == -1.0) {
 
 1740         const Element *
sp1 = 
sp;
 
 1748         const Element *
sp1 = 
sp;
 
 
 1765template<
class Element>
 
 1772      if (
a.GetNrows() != 
target.GetNrows() || 
a.GetRowLwb() != 
target.GetLwb()) {
 
 1773         Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"target vector and matrix are incompatible");
 
 1778      if (
a.GetNcols() != 
source.GetNrows() || 
a.GetColLwb() != 
source.GetLwb()) {
 
 1779         Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"source vector and matrix are incompatible");
 
 1786   const Element * 
const mp        = 
a.GetMatrixArray();     
 
 1788   const Element * 
const sp = 
source.GetMatrixArray(); 
 
 1789         Element *       
tp = 
target.GetMatrixArray(); 
 
 1802   } 
else if (
scalar == 0.0) {
 
 1813   } 
else if (
scalar == -1.0) {
 
 
 1843template<
class Element>
 
 1848      Error(
"AddElemMult(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &)",
 
 1849             "vector's are incompatible");
 
 1853   const Element *       
sp1 = 
source1.GetMatrixArray();
 
 1854   const Element *       
sp2 = 
source2.GetMatrixArray();
 
 1855         Element *       
tp  = 
target.GetMatrixArray();
 
 1861   } 
else if (
scalar == -1.0) {
 
 
 1876template<
class Element>
 
 1882      Error(
"AddElemMult(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &,onst TVectorT<Element> &)",
 
 1883             "vector's are incompatible");
 
 1887   const Element *       
sp1 = 
source1.GetMatrixArray();
 
 1888   const Element *       
sp2 = 
source2.GetMatrixArray();
 
 1889   const Element *       
mp  = 
select.GetMatrixArray();
 
 1890         Element *       
tp  = 
target.GetMatrixArray();
 
 1894      while ( 
tp < 
ftp ) {
 
 1898   } 
else if (
scalar == -1.0) {
 
 1899      while ( 
tp < 
ftp ) {
 
 1904      while ( 
tp < 
ftp ) {
 
 
 1916template<
class Element>
 
 1921      Error(
"AddElemDiv(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &)",
 
 1922             "vector's are incompatible");
 
 1926   const Element *       
sp1 = 
source1.GetMatrixArray();
 
 1927   const Element *       
sp2 = 
source2.GetMatrixArray();
 
 1928         Element *       
tp  = 
target.GetMatrixArray();
 
 1932      while ( 
tp < 
ftp ) {
 
 1937            Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
 
 1941   } 
else if (
scalar == -1.0) {
 
 1942      while ( 
tp < 
ftp ) {
 
 1947            Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
 
 1952      while ( 
tp < 
ftp ) {
 
 1957            Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
 
 
 1970template<
class Element>
 
 1976      Error(
"AddElemDiv(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &,onst TVectorT<Element> &)",
 
 1977             "vector's are incompatible");
 
 1981   const Element *       
sp1 = 
source1.GetMatrixArray();
 
 1982   const Element *       
sp2 = 
source2.GetMatrixArray();
 
 1983   const Element *       
mp  = 
select.GetMatrixArray();
 
 1984         Element *       
tp  = 
target.GetMatrixArray();
 
 1988      while ( 
tp < 
ftp ) {
 
 1994               Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
 
 1999   } 
else if (
scalar == -1.0) {
 
 2000      while ( 
tp < 
ftp ) {
 
 2006               Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
 
 2012      while ( 
tp < 
ftp ) {
 
 2018               Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
 
 
 2031template<
class Element>
 
 2035      Error(
"ElementMult(TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
 
 2039   const Element *       
sp  = 
source.GetMatrixArray();
 
 2040         Element *       
tp  = 
target.GetMatrixArray();
 
 
 2051template<
class Element>
 
 2055      Error(
"ElementMult(TVectorT<Element> &,const TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
 
 2059   const Element *       
sp  = 
source.GetMatrixArray();
 
 2060   const Element *       
mp  = 
select.GetMatrixArray();
 
 2061         Element *       
tp  = 
target.GetMatrixArray();
 
 2063   while ( 
tp < 
ftp ) {
 
 
 2074template<
class Element>
 
 2078      Error(
"ElementDiv(TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
 
 2082   const Element *       
sp  = 
source.GetMatrixArray();
 
 2083         Element *       
tp  = 
target.GetMatrixArray();
 
 2085   while ( 
tp < 
ftp ) {
 
 2090         Error(
"ElementDiv",
"source (%d) is zero",
irow);
 
 
 2100template<
class Element>
 
 2104      Error(
"ElementDiv(TVectorT<Element> &,const TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
 
 2108   const Element *       
sp  = 
source.GetMatrixArray();
 
 2109   const Element *       
mp  = 
select.GetMatrixArray();
 
 2110         Element *       
tp  = 
target.GetMatrixArray();
 
 2112   while ( 
tp < 
ftp ) {
 
 2118            Error(
"ElementDiv",
"source (%d) is zero",
irow);
 
 
 2130template<
class Element1,
class Element2>
 
 2133   if (!
v1.IsValid()) {
 
 2135         ::Error(
"AreCompatible", 
"vector 1 not valid");
 
 2138   if (!
v2.IsValid()) {
 
 2140         ::Error(
"AreCompatible", 
"vector 2 not valid");
 
 2144   if (
v1.GetNrows() != 
v2.GetNrows() || 
v1.GetLwb() != 
v2.GetLwb()) {
 
 2146         ::Error(
"AreCompatible", 
"matrices 1 and 2 not compatible");
 
 
 2156template<
class Element1, 
class Element2>
 
 2161         ::Error(
"AreCompatible", 
"Matrix not valid");
 
 2166         ::Error(
"AreCompatible", 
"vector not valid");
 
 2170   if (
m.GetNcols() != 
v.GetNrows() ) {
 
 2172         ::Error(
"AreCompatible", 
"matrix and vector not compatible");
 
 
 2182template<
class Element1, 
class Element2>
 
 2187         ::Error(
"AreCompatible", 
"Matrix not valid");
 
 2192         ::Error(
"AreCompatible", 
"vector not valid");
 
 2196   if (
v.GetNrows() != 
m.GetNrows() ) {
 
 2198         ::Error(
"AreCompatible", 
"vector and matrix not compatible");
 
 
 2208template<
class Element>
 
 2212      Error(
"Compare(const TVectorT<Element> &,const TVectorT<Element> &)",
"vectors are incompatible");
 
 2216   printf(
"\n\nComparison of two TVectorTs:\n");
 
 2223   const Element *
mp1 = 
v1.GetMatrixArray();    
 
 2224   const Element *
mp2 = 
v2.GetMatrixArray();
 
 2226   for (
Int_t i = 0; i < 
v1.GetNrows(); i++) {
 
 2227      const Element 
mv1  = *
mp1++;
 
 2228      const Element 
mv2  = *
mp2++;
 
 2242   printf(
"\n   occurred at the point\t\t(%d)",
imax);
 
 2245   printf(
"\n Vector 1 element is    \t\t%g",
mv1);
 
 2246   printf(
"\n Vector 2 element is    \t\t%g",
mv2);
 
 2248   printf(
"\n Relative error\t\t\t\t%g\n",
 
 2254   printf(
"\n||Vector1-Vector2||/sqrt(||Vector1|| ||Vector2||)\t%g\n\n",
 
 
 2261template<
class Element>
 
 2269      maxDevAllow = std::numeric_limits<Element>::epsilon();
 
 2271   for (
Int_t i = 
v.GetLwb(); i <= 
v.GetUpb(); i++) {
 
 
 2296template<
class Element>
 
 2307      maxDevAllow = std::numeric_limits<Element>::epsilon();
 
 2309   for (
Int_t i = 
v1.GetLwb(); i <= 
v1.GetUpb(); i++) {
 
 
 2335template<
class Element>
 
 2338   if (
R__b.IsReading()) {
 
 2347         fNrows = 
R__b.ReadArray(fElements);
 
 2350      if (fNrows > 0 && fNrows <= kSizeMax) {
 
 2351         memcpy(fDataStack,fElements,fNrows*
sizeof(Element));
 
 2352         delete [] fElements;
 
 2353         fElements = fDataStack;
 
 2354      } 
else if (fNrows < 0)
 
 
 
 2380template TMatrixF  TMatrixTAutoloadOps::OuterProduct        <Float_t,Float_t>
 
 2382template TMatrixF &TMatrixTAutoloadOps::OuterProduct        <Float_t,Float_t,Float_t>
 
 2384template Float_t   TMatrixTAutoloadOps::Mult                <Float_t,Float_t,Float_t>
 
 2432template TMatrixD  TMatrixTAutoloadOps::OuterProduct        <Double_t,Double_t>
 
 2434template TMatrixD &TMatrixTAutoloadOps::OuterProduct        <Double_t,Double_t,Double_t>
 
 2436template Double_t  TMatrixTAutoloadOps::Mult                <Double_t,Double_t,Double_t>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
 
#define templateClassImp(name)
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
 
R__EXTERN Int_t gMatrixCheck
 
Double_t Drand(Double_t &ix)
Random number generator [0....1] with seed ix.
 
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
 
Buffer base class used for serializing objects.
 
Mother of all ROOT objects.
 
TObject & operator=(const TObject &rhs)
TObject assignment operator.
 
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
 
void ToUpper()
Change string to upper case.
 
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
 
TVectorT< Element > & Zero()
Set vector elements to zero.
 
Bool_t operator>=(Element val) const
Are all vector elements >= val?
 
Element * New_m(Int_t size)
default kTRUE, when Use array kFALSE
 
TVectorT< Element > & Apply(const TElementActionT< Element > &action)
Apply action to each element of the vector.
 
void Allocate(Int_t nrows, Int_t row_lwb=0, Int_t init=0)
Allocate new vector.
 
TVectorT< Element > & Sqr()
Square each element of the vector.
 
Element Min() const
return minimum vector element value
 
Int_t Memcpy_m(Element *newp, const Element *oldp, Int_t copySize, Int_t newSize, Int_t oldSize)
Copy copySize doubles from *oldp to *newp .
 
Element Norm1() const
Compute the 1-norm of the vector SUM{ |v[i]| }.
 
void Delete_m(Int_t size, Element *&)
Delete data pointer m, if it was assigned on the heap.
 
Element NormInf() const
Compute the infinity-norm of the vector MAX{ |v[i]| }.
 
Element Sum() const
Compute sum of elements.
 
void AddSomeConstant(Element val, const TVectorT< Element > &select)
Add to vector elements as selected through array select the value val.
 
Bool_t operator!=(Element val) const
Are all vector elements not equal to val?
 
Bool_t MatchesNonZeroPattern(const TVectorT< Element > &select)
Check if vector elements as selected through array select are non-zero.
 
void Streamer(TBuffer &) override
Stream an object of class TVectorT.
 
TVectorT< Element > & GetSub(Int_t row_lwb, Int_t row_upb, TVectorT< Element > &target, Option_t *option="S") const
Get subvector [row_lwb..row_upb]; The indexing range of the returned vector depends on the argument o...
 
TVectorT< Element > & Abs()
Take an absolute value of a vector, i.e. apply Abs() to each element.
 
Bool_t operator==(Element val) const
Are all vector elements equal to val?
 
Bool_t operator>(Element val) const
Are all vector elements > val?
 
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
 
TVectorT< Element > & operator=(const TVectorT< Element > &source)
Notice that this assignment does NOT change the ownership : if the storage space was adopted,...
 
TVectorT< Element > & SetSub(Int_t row_lwb, const TVectorT< Element > &source)
Insert vector source starting at [row_lwb], thereby overwriting the part [row_lwb....
 
void Randomize(Element alpha, Element beta, Double_t &seed)
randomize vector elements value
 
void Add(const TVectorT< Element > &v)
Add vector v to this vector.
 
TVectorT< Element > & operator+=(Element val)
Add val to every element of the vector.
 
TVectorT< Element > & Use(Int_t lwb, Int_t upb, Element *data)
Use the array data to fill the vector lwb..upb].
 
TVectorT< Element > & SelectNonZeros(const TVectorT< Element > &select)
Keep only element as selected through array select non-zero.
 
Element Max() const
return maximum vector element value
 
Bool_t operator<(Element val) const
Are all vector elements < val?
 
Bool_t operator<=(Element val) const
Are all vector elements <= val?
 
TVectorT< Element > & operator*=(Element val)
Multiply every element of the vector with val.
 
Bool_t SomePositive(const TVectorT< Element > &select)
Check if vector elements as selected through array select are all positive.
 
Int_t NonZeros() const
Compute the number of elements != 0.0.
 
TVectorT< Element > & Invert()
v[i] = 1/v[i]
 
Element Norm2Sqr() const
Compute the square of the 2-norm SUM{ v[i]^2 }.
 
void Print(Option_t *option="") const override
Print the vector as a list of elements.
 
TVectorT< Element > & operator-=(Element val)
Subtract val from every element of the vector.
 
void Draw(Option_t *option="") override
Draw this vector The histogram is named "TVectorT" by default and no title.
 
TVectorT< Element > & Sqrt()
Take square root of all elements.
 
Long64_t LocMin(Long64_t n, const T *a)
Returns index of array with the minimum element.
 
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
 
Long64_t LocMax(Long64_t n, const T *a)
Returns index of array with the maximum element.
 
Double_t Sqrt(Double_t x)
Returns the square root of x.
 
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
 
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
 
Bool_t VerifyVectorValue(const TVectorT< Element > &m, Element val, Int_t verbose, Element maxDevAllow)
Validate that all elements of vector have value val within maxDevAllow .
 
TVectorT< Element > & AddElemDiv(TVectorT< Element > &target, Element scalar, const TVectorT< Element > &source1, const TVectorT< Element > &source2)
Modify addition: target += scalar * ElementDiv(source1,source2) .
 
TMatrixT< Element > operator+(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
operation this = source1+source2
 
void Compare(const TMatrixTBase< Element > &m1, const TMatrixTBase< Element > &m2)
Compare two matrices and print out the result of the comparison.
 
TMatrixT< Element > & ElementMult(TMatrixT< Element > &target, const TMatrixT< Element > &source)
Multiply target by the source, element-by-element.
 
TVectorT< Element > & AddElemMult(TVectorT< Element > &target, Element scalar, const TVectorT< Element > &source1, const TVectorT< Element > &source2)
Modify addition: target += scalar * ElementMult(source1,source2) .
 
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.
 
TMatrixT< Element1 > OuterProduct(const TVectorT< Element1 > &v1, const TVectorT< Element2 > &v2)
Return the matrix M = v1 * v2'.
 
Element Dot(const TVectorT< Element > &source1, const TVectorT< Element > &source2)
return inner-produvt v1 . v2
 
Bool_t VerifyVectorIdentity(const TVectorT< Element > &m1, const TVectorT< Element > &m2, Int_t verbose, Element maxDevAllow)
Verify that elements of the two vectors are equal within maxDevAllow .
 
TMatrixT< Element > & ElementDiv(TMatrixT< Element > &target, const TMatrixT< Element > &source)
Divide target by the source, element-by-element.
 
Element1 Mult(const TVectorT< Element1 > &v1, const TMatrixT< Element2 > &m, const TVectorT< Element3 > &v2)
Perform v1 * M * v2, a scalar result.
 
TMatrixT< Element > operator-(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
operation this = source1-source2
 
Bool_t operator==(const TMatrixTBase< Element > &m1, const TMatrixTBase< Element > &m2)
Check to see if two matrices are identical.
 
TMatrixT< Element > operator*(Element val, const TMatrixT< Element > &source)
operation this = val*source
 
Bool_t AreCompatible(const TMatrixTBase< Element1 > &m1, const TMatrixTBase< Element2 > &m2, Int_t verbose=0)
Check that matrice sm1 and m2 areboth valid and have identical shapes .
 
static uint64_t sum(uint64_t i)