51template<
class Element>
65template<
class Element>
68 if (
size == 0)
return nullptr;
82template<
class Element>
86 Error(
"Add(TVectorT<Element> &)",
"vector's not compatible");
90 const Element *
sp =
v.GetMatrixArray();
91 Element *
tp = this->GetMatrixArray();
92 const Element *
const tp_last =
tp+fNrows;
100template<
class Element>
105 Error(
"Add(TVectorT<Element> &)",
"vectors not compatible");
110 const Element *
sv1 =
v1.GetMatrixArray();
111 const Element *
sv2 =
v2.GetMatrixArray();
112 Element *
tp = this->GetMatrixArray();
113 const Element *
const tp_last =
tp+fNrows;
122template<
class Element>
149template<
class Element>
167 fElements = New_m(fNrows);
169 memset(fElements,0,fNrows*
sizeof(Element));
175template<
class Element>
184template<
class Element>
193template<
class Element>
197 SetElements(elements);
203template<
class Element>
207 SetElements(elements);
213template<
class Element>
224template<
class Element>
229 Allocate(mt->GetColUpb()-mt->GetColLwb()+1,mt->GetColLwb());
236template<
class Element>
241 Allocate(mt->GetRowUpb()-mt->GetRowLwb()+1,mt->GetRowLwb());
248template<
class Element>
263template<
class Element>
267 Error(
"TVectorT(Int_t, Int_t, ...)",
"upb(%d) < lwb(%d)",
upb,
lwb);
282 Error(
"TVectorT(Int_t, Int_t, ...)",
"argument list must be terminated by \"END\"");
292template<
class Element>
297 Error(
"ResizeTo(lwb,upb)",
"Not owner of data array,cannot resize");
318 if (fNrows > kSizeMax ||
nrows_old > kSizeMax)
319 memset(GetMatrixArray(),0,fNrows*
sizeof(Element));
347template<
class Element>
371template<
class Element>
377 Error(
"GetSub",
"row_lwb out of bounds");
381 Error(
"GetSub",
"row_upb out of bounds");
385 Error(
"GetSub",
"row_upb < row_lwb");
407 const Element *
ap = this->GetMatrixArray()+(
row_lwb-fRowLwb);
408 Element *
bp =
target.GetMatrixArray();
420template<
class Element>
428 Error(
"SetSub",
"row_lwb outof bounds");
432 Error(
"SetSub",
"source vector too large");
439 const Element *
bp =
source.GetMatrixArray();
440 Element *
ap = this->GetMatrixArray()+(
row_lwb-fRowLwb);
451template<
class Element>
455 memset(this->GetMatrixArray(),0,fNrows*
sizeof(Element));
462template<
class Element>
467 Element *
ep = this->GetMatrixArray();
468 const Element *
const fp =
ep+fNrows;
480template<
class Element>
485 Element *
ep = this->GetMatrixArray();
486 const Element *
const fp =
ep+fNrows;
498template<
class Element>
503 Element *
ep = this->GetMatrixArray();
504 const Element *
const fp =
ep+fNrows;
510 Error(
"Sqrt()",
"v(%ld) = %g < 0",
Long_t(
ep-this->GetMatrixArray()),(
float)*
ep);
520template<
class Element>
525 Element *
ep = this->GetMatrixArray();
526 const Element *
const fp =
ep+fNrows;
532 Error(
"Invert()",
"v(%ld) = %g",
Long_t(
ep-this->GetMatrixArray()),(
float)*
ep);
542template<
class Element>
546 Error(
"SelectNonZeros(const TVectorT<Element> &",
"vector's not compatible");
550 const Element *
sp = select.GetMatrixArray();
551 Element *
ep = this->GetMatrixArray();
552 const Element *
const fp =
ep+fNrows;
565template<
class Element>
571 const Element *
ep = this->GetMatrixArray();
572 const Element *
const fp =
ep+fNrows;
582template<
class Element>
588 const Element *
ep = this->GetMatrixArray();
589 const Element *
const fp =
ep+fNrows;
591 norm += (*ep) * (*ep);
601template<
class Element>
607 const Element *
ep = this->GetMatrixArray();
608 const Element *
const fp =
ep+fNrows;
618template<
class Element>
624 const Element *
ep = this->GetMatrixArray();
625 const Element *
const fp =
ep+fNrows;
635template<
class Element>
641 const Element *
ep = this->GetMatrixArray();
642 const Element *
const fp =
ep+fNrows;
652template<
class Element>
658 return fElements[
index];
664template<
class Element>
670 return fElements[
index];
678template<
class Element>
682 Error(
"operator=(const TVectorT<Element> &)",
"vectors not compatible");
686 if (this->GetMatrixArray() !=
source.GetMatrixArray()) {
688 memcpy(fElements,
source.GetMatrixArray(),fNrows*
sizeof(Element));
696template<
class Element>
704 if (mt->GetColLwb() != fRowLwb || mt->GetNcols() != fNrows) {
705 Error(
"operator=(const TMatrixTRow_const &)",
"vector and row not compatible");
711 const Element *
rp =
mr.GetPtr();
712 Element *
ep = this->GetMatrixArray();
713 const Element *
const fp =
ep+fNrows;
727template<
class Element>
735 if (mt->GetRowLwb() != fRowLwb || mt->GetNrows() != fNrows) {
736 Error(
"operator=(const TMatrixTColumn_const &)",
"vector and column not compatible");
742 const Element *
cp =
mc.GetPtr();
743 Element *
ep = this->GetMatrixArray();
744 const Element *
const fp =
ep+fNrows;
758template<
class Element>
766 if (
md.GetNdiags() != fNrows) {
767 Error(
"operator=(const TMatrixTDiag_const &)",
"vector and matrix-diagonal not compatible");
773 const Element *
dp =
md.GetPtr();
774 Element *
ep = this->GetMatrixArray();
775 const Element *
const fp =
ep+fNrows;
790template<
class Element>
798 if (mt->GetColLwb() != fRowLwb || mt->GetNcols() != fNrows) {
799 Error(
"operator=(const TMatrixTSparseRow_const &)",
"vector and row not compatible");
805 const Element *
const prData =
mr.GetDataPtr();
807 Element *
const pvData = this->GetMatrixArray();
821template<
class Element>
829 if (
md.GetNdiags() != fNrows) {
830 Error(
"operator=(const TMatrixTSparseDiag_const &)",
"vector and matrix-diagonal not compatible");
835 Element *
const pvData = this->GetMatrixArray();
845template<
class Element>
850 Element *
ep = this->GetMatrixArray();
851 const Element *
const fp =
ep+fNrows;
861template<
class Element>
866 Element *
ep = this->GetMatrixArray();
867 const Element *
const fp =
ep+fNrows;
877template<
class Element>
882 Element *
ep = this->GetMatrixArray();
883 const Element *
const fp =
ep+fNrows;
893template<
class Element>
898 Element *
ep = this->GetMatrixArray();
899 const Element *
const fp =
ep+fNrows;
909template<
class Element>
913 Error(
"operator+=(const TVectorT<Element> &)",
"vector's not compatible");
917 const Element *
sp =
source.GetMatrixArray();
918 Element *
tp = this->GetMatrixArray();
919 const Element *
const tp_last =
tp+fNrows;
929template<
class Element>
933 Error(
"operator-=(const TVectorT<Element> &)",
"vector's not compatible");
937 const Element *
sp =
source.GetMatrixArray();
938 Element *
tp = this->GetMatrixArray();
939 const Element *
const tp_last =
tp+fNrows;
950template<
class Element>
956 if (
a.GetNcols() != fNrows ||
a.GetColLwb() != fRowLwb) {
957 Error(
"operator*=(const TMatrixT &)",
"vector and matrix incompatible");
962 const Bool_t doResize = (fNrows !=
a.GetNrows() || fRowLwb !=
a.GetRowLwb());
964 Error(
"operator*=(const TMatrixT &)",
"vector has to be resized but not owner");
968 Element
work[kWorkMax];
983 memset(fElements,0,fNrows*
sizeof(Element));
985 const Element *
mp =
a.GetMatrixArray();
986 Element *
tp = this->GetMatrixArray();
988 if (
typeid(Element) ==
typeid(
Double_t))
991 else if (
typeid(Element) !=
typeid(
Float_t))
995 Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
997 const Element *
const tp_last =
tp+fNrows;
1017template<
class Element>
1023 if (
a.GetNcols() != fNrows ||
a.GetColLwb() != fRowLwb) {
1024 Error(
"operator*=(const TMatrixTSparse &)",
"vector and matrix incompatible");
1029 const Bool_t doResize = (fNrows !=
a.GetNrows() || fRowLwb !=
a.GetRowLwb());
1031 Error(
"operator*=(const TMatrixTSparse &)",
"vector has to be resized but not owner");
1035 Element
work[kWorkMax];
1050 memset(fElements,0,fNrows*
sizeof(Element));
1054 const Element *
const mp =
a.GetMatrixArray();
1057 Element *
tp = this->GetMatrixArray();
1080template<
class Element>
1086 if (
a.GetNcols() != fNrows ||
a.GetColLwb() != fRowLwb) {
1087 Error(
"operator*=(const TMatrixTSym &)",
"vector and matrix incompatible");
1092 Element
work[kWorkMax];
1101 memset(fElements,0,fNrows*
sizeof(Element));
1103 const Element *
mp =
a.GetMatrixArray();
1104 Element *
tp = this->GetMatrixArray();
1106 if (
typeid(Element) ==
typeid(
Double_t))
1109 else if (
typeid(Element) !=
typeid(
Float_t))
1113 Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
1115 const Element *
const tp_last =
tp+fNrows;
1134template<
class Element>
1139 const Element *
ep = this->GetMatrixArray();
1140 const Element *
const fp =
ep+fNrows;
1142 if (!(*
ep++ == val))
1151template<
class Element>
1156 const Element *
ep = this->GetMatrixArray();
1157 const Element *
const fp =
ep+fNrows;
1159 if (!(*
ep++ != val))
1168template<
class Element>
1173 const Element *
ep = this->GetMatrixArray();
1174 const Element *
const fp =
ep+fNrows;
1185template<
class Element>
1190 const Element *
ep = this->GetMatrixArray();
1191 const Element *
const fp =
ep+fNrows;
1193 if (!(*
ep++ <= val))
1202template<
class Element>
1207 const Element *
ep = this->GetMatrixArray();
1208 const Element *
const fp =
ep+fNrows;
1219template<
class Element>
1224 const Element *
ep = this->GetMatrixArray();
1225 const Element *
const fp =
ep+fNrows;
1227 if (!(*
ep++ >= val))
1236template<
class Element>
1240 Error(
"MatchesNonZeroPattern(const TVectorT&)",
"vector's not compatible");
1244 const Element *
sp = select.GetMatrixArray();
1245 const Element *
ep = this->GetMatrixArray();
1246 const Element *
const fp =
ep+fNrows;
1248 if (*
sp == 0.0 && *
ep != 0.0)
1259template<
class Element>
1263 Error(
"SomePositive(const TVectorT&)",
"vector's not compatible");
1267 const Element *
sp = select.GetMatrixArray();
1268 const Element *
ep = this->GetMatrixArray();
1269 const Element *
const fp =
ep+fNrows;
1271 if (*
sp != 0.0 && *
ep <= 0.0)
1282template<
class Element>
1286 Error(
"AddSomeConstant(Element,const TVectorT&)(const TVectorT&)",
"vector's not compatible");
1288 const Element *
sp = select.GetMatrixArray();
1289 Element *
ep = this->GetMatrixArray();
1290 const Element *
const fp =
ep+fNrows;
1303template<
class Element>
1308 const Element
scale = beta-alpha;
1309 const Element shift = alpha/
scale;
1311 Element *
ep = GetMatrixArray();
1312 const Element *
const fp =
ep+fNrows;
1320template<
class Element>
1324 for (Element *
ep = fElements;
ep < fElements+fNrows;
ep++)
1333template<
class Element>
1338 Element *
ep = fElements;
1351template<
class Element>
1354 gROOT->ProcessLine(
Form(
"THistPainter::PaintSpecialObjects((TObject*)0x%zx,\"%s\");",
1361template<
class Element>
1365 Error(
"Print",
"Vector is invalid");
1369 printf(
"\nVector (%d) %s is as follows",fNrows,
flag);
1371 printf(
"\n\n | %6d |", 1);
1372 printf(
"\n%s\n",
"------------------");
1373 for (
Int_t i = 0; i < fNrows; i++) {
1374 printf(
"%4d |",i+fRowLwb);
1376 printf(
"%g \n",(*
this)(i+fRowLwb));
1384template<
class Element>
1388 return (
memcmp(
v1.GetMatrixArray(),
v2.GetMatrixArray(),
v1.GetNrows()*
sizeof(Element)) == 0);
1394template<
class Element>
1399 Error(
"operator*(const TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
1410template<
class Element>
1421template<
class Element>
1432template<
class Element>
1443template<
class Element>
1454template<
class Element>
1465template<
class Element>
1476template<
class Element>
1479 const Element *
v1p =
v1.GetMatrixArray();
1480 const Element *
v2p =
v2.GetMatrixArray();
1482 const Element *
const fv1p =
v1p+
v1.GetNrows();
1492template <
class Element1,
class Element2>
1508template <
class Element1,
class Element2,
class Element3>
1512 target.ResizeTo(
v1.GetLwb(),
v1.GetUpb(),
v2.GetLwb(),
v2.GetUpb());
1540template <
class Element1,
class Element2,
class Element3>
1546 ::Error(
"Mult",
"Vector v1 and matrix m incompatible");
1550 ::Error(
"Mult",
"Matrix m and vector v2 incompatible");
1571 dot += *
mp++ * *
v2p++;
1585template<
class Element>
1589 Error(
"Add(TVectorT<Element> &,Element,const TVectorT<Element> &)",
"vector's are incompatible");
1593 const Element *
sp =
source.GetMatrixArray();
1594 Element *
tp =
target.GetMatrixArray();
1599 }
else if (
scalar == -1.0) {
1614template<
class Element>
1621 if (
a.GetNrows() !=
target.GetNrows() ||
a.GetRowLwb() !=
target.GetLwb()) {
1622 Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"target vector and matrix are incompatible");
1627 if (
a.GetNcols() !=
source.GetNrows() ||
a.GetColLwb() !=
source.GetLwb()) {
1628 Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"source vector and matrix are incompatible");
1633 const Element *
const sp =
source.GetMatrixArray();
1634 const Element *
mp =
a.GetMatrixArray();
1635 Element *
tp =
target.GetMatrixArray();
1637 if (
typeid(Element) ==
typeid(
Double_t))
1639 fNrows,
sp,1,0.0,
tp,1);
1640 else if (
typeid(Element) !=
typeid(
Float_t))
1642 fNrows,
sp,1,0.0,
tp,1);
1644 Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
1650 const Element *
sp1 =
sp;
1656 }
else if (
scalar == 0.0) {
1658 const Element *
sp1 =
sp;
1664 }
else if (
scalar == -1.0) {
1666 const Element *
sp1 =
sp;
1674 const Element *
sp1 =
sp;
1692template<
class Element>
1700 if (
a.GetNrows() !=
target.GetNrows() ||
a.GetRowLwb() !=
target.GetLwb()) {
1701 Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"target vector and matrix are incompatible");
1706 const Element *
const sp =
source.GetMatrixArray();
1707 const Element *
mp =
a.GetMatrixArray();
1708 Element *
tp =
target.GetMatrixArray();
1710 if (
typeid(Element) ==
typeid(
Double_t))
1712 fNrows,
sp,1,0.0,
tp,1);
1713 else if (
typeid(Element) !=
typeid(
Float_t))
1715 fNrows,
sp,1,0.0,
tp,1);
1717 Error(
"operator*=",
"type %s not implemented in BLAS library",
typeid(Element));
1723 const Element *
sp1 =
sp;
1729 }
else if (
scalar == 0.0) {
1731 const Element *
sp1 =
sp;
1737 }
else if (
scalar == -1.0) {
1739 const Element *
sp1 =
sp;
1747 const Element *
sp1 =
sp;
1764template<
class Element>
1771 if (
a.GetNrows() !=
target.GetNrows() ||
a.GetRowLwb() !=
target.GetLwb()) {
1772 Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"target vector and matrix are incompatible");
1777 if (
a.GetNcols() !=
source.GetNrows() ||
a.GetColLwb() !=
source.GetLwb()) {
1778 Error(
"Add(TVectorT &,const TMatrixT &,const TVectorT &)",
"source vector and matrix are incompatible");
1785 const Element *
const mp =
a.GetMatrixArray();
1787 const Element *
const sp =
source.GetMatrixArray();
1788 Element *
tp =
target.GetMatrixArray();
1801 }
else if (
scalar == 0.0) {
1812 }
else if (
scalar == -1.0) {
1842template<
class Element>
1847 Error(
"AddElemMult(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &)",
1848 "vector's are incompatible");
1852 const Element *
sp1 =
source1.GetMatrixArray();
1853 const Element *
sp2 =
source2.GetMatrixArray();
1854 Element *
tp =
target.GetMatrixArray();
1860 }
else if (
scalar == -1.0) {
1875template<
class Element>
1881 Error(
"AddElemMult(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &,onst TVectorT<Element> &)",
1882 "vector's are incompatible");
1886 const Element *
sp1 =
source1.GetMatrixArray();
1887 const Element *
sp2 =
source2.GetMatrixArray();
1888 const Element *
mp = select.GetMatrixArray();
1889 Element *
tp =
target.GetMatrixArray();
1893 while (
tp <
ftp ) {
1897 }
else if (
scalar == -1.0) {
1898 while (
tp <
ftp ) {
1903 while (
tp <
ftp ) {
1915template<
class Element>
1920 Error(
"AddElemDiv(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &)",
1921 "vector's are incompatible");
1925 const Element *
sp1 =
source1.GetMatrixArray();
1926 const Element *
sp2 =
source2.GetMatrixArray();
1927 Element *
tp =
target.GetMatrixArray();
1931 while (
tp <
ftp ) {
1936 Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
1940 }
else if (
scalar == -1.0) {
1941 while (
tp <
ftp ) {
1946 Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
1951 while (
tp <
ftp ) {
1956 Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
1969template<
class Element>
1975 Error(
"AddElemDiv(TVectorT<Element> &,Element,const TVectorT<Element> &,const TVectorT<Element> &,onst TVectorT<Element> &)",
1976 "vector's are incompatible");
1980 const Element *
sp1 =
source1.GetMatrixArray();
1981 const Element *
sp2 =
source2.GetMatrixArray();
1982 const Element *
mp = select.GetMatrixArray();
1983 Element *
tp =
target.GetMatrixArray();
1987 while (
tp <
ftp ) {
1993 Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
1998 }
else if (
scalar == -1.0) {
1999 while (
tp <
ftp ) {
2005 Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
2011 while (
tp <
ftp ) {
2017 Error(
"AddElemDiv",
"source2 (%d) is zero",
irow);
2030template<
class Element>
2034 Error(
"ElementMult(TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
2038 const Element *
sp =
source.GetMatrixArray();
2039 Element *
tp =
target.GetMatrixArray();
2050template<
class Element>
2054 Error(
"ElementMult(TVectorT<Element> &,const TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
2058 const Element *
sp =
source.GetMatrixArray();
2059 const Element *
mp = select.GetMatrixArray();
2060 Element *
tp =
target.GetMatrixArray();
2062 while (
tp <
ftp ) {
2073template<
class Element>
2077 Error(
"ElementDiv(TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
2081 const Element *
sp =
source.GetMatrixArray();
2082 Element *
tp =
target.GetMatrixArray();
2084 while (
tp <
ftp ) {
2089 Error(
"ElementDiv",
"source (%d) is zero",
irow);
2099template<
class Element>
2103 Error(
"ElementDiv(TVectorT<Element> &,const TVectorT<Element> &,const TVectorT<Element> &)",
"vector's are incompatible");
2107 const Element *
sp =
source.GetMatrixArray();
2108 const Element *
mp = select.GetMatrixArray();
2109 Element *
tp =
target.GetMatrixArray();
2111 while (
tp <
ftp ) {
2117 Error(
"ElementDiv",
"source (%d) is zero",
irow);
2129template<
class Element1,
class Element2>
2132 if (!
v1.IsValid()) {
2134 ::Error(
"AreCompatible",
"vector 1 not valid");
2137 if (!
v2.IsValid()) {
2139 ::Error(
"AreCompatible",
"vector 2 not valid");
2143 if (
v1.GetNrows() !=
v2.GetNrows() ||
v1.GetLwb() !=
v2.GetLwb()) {
2145 ::Error(
"AreCompatible",
"matrices 1 and 2 not compatible");
2155template<
class Element1,
class Element2>
2160 ::Error(
"AreCompatible",
"Matrix not valid");
2165 ::Error(
"AreCompatible",
"vector not valid");
2169 if (
m.GetNcols() !=
v.GetNrows() ) {
2171 ::Error(
"AreCompatible",
"matrix and vector not compatible");
2181template<
class Element1,
class Element2>
2186 ::Error(
"AreCompatible",
"Matrix not valid");
2191 ::Error(
"AreCompatible",
"vector not valid");
2195 if (
v.GetNrows() !=
m.GetNrows() ) {
2197 ::Error(
"AreCompatible",
"vector and matrix not compatible");
2207template<
class Element>
2211 Error(
"Compare(const TVectorT<Element> &,const TVectorT<Element> &)",
"vectors are incompatible");
2215 printf(
"\n\nComparison of two TVectorTs:\n");
2222 const Element *
mp1 =
v1.GetMatrixArray();
2223 const Element *
mp2 =
v2.GetMatrixArray();
2225 for (
Int_t i = 0; i <
v1.GetNrows(); i++) {
2226 const Element
mv1 = *
mp1++;
2227 const Element
mv2 = *
mp2++;
2241 printf(
"\n occurred at the point\t\t(%d)",
imax);
2244 printf(
"\n Vector 1 element is \t\t%g",
mv1);
2245 printf(
"\n Vector 2 element is \t\t%g",
mv2);
2247 printf(
"\n Relative error\t\t\t\t%g\n",
2253 printf(
"\n||Vector1-Vector2||/sqrt(||Vector1|| ||Vector2||)\t%g\n\n",
2260template<
class Element>
2268 maxDevAllow = std::numeric_limits<Element>::epsilon();
2270 for (
Int_t i =
v.GetLwb(); i <=
v.GetUpb(); i++) {
2295template<
class Element>
2306 maxDevAllow = std::numeric_limits<Element>::epsilon();
2308 for (
Int_t i =
v1.GetLwb(); i <=
v1.GetUpb(); i++) {
2334template<
class Element>
2337 if (
R__b.IsReading()) {
2346 fNrows =
R__b.ReadArray(fElements);
2349 if (fNrows > 0 && fNrows <= kSizeMax) {
2350 memcpy(fDataStack,fElements,fNrows*
sizeof(Element));
2351 delete [] fElements;
2352 fElements = fDataStack;
2353 }
else if (fNrows < 0)
2379template TMatrixF TMatrixTAutoloadOps::OuterProduct <Float_t,Float_t>
2381template TMatrixF &TMatrixTAutoloadOps::OuterProduct <Float_t,Float_t,Float_t>
2383template Float_t TMatrixTAutoloadOps::Mult <Float_t,Float_t,Float_t>
2431template TMatrixD TMatrixTAutoloadOps::OuterProduct <Double_t,Double_t>
2433template TMatrixD &TMatrixTAutoloadOps::OuterProduct <Double_t,Double_t,Double_t>
2435template Double_t TMatrixTAutoloadOps::Mult <Double_t,Double_t,Double_t>
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
short Version_t
Class version identifier (short)
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
float Float_t
Float 4 bytes (float)
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Double_t Dot(const TGLVector3 &v1, const TGLVector3 &v2)
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 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 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) noexcept
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)