39template <
class Element>
 
   48template <
class Element>
 
   62template <
class Element>
 
   72template <
class Element>
 
   83template <
class Element>
 
   94template <
class Element>
 
  105template <
class Element>
 
  118template <
class Element>
 
  143      const Element 
oldTol = this->SetTol(std::numeric_limits<Element>::min());
 
  154   default: 
Error(
"TMatrixT(EMatrixCreatorOp1)", 
"operation %d not yet implemented", 
op);
 
  164template <
class Element>
 
  172      Allocate(
a.GetNrows(), 
b.GetNcols(), 
a.GetRowLwb(), 
b.GetColLwb(), 1);
 
  177      Allocate(
a.GetNcols(), 
b.GetNcols(), 
a.GetColLwb(), 
b.GetColLwb(), 1);
 
  182      Allocate(
a.GetNrows(), 
b.GetNrows(), 
a.GetRowLwb(), 
b.GetRowLwb(), 1);
 
  187      Allocate(
a.GetNrows(), 
b.GetNcols(), 
a.GetRowLwb(), 
b.GetColLwb(), 1);
 
  189      if (
a.GetNrows() == 
b.GetNcols()) {
 
  191         const Element 
oldTol = this->SetTol(std::numeric_limits<Element>::min());
 
  197         const Element 
oldTol = 
ainv.SetTol(std::numeric_limits<Element>::min());
 
  206      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  212      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  217   default: 
Error(
"TMatrixT(EMatrixCreatorOp2)", 
"operation %d not yet implemented", 
op);
 
  226template <
class Element>
 
  234      Allocate(
a.GetNrows(), 
b.GetNcols(), 
a.GetRowLwb(), 
b.GetColLwb(), 1);
 
  239      Allocate(
a.GetNcols(), 
b.GetNcols(), 
a.GetColLwb(), 
b.GetColLwb(), 1);
 
  244      Allocate(
a.GetNrows(), 
b.GetNrows(), 
a.GetRowLwb(), 
b.GetRowLwb(), 1);
 
  249      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  251      const Element 
oldTol = this->SetTol(std::numeric_limits<Element>::min());
 
  259      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  265      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  270   default: 
Error(
"TMatrixT(EMatrixCreatorOp2)", 
"operation %d not yet implemented", 
op);
 
 
  280template <
class Element>
 
  288      Allocate(
a.GetNrows(), 
b.GetNcols(), 
a.GetRowLwb(), 
b.GetColLwb(), 1);
 
  293      Allocate(
a.GetNcols(), 
b.GetNcols(), 
a.GetColLwb(), 
b.GetColLwb(), 1);
 
  298      Allocate(
a.GetNrows(), 
b.GetNrows(), 
a.GetRowLwb(), 
b.GetRowLwb(), 1);
 
  303      Allocate(
a.GetNrows(), 
b.GetNcols(), 
a.GetRowLwb(), 
b.GetColLwb(), 1);
 
  305      if (
a.GetNrows() == 
b.GetNcols()) {
 
  307         const Element 
oldTol = this->SetTol(std::numeric_limits<Element>::min());
 
  313         const Element 
oldTol = 
ainv.SetTol(std::numeric_limits<Element>::min());
 
  322      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  328      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  333   default: 
Error(
"TMatrixT(EMatrixCreatorOp2)", 
"operation %d not yet implemented", 
op);
 
 
  342template <
class Element>
 
  350      Allocate(
a.GetNrows(), 
b.GetNcols(), 
a.GetRowLwb(), 
b.GetColLwb(), 1);
 
  355      Allocate(
a.GetNcols(), 
b.GetNcols(), 
a.GetColLwb(), 
b.GetColLwb(), 1);
 
  360      Allocate(
a.GetNrows(), 
b.GetNrows(), 
a.GetRowLwb(), 
b.GetRowLwb(), 1);
 
  365      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  367      const Element 
oldTol = this->SetTol(std::numeric_limits<Element>::min());
 
  375      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  381      Allocate(
a.GetNrows(), 
a.GetNcols(), 
a.GetRowLwb(), 
a.GetColLwb(), 1);
 
  386   default: 
Error(
"TMatrixT(EMatrixCreatorOp2)", 
"operation %d not yet implemented", 
op);
 
 
  393template <
class Element>
 
  405template <
class Element>
 
  409      if (
size > this->kSizeMax)
 
 
  419template <
class Element>
 
  428         Element *heap = 
new Element[
size];
 
 
  438template <
class Element>
 
  463template <
class Element>
 
  467   this->fIsOwner = 
kTRUE;
 
  468   this->fTol = std::numeric_limits<Element>::epsilon();
 
  487   this->fNelems = this->fNrows * this->fNcols;
 
  490   if (((
Long64_t)this->fNrows) * this->fNcols != this->fNelems) {
 
  496   if (this->fNelems > 0) {
 
  497      fElements = New_m(this->fNelems);
 
  499         memset(fElements, 0, this->fNelems * 
sizeof(Element));
 
 
  507template <
class Element>
 
  512         Error(
"Plus", 
"matrices not compatible");
 
  516      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  517         Error(
"Plus", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  521      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  522         Error(
"Plus", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  527   const Element *
ap = 
a.GetMatrixArray();
 
  528   const Element *
bp = 
b.GetMatrixArray();
 
  529   Element *
cp = this->GetMatrixArray();
 
  530   const Element *
const cp_last = 
cp + this->fNelems;
 
 
  541template <
class Element>
 
  546         Error(
"Plus", 
"matrices not compatible");
 
  550      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  551         Error(
"Plus", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  555      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  556         Error(
"Plus", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  561   const Element *
ap = 
a.GetMatrixArray();
 
  562   const Element *
bp = 
b.GetMatrixArray();
 
  563   Element *
cp = this->GetMatrixArray();
 
  564   const Element *
const cp_last = 
cp + this->fNelems;
 
 
  575template <
class Element>
 
  580         Error(
"Minus", 
"matrices not compatible");
 
  584      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  585         Error(
"Minus", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  589      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  590         Error(
"Minus", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  595   const Element *
ap = 
a.GetMatrixArray();
 
  596   const Element *
bp = 
b.GetMatrixArray();
 
  597   Element *
cp = this->GetMatrixArray();
 
  598   const Element *
const cp_last = 
cp + this->fNelems;
 
 
  609template <
class Element>
 
  614         Error(
"Minus", 
"matrices not compatible");
 
  618      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  619         Error(
"Minus", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  623      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  624         Error(
"Minus", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  629   const Element *
ap = 
a.GetMatrixArray();
 
  630   const Element *
bp = 
b.GetMatrixArray();
 
  631   Element *
cp = this->GetMatrixArray();
 
  632   const Element *
const cp_last = 
cp + this->fNelems;
 
 
  643template <
class Element>
 
  647      if (
a.GetNcols() != 
b.GetNrows() || 
a.GetColLwb() != 
b.GetRowLwb()) {
 
  648         Error(
"Mult", 
"A rows and B columns incompatible");
 
  652      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  653         Error(
"Mult", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  657      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  658         Error(
"Mult", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  664   const Element *
ap = 
a.GetMatrixArray();
 
  665   const Element *
bp = 
b.GetMatrixArray();
 
  666   Element *
cp = this->GetMatrixArray();
 
  667   if (
typeid(Element) == 
typeid(
Double_t))
 
  668      cblas_dgemm(
CblasRowMajor, 
CblasNoTrans, 
CblasNoTrans, fNrows, fNcols, 
a.GetNcols(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
  669                  b.GetNcols(), 1.0, 
cp, fNcols);
 
  670   else if (
typeid(Element) != 
typeid(
Float_t))
 
  671      cblas_sgemm(
CblasRowMajor, 
CblasNoTrans, 
CblasNoTrans, fNrows, fNcols, 
a.GetNcols(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
  672                  b.GetNcols(), 1.0, 
cp, fNcols);
 
  674      Error(
"Mult", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
  680   const Element *
const ap = 
a.GetMatrixArray();
 
  681   const Element *
const bp = 
b.GetMatrixArray();
 
  682   Element *
cp = this->GetMatrixArray();
 
 
  692template <
class Element>
 
  698      if (
a.GetNcols() != 
b.GetNrows() || 
a.GetColLwb() != 
b.GetRowLwb()) {
 
  699         Error(
"Mult", 
"A rows and B columns incompatible");
 
  703      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  704         Error(
"Mult", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  708      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  709         Error(
"Mult", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  715   const Element *
ap = 
a.GetMatrixArray();
 
  716   const Element *
bp = 
b.GetMatrixArray();
 
  717   Element *
cp = this->GetMatrixArray();
 
  718   if (
typeid(Element) == 
typeid(
Double_t))
 
  719      cblas_dsymm(
CblasRowMajor, 
CblasLeft, 
CblasUpper, fNrows, fNcols, 1.0, 
ap, 
a.GetNcols(), 
bp, 
b.GetNcols(), 0.0,
 
  721   else if (
typeid(Element) != 
typeid(
Float_t))
 
  722      cblas_ssymm(
CblasRowMajor, 
CblasLeft, 
CblasUpper, fNrows, fNcols, 1.0, 
ap, 
a.GetNcols(), 
bp, 
b.GetNcols(), 0.0,
 
  725      Error(
"Mult", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
  731   const Element *
const ap = 
a.GetMatrixArray();
 
  732   const Element *
const bp = 
b.GetMatrixArray();
 
  733   Element *
cp = this->GetMatrixArray();
 
 
  744template <
class Element>
 
  750      if (
a.GetNcols() != 
b.GetNrows() || 
a.GetColLwb() != 
b.GetRowLwb()) {
 
  751         Error(
"Mult", 
"A rows and B columns incompatible");
 
  755      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  756         Error(
"Mult", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  760      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  761         Error(
"Mult", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  767   const Element *
ap = 
a.GetMatrixArray();
 
  768   const Element *
bp = 
b.GetMatrixArray();
 
  769   Element *
cp = this->GetMatrixArray();
 
  770   if (
typeid(Element) == 
typeid(
Double_t))
 
  771      cblas_dsymm(
CblasRowMajor, 
CblasRight, 
CblasUpper, fNrows, fNcols, 1.0, 
bp, 
b.GetNcols(), 
ap, 
a.GetNcols(), 0.0,
 
  773   else if (
typeid(Element) != 
typeid(
Float_t))
 
  774      cblas_ssymm(
CblasRowMajor, 
CblasRight, 
CblasUpper, fNrows, fNcols, 1.0, 
bp, 
b.GetNcols(), 
ap, 
a.GetNcols(), 0.0,
 
  777      Error(
"Mult", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
  783   const Element *
const ap = 
a.GetMatrixArray();
 
  784   const Element *
const bp = 
b.GetMatrixArray();
 
  785   Element *
cp = this->GetMatrixArray();
 
 
  796template <
class Element>
 
  802      if (
a.GetNcols() != 
b.GetNrows() || 
a.GetColLwb() != 
b.GetRowLwb()) {
 
  803         Error(
"Mult", 
"A rows and B columns incompatible");
 
  807      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  808         Error(
"Mult", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  812      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  813         Error(
"Mult", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  819   const Element *
ap = 
a.GetMatrixArray();
 
  820   const Element *
bp = 
b.GetMatrixArray();
 
  821   Element *
cp = this->GetMatrixArray();
 
  822   if (
typeid(Element) == 
typeid(
Double_t))
 
  823      cblas_dsymm(
CblasRowMajor, 
CblasLeft, 
CblasUpper, fNrows, fNcols, 1.0, 
ap, 
a.GetNcols(), 
bp, 
b.GetNcols(), 0.0,
 
  825   else if (
typeid(Element) != 
typeid(
Float_t))
 
  826      cblas_ssymm(
CblasRowMajor, 
CblasLeft, 
CblasUpper, fNrows, fNcols, 1.0, 
ap, 
a.GetNcols(), 
bp, 
b.GetNcols(), 0.0,
 
  829      Error(
"Mult", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
  835   const Element *
const ap = 
a.GetMatrixArray();
 
  836   const Element *
const bp = 
b.GetMatrixArray();
 
  837   Element *
cp = this->GetMatrixArray();
 
 
  847template <
class Element>
 
  853      if (
a.GetNrows() != 
b.GetNrows() || 
a.GetRowLwb() != 
b.GetRowLwb()) {
 
  854         Error(
"TMult", 
"A rows and B columns incompatible");
 
  858      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  859         Error(
"TMult", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  863      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  864         Error(
"TMult", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  870   const Element *
ap = 
a.GetMatrixArray();
 
  871   const Element *
bp = 
b.GetMatrixArray();
 
  872   Element *
cp = this->GetMatrixArray();
 
  873   if (
typeid(Element) == 
typeid(
Double_t))
 
  875                  a.GetNcols(), 
bp, 
b.GetNcols(), 1.0, 
cp, 
this->fNcols);
 
  876   else if (
typeid(Element) != 
typeid(
Float_t))
 
  877      cblas_sgemm(
CblasRowMajor, 
CblasTrans, 
CblasNoTrans, fNrows, fNcols, 
a.GetNrows(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
  878                  b.GetNcols(), 1.0, 
cp, fNcols);
 
  880      Error(
"TMult", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
  885   const Element *
const ap = 
a.GetMatrixArray();
 
  886   const Element *
const bp = 
b.GetMatrixArray();
 
  887   Element *
cp = this->GetMatrixArray();
 
 
  897template <
class Element>
 
  903      if (
a.GetNrows() != 
b.GetNrows() || 
a.GetRowLwb() != 
b.GetRowLwb()) {
 
  904         Error(
"TMult", 
"A rows and B columns incompatible");
 
  908      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  909         Error(
"TMult", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  913      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  914         Error(
"TMult", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  920   const Element *
ap = 
a.GetMatrixArray();
 
  921   const Element *
bp = 
b.GetMatrixArray();
 
  922   Element *
cp = this->GetMatrixArray();
 
  923   if (
typeid(Element) == 
typeid(
Double_t))
 
  924      cblas_dgemm(
CblasRowMajor, 
CblasTrans, 
CblasNoTrans, fNrows, fNcols, 
a.GetNrows(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
  925                  b.GetNcols(), 1.0, 
cp, fNcols);
 
  926   else if (
typeid(Element) != 
typeid(
Float_t))
 
  927      cblas_sgemm(
CblasRowMajor, 
CblasTrans, 
CblasNoTrans, fNrows, fNcols, 
a.GetNrows(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
  928                  b.GetNcols(), 1.0, 
cp, fNcols);
 
  930      Error(
"TMult", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
  935   const Element *
const ap = 
a.GetMatrixArray();
 
  936   const Element *
const bp = 
b.GetMatrixArray();
 
  937   Element *
cp = this->GetMatrixArray();
 
 
  946template <
class Element>
 
  953      if (
a.GetNcols() != 
b.GetNcols() || 
a.GetColLwb() != 
b.GetColLwb()) {
 
  954         Error(
"MultT", 
"A rows and B columns incompatible");
 
  958      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
  959         Error(
"MultT", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
  963      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
  964         Error(
"MultT", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
  970   const Element *
ap = 
a.GetMatrixArray();
 
  971   const Element *
bp = 
b.GetMatrixArray();
 
  972   Element *
cp = this->GetMatrixArray();
 
  973   if (
typeid(Element) == 
typeid(
Double_t))
 
  974      cblas_dgemm(
CblasRowMajor, 
CblasNoTrans, 
CblasTrans, fNrows, fNcols, 
a.GetNcols(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
  975                  b.GetNcols(), 1.0, 
cp, fNcols);
 
  976   else if (
typeid(Element) != 
typeid(
Float_t))
 
  977      cblas_sgemm(
CblasRowMajor, 
CblasNoTrans, 
CblasTrans, fNrows, fNcols, 
a.GetNcols(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
  978                  b.GetNcols(), 1.0, 
cp, fNcols);
 
  980      Error(
"MultT", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
  986   const Element *
const ap = 
a.GetMatrixArray();
 
  987   const Element *
const bp = 
b.GetMatrixArray();
 
  988   Element *
cp = this->GetMatrixArray();
 
 
  998template <
class Element>
 
 1004      if (
a.GetNcols() != 
b.GetNcols() || 
a.GetColLwb() != 
b.GetColLwb()) {
 
 1005         Error(
"MultT", 
"A rows and B columns incompatible");
 
 1009      if (this->GetMatrixArray() == 
a.GetMatrixArray()) {
 
 1010         Error(
"MultT", 
"this->GetMatrixArray() == a.GetMatrixArray()");
 
 1014      if (this->GetMatrixArray() == 
b.GetMatrixArray()) {
 
 1015         Error(
"MultT", 
"this->GetMatrixArray() == b.GetMatrixArray()");
 
 1021   const Element *
ap = 
a.GetMatrixArray();
 
 1022   const Element *
bp = 
b.GetMatrixArray();
 
 1023   Element *
cp = this->GetMatrixArray();
 
 1024   if (
typeid(Element) == 
typeid(
Double_t))
 
 1026                  a.GetNcols(), 
bp, 
b.GetNcols(), 1.0, 
cp, 
this->fNcols);
 
 1027   else if (
typeid(Element) != 
typeid(
Float_t))
 
 1028      cblas_sgemm(
CblasRowMajor, 
CblasNoTrans, 
CblasTrans, fNrows, fNcols, 
a.GetNcols(), 1.0, 
ap, 
a.GetNcols(), 
bp,
 
 1029                  b.GetNcols(), 1.0, 
cp, fNcols);
 
 1031      Error(
"MultT", 
"type %s not implemented in BLAS library", 
typeid(Element));
 
 1033   const Int_t na = 
a.GetNoElements();
 
 1034   const Int_t nb = 
b.GetNoElements();
 
 1037   const Element *
const ap = 
a.GetMatrixArray();
 
 1038   const Element *
const bp = 
b.GetMatrixArray();
 
 1039   Element *
cp = this->GetMatrixArray();
 
 
 1048template <
class Element>
 
 1067   this->fNelems = this->fNrows * this->fNcols;
 
 
 1081template <
class Element>
 
 1088         Error(
"GetSub", 
"row_lwb out of bounds");
 
 1092         Error(
"GetSub", 
"col_lwb out of bounds");
 
 1096         Error(
"GetSub", 
"row_upb out of bounds");
 
 1100         Error(
"GetSub", 
"col_upb out of bounds");
 
 1104         Error(
"GetSub", 
"row_upb < row_lwb || col_upb < col_lwb");
 
 1122   if (
target.GetRowIndexArray() && 
target.GetColIndexArray()) {
 
 1129      const Element *
ap = this->GetMatrixArray() + (
row_lwb - this->fRowLwb) * this->fNcols + (
col_lwb - this->fColLwb);
 
 1130      Element *
bp = 
target.GetMatrixArray();
 
 
 1148template <
class Element>
 
 1156         Error(
"SetSub", 
"row_lwb outof bounds");
 
 1160         Error(
"SetSub", 
"col_lwb outof bounds");
 
 1165         Error(
"SetSub", 
"source matrix too large");
 
 1173   if (
source.GetRowIndexArray() && 
source.GetColIndexArray()) {
 
 1182      const Element *
bp = 
source.GetMatrixArray();
 
 1183      Element *
ap = this->GetMatrixArray() + (
row_lwb - this->fRowLwb) * this->fNcols + (
col_lwb - this->fColLwb);
 
 
 1202template <
class Element>
 
 1206   if (!this->fIsOwner) {
 
 1207      Error(
"ResizeTo(Int_t,Int_t)", 
"Not owner of data array,cannot resize");
 
 1211   if (this->fNelems > 0) {
 
 1212      if (this->fNrows == 
nrows && this->fNcols == 
ncols)
 
 1215         this->fNrows = 
nrows;
 
 1216         this->fNcols = 
ncols;
 
 1232      if (this->fNelems > this->kSizeMax || 
nelems_old > this->kSizeMax)
 
 
 1266template <
class Element>
 
 1271   if (!this->fIsOwner) {
 
 1272      Error(
"ResizeTo(Int_t,Int_t,Int_t,Int_t)", 
"Not owner of data array,cannot resize");
 
 1279   if (this->fNelems > 0) {
 
 1306      if (this->fNelems > this->kSizeMax || 
nelems_old > this->kSizeMax)
 
 1331                         (this->fNcols - 
ncols_copy) * 
sizeof(Element));
 
 
 1354template <
class Element>
 
 1367template <
class Element>
 
 1389template <
class Element>
 
 1394      std::copy(tmp.GetMatrixArray(), tmp.GetMatrixArray() + 
this->GetNoElements(), 
this->GetMatrixArray());
 
 
 1403template <
class Element>
 
 1411      if (this->GetNrows() != this->GetNcols() || this->GetRowLwb() != this->GetColLwb()) {
 
 1412         Error(
"Invert()", 
"matrix should be square");
 
 1414         Element *
pM = this->GetMatrixArray();
 
 1416            Error(
"InvertFast", 
"matrix is singular");
 
 1426      TMatrixTCramerInv::Inv2x2<Element>(*
this, 
det);
 
 1430      TMatrixTCramerInv::Inv3x3<Element>(*
this, 
det);
 
 1434      TMatrixTCramerInv::Inv4x4<Element>(*
this, 
det);
 
 1438      TMatrixTCramerInv::Inv5x5<Element>(*
this, 
det);
 
 1442      TMatrixTCramerInv::Inv6x6<Element>(*
this, 
det);
 
 
 1454template <
class Element>
 
 1460   if (this->GetMatrixArray() == 
source.GetMatrixArray()) {
 
 1461      Element *
ap = this->GetMatrixArray();
 
 1462      if (this->fNrows == this->fNcols && this->fRowLwb == this->fColLwb) {
 
 1463         for (
Int_t i = 0; i < this->fNrows; i++) {
 
 1465            for (
Int_t j = i + 1; 
j < this->fNcols; 
j++) {
 
 1493      if (this->fNrows != 
source.GetNcols() || this->fNcols != 
source.GetNrows() ||
 
 1494          this->fRowLwb != 
source.GetColLwb() || this->fColLwb != 
source.GetRowLwb()) {
 
 1495         Error(
"Transpose", 
"matrix has wrong shape");
 
 1499      const Element *
sp1 = 
source.GetMatrixArray();
 
 1500      const Element *
scp = 
sp1; 
 
 1501      Element *
tp = this->GetMatrixArray();
 
 1502      const Element *
const tp_last = this->GetMatrixArray() + this->fNelems;
 
 1507         const Element *
sp2 = 
scp++;
 
 1512            sp2 += this->fNrows;
 
 
 1525template <
class Element>
 
 1532         Error(
"Rank1Update", 
"vector too short");
 
 1537   const Element *
const pv = 
v.GetMatrixArray();
 
 1538   Element *
mp = this->GetMatrixArray();
 
 1540   for (
Int_t i = 0; i < this->fNrows; i++) {
 
 1541      const Element tmp = alpha * 
pv[i];
 
 1542      for (
Int_t j = 0; 
j < this->fNcols; 
j++)
 
 1543         *
mp++ += tmp * 
pv[
j];
 
 
 1553template <
class Element>
 
 1561      if (
v1.GetNoElements() < 
this->fNrows) {
 
 1562         Error(
"Rank1Update", 
"vector v1 too short");
 
 1566      if (
v2.GetNoElements() < 
this->fNcols) {
 
 1567         Error(
"Rank1Update", 
"vector v2 too short");
 
 1572   const Element *
const pv1 = 
v1.GetMatrixArray();
 
 1573   const Element *
const pv2 = 
v2.GetMatrixArray();
 
 1574   Element *
mp = this->GetMatrixArray();
 
 1576   for (
Int_t i = 0; i < this->fNrows; i++) {
 
 1577      const Element tmp = alpha * 
pv1[i];
 
 1578      for (
Int_t j = 0; 
j < this->fNcols; 
j++)
 
 
 1588template <
class Element>
 
 1594      if (this->fNcols != this->fNrows || this->fColLwb != this->fRowLwb) {
 
 1595         Error(
"Similarity(const TVectorT &)", 
"matrix is not square");
 
 1599      if (this->fNcols != 
v.GetNrows() || 
this->fColLwb != 
v.GetLwb()) {
 
 1600         Error(
"Similarity(const TVectorT &)", 
"vector and matrix incompatible");
 
 1605   const Element *
mp = this->GetMatrixArray(); 
 
 1606   const Element *
vp = 
v.GetMatrixArray();     
 
 1610   const Element *
const vp_last = 
vp + 
v.GetNrows();
 
 1618   R__ASSERT(
mp == this->GetMatrixArray() + this->GetNoElements());
 
 
 1629template <
class Element>
 
 1635      if (
v.GetNoElements() < 
this->fNrows) {
 
 1636         Error(
"NormByColumn", 
"vector shorter than matrix column");
 
 1645   const Element *
pv = 
v.GetMatrixArray();
 
 1646   Element *
mp = this->GetMatrixArray();
 
 1647   const Element *
const mp_last = 
mp + this->fNelems;
 
 1651         for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 1655               Error(
"NormbyColumn", 
"vector element %ld is zero", 
Long_t(
pv - 
v.GetMatrixArray()));
 
 1662         for (
Int_t j = 0; 
j < this->fNcols; 
j++)
 
 
 1675template <
class Element>
 
 1681      if (
v.GetNoElements() < 
this->fNcols) {
 
 1682         Error(
"NormByRow", 
"vector shorter than matrix column");
 
 1691   const Element *
pv0 = 
v.GetMatrixArray();
 
 1692   const Element *
pv = 
pv0;
 
 1693   Element *
mp = this->GetMatrixArray();
 
 1694   const Element *
const mp_last = 
mp + this->fNelems;
 
 1698         for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 1708         for (
Int_t j = 0; 
j < this->fNcols; 
j++)
 
 
 1718template <
class Element>
 
 1722      Error(
"operator=(const TMatrixT &)", 
"matrices not compatible");
 
 1726   if (this->GetMatrixArray() != 
source.GetMatrixArray()) {
 
 1728      memcpy(fElements, 
source.GetMatrixArray(), 
this->fNelems * 
sizeof(Element));
 
 1729      this->fTol = 
source.GetTol();
 
 
 1737template <
class Element>
 
 1741      Error(
"operator=(const TMatrixTSym &)", 
"matrices not compatible");
 
 1745   if (this->GetMatrixArray() != 
source.GetMatrixArray()) {
 
 1747      memcpy(fElements, 
source.GetMatrixArray(), 
this->fNelems * 
sizeof(Element));
 
 1748      this->fTol = 
source.GetTol();
 
 
 1756template <
class Element>
 
 1761      Error(
"operator=(const TMatrixTSparse &", 
"matrices not compatible");
 
 1765   if (this->GetMatrixArray() != 
source.GetMatrixArray()) {
 
 1767      memset(fElements, 0, this->fNelems * 
sizeof(Element));
 
 1769      const Element *
const sp = 
source.GetMatrixArray();
 
 1770      Element *
tp = this->GetMatrixArray();
 
 1782      this->fTol = 
source.GetTol();
 
 
 1790template <
class Element>
 
 1797      Error(
"operator=(const TMatrixTLazy&)", 
"matrix is incompatible with " 
 1798                                              "the assigned Lazy matrix");
 
 
 1809template <
class Element>
 
 1814   Element *
ep = this->GetMatrixArray();
 
 1815   const Element *
const ep_last = 
ep + this->fNelems;
 
 
 1825template <
class Element>
 
 1830   Element *
ep = this->GetMatrixArray();
 
 1831   const Element *
const ep_last = 
ep + this->fNelems;
 
 
 1841template <
class Element>
 
 1846   Element *
ep = this->GetMatrixArray();
 
 1847   const Element *
const ep_last = 
ep + this->fNelems;
 
 
 1857template <
class Element>
 
 1862   Element *
ep = this->GetMatrixArray();
 
 1863   const Element *
const ep_last = 
ep + this->fNelems;
 
 
 1873template <
class Element>
 
 1877      Error(
"operator+=(const TMatrixT &)", 
"matrices not compatible");
 
 1881   const Element *
sp = 
source.GetMatrixArray();
 
 1882   Element *
tp = this->GetMatrixArray();
 
 1883   const Element *
const tp_last = 
tp + this->fNelems;
 
 
 1893template <
class Element>
 
 1897      Error(
"operator+=(const TMatrixTSym &)", 
"matrices not compatible");
 
 1901   const Element *
sp = 
source.GetMatrixArray();
 
 1902   Element *
tp = this->GetMatrixArray();
 
 1903   const Element *
const tp_last = 
tp + this->fNelems;
 
 
 1913template <
class Element>
 
 1917      Error(
"operator=-(const TMatrixT &)", 
"matrices not compatible");
 
 1921   const Element *
sp = 
source.GetMatrixArray();
 
 1922   Element *
tp = this->GetMatrixArray();
 
 1923   const Element *
const tp_last = 
tp + this->fNelems;
 
 
 1933template <
class Element>
 
 1937      Error(
"operator=-(const TMatrixTSym &)", 
"matrices not compatible");
 
 1941   const Element *
sp = 
source.GetMatrixArray();
 
 1942   Element *
tp = this->GetMatrixArray();
 
 1943   const Element *
const tp_last = 
tp + this->fNelems;
 
 
 1955template <
class Element>
 
 1961      if (this->fNcols != 
source.GetNrows() || 
this->fColLwb != 
source.GetRowLwb() ||
 
 1963         Error(
"operator*=(const TMatrixT &)", 
"source matrix has wrong shape");
 
 1971   if (this->GetMatrixArray() == 
source.GetMatrixArray()) {
 
 1974      sp = tmp.GetMatrixArray();
 
 1979   Element 
work[kWorkMax];
 
 1982   if (this->fNcols > kWorkMax) {
 
 1984      trp = 
new Element[this->fNcols];
 
 1987   Element *
cp = this->GetMatrixArray();
 
 1988   const Element *
trp0 = 
cp; 
 
 1992      for (
const Element *
scp = 
sp; 
scp < 
sp + this->fNcols;) { 
 
 1995         for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 1997            scp += this->fNcols;
 
 2002      trp0 += this->fNcols; 
 
 
 2017template <
class Element>
 
 2023      if (this->fNcols != 
source.GetNrows() || 
this->fColLwb != 
source.GetRowLwb()) {
 
 2024         Error(
"operator*=(const TMatrixTSym &)", 
"source matrix has wrong shape");
 
 2032   if (this->GetMatrixArray() == 
source.GetMatrixArray()) {
 
 2035      sp = tmp.GetMatrixArray();
 
 2040   Element 
work[kWorkMax];
 
 2043   if (this->fNcols > kWorkMax) {
 
 2045      trp = 
new Element[this->fNcols];
 
 2048   Element *
cp = this->GetMatrixArray();
 
 2049   const Element *
trp0 = 
cp; 
 
 2053      for (
const Element *
scp = 
sp; 
scp < 
sp + this->fNcols;) { 
 
 2056         for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 2058            scp += this->fNcols;
 
 2063      trp0 += this->fNcols; 
 
 
 2078template <
class Element>
 
 2084      if (this->fNcols != 
diag.GetNdiags()) {
 
 2085         Error(
"operator*=(const TMatrixTDiag_const &)", 
"wrong diagonal length");
 
 2090   Element *
mp = this->GetMatrixArray(); 
 
 2091   const Element *
const mp_last = 
mp + this->fNelems;
 
 2094      const Element *
dp = 
diag.GetPtr();
 
 2095      for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 
 2108template <
class Element>
 
 2114      if (this->fNcols != 
diag.GetNdiags()) {
 
 2115         Error(
"operator/=(const TMatrixTDiag_const &)", 
"wrong diagonal length");
 
 2120   Element *
mp = this->GetMatrixArray(); 
 
 2121   const Element *
const mp_last = 
mp + this->fNelems;
 
 2124      const Element *
dp = 
diag.GetPtr();
 
 2125      for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 2129            Error(
"operator/=", 
"%d-diagonal element is zero", 
j);
 
 
 2143template <
class Element>
 
 2151      if (this->fNrows != mt->GetNrows()) {
 
 2152         Error(
"operator*=(const TMatrixTColumn_const &)", 
"wrong column length");
 
 2157   const Element *
const endp = col.GetPtr() + mt->GetNoElements();
 
 2158   Element *
mp = this->GetMatrixArray(); 
 
 2159   const Element *
const mp_last = 
mp + this->fNelems;
 
 2160   const Element *
cp = col.GetPtr(); 
 
 2164      for (
Int_t j = 0; 
j < this->fNcols; 
j++)
 
 
 2176template <
class Element>
 
 2184      if (this->fNrows != mt->GetNrows()) {
 
 2185         Error(
"operator/=(const TMatrixTColumn_const &)", 
"wrong column matrix");
 
 2190   const Element *
const endp = col.GetPtr() + mt->GetNoElements();
 
 2191   Element *
mp = this->GetMatrixArray(); 
 
 2192   const Element *
const mp_last = 
mp + this->fNelems;
 
 2193   const Element *
cp = col.GetPtr(); 
 
 2198         for (
Int_t j = 0; 
j < this->fNcols; 
j++)
 
 2202         Error(
"operator/=", 
"%d-row of matrix column is zero", 
icol);
 
 
 2215template <
class Element>
 
 2223      if (this->fNcols != mt->GetNcols()) {
 
 2224         Error(
"operator*=(const TMatrixTRow_const &)", 
"wrong row length");
 
 2229   const Element *
const endp = row.GetPtr() + mt->GetNoElements();
 
 2230   Element *
mp = this->GetMatrixArray(); 
 
 2231   const Element *
const mp_last = 
mp + this->fNelems;
 
 2234      const Element *
rp = row.GetPtr(); 
 
 2235      for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 
 2249template <
class Element>
 
 2256   if (this->fNcols != mt->GetNcols()) {
 
 2257      Error(
"operator/=(const TMatrixTRow_const &)", 
"wrong row length");
 
 2261   const Element *
const endp = row.GetPtr() + mt->GetNoElements();
 
 2262   Element *
mp = this->GetMatrixArray(); 
 
 2263   const Element *
const mp_last = 
mp + this->fNelems;
 
 2266      const Element *
rp = row.GetPtr(); 
 
 2267      for (
Int_t j = 0; 
j < this->fNcols; 
j++) {
 
 2272            Error(
"operator/=", 
"%d-col of matrix row is zero", 
j);
 
 
 2288template <
class Element>
 
 2291   if (!this->IsSymmetric())
 
 2292      Warning(
"EigenVectors(TVectorT &)", 
"Only real part of eigen-values will be returned");
 
 2296   return eigen.GetEigenVectors();
 
 
 2302template <
class Element>
 
 2313template <
class Element>
 
 2324template <
class Element>
 
 2333template <
class Element>
 
 2344template <
class Element>
 
 2353template <
class Element>
 
 2364template <
class Element>
 
 2375template <
class Element>
 
 2384template <
class Element>
 
 2395template <
class Element>
 
 2404template <
class Element>
 
 2415template <
class Element>
 
 2424template <
class Element>
 
 2434template <
class Element>
 
 2444template <
class Element>
 
 2454template <
class Element>
 
 2465template <
class Element>
 
 2471      Error(
"operator&&(const TMatrixT&,const TMatrixT&)", 
"matrices not compatible");
 
 2477   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2478   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2479   Element *
tp = 
target.GetMatrixArray();
 
 2482      *
tp++ = (*
sp1++ != 0.0 && *
sp2++ != 0.0);
 
 
 2490template <
class Element>
 
 2496      Error(
"operator&&(const TMatrixT&,const TMatrixTSym&)", 
"matrices not compatible");
 
 2502   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2503   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2504   Element *
tp = 
target.GetMatrixArray();
 
 2507      *
tp++ = (*
sp1++ != 0.0 && *
sp2++ != 0.0);
 
 
 2515template <
class Element>
 
 2524template <
class Element>
 
 2530      Error(
"operator||(const TMatrixT&,const TMatrixT&)", 
"matrices not compatible");
 
 2536   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2537   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2538   Element *
tp = 
target.GetMatrixArray();
 
 2541      *
tp++ = (*
sp1++ != 0.0 || *
sp2++ != 0.0);
 
 
 2549template <
class Element>
 
 2555      Error(
"operator||(const TMatrixT&,const TMatrixTSym&)", 
"matrices not compatible");
 
 2561   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2562   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2563   Element *
tp = 
target.GetMatrixArray();
 
 2566      *
tp++ = (*
sp1++ != 0.0 || *
sp2++ != 0.0);
 
 
 2574template <
class Element>
 
 2583template <
class Element>
 
 2589      Error(
"operator|(const TMatrixT&,const TMatrixT&)", 
"matrices not compatible");
 
 2595   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2596   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2597   Element *
tp = 
target.GetMatrixArray();
 
 2600      *
tp++ = (*sp1) > (*sp2);
 
 
 2611template <
class Element>
 
 2617      Error(
"operator>(const TMatrixT&,const TMatrixTSym&)", 
"matrices not compatible");
 
 2623   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2624   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2625   Element *
tp = 
target.GetMatrixArray();
 
 2628      *
tp++ = (*sp1) > (*sp2);
 
 
 2639template <
class Element>
 
 2648template <
class Element>
 
 2654      Error(
"operator>=(const TMatrixT&,const TMatrixT&)", 
"matrices not compatible");
 
 2660   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2661   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2662   Element *
tp = 
target.GetMatrixArray();
 
 2665      *
tp++ = (*sp1) >= (*sp2);
 
 
 2676template <
class Element>
 
 2682      Error(
"operator>=(const TMatrixT&,const TMatrixTSym&)", 
"matrices not compatible");
 
 2688   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2689   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2690   Element *
tp = 
target.GetMatrixArray();
 
 2693      *
tp++ = (*sp1) >= (*sp2);
 
 
 2704template <
class Element>
 
 2713template <
class Element>
 
 2719      Error(
"operator<=(const TMatrixT&,const TMatrixT&)", 
"matrices not compatible");
 
 2725   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2726   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2727   Element *
tp = 
target.GetMatrixArray();
 
 2730      *
tp++ = (*sp1) <= (*sp2);
 
 2741template <
class Element>
 
 2747      Error(
"operator<=(const TMatrixT&,const TMatrixTSym&)", 
"matrices not compatible");
 
 2753   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2754   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2755   Element *
tp = 
target.GetMatrixArray();
 
 2758      *
tp++ = (*sp1) <= (*sp2);
 
 2769template <
class Element>
 
 2778template <
class Element>
 
 2784      Error(
"operator<(const TMatrixT&,const TMatrixT&)", 
"matrices not compatible");
 
 2788   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2789   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2790   Element *
tp = 
target.GetMatrixArray();
 
 2793      *
tp++ = (*sp1) < (*sp2);
 
 
 2804template <
class Element>
 
 2810      Error(
"operator<(const TMatrixT&,const TMatrixTSym&)", 
"matrices not compatible");
 
 2816   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2817   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2818   Element *
tp = 
target.GetMatrixArray();
 
 2821      *
tp++ = (*sp1) < (*sp2);
 
 2832template <
class Element>
 
 2841template <
class Element>
 
 2847      Error(
"operator!=(const TMatrixT&,const TMatrixT&)", 
"matrices not compatible");
 
 2853   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2854   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2855   Element *
tp = 
target.GetMatrixArray();
 
 2858      *
tp++ = (*sp1) != (*sp2);
 
 
 2869template <
class Element>
 
 2875      Error(
"operator!=(const TMatrixT&,const TMatrixTSym&)", 
"matrices not compatible");
 
 2881   const Element *
sp1 = 
source1.GetMatrixArray();
 
 2882   const Element *
sp2 = 
source2.GetMatrixArray();
 
 2883   Element *
tp = 
target.GetMatrixArray();
 
 2886      *
tp++ = (*sp1) != (*sp2);
 
 
 2897template <
class Element>
 
 2907template<class Element>
 
 2908TMatrixT<Element> operator!=(const TMatrixT<Element> &source1,Element val)
 
 2910   TMatrixT<Element> target; target.ResizeTo(source1);
 
 2912   const Element *sp = source1.GetMatrixArray();
 
 2913         Element *tp = target.GetMatrixArray();
 
 2914   const Element * const tp_last = tp+target.GetNoElements();
 
 2915   while (tp != tp_last) {
 
 2916      *tp++ = (*sp != val); sp++;
 
 2925template<class Element>
 
 2926TMatrixT<Element> operator!=(Element val,const TMatrixT<Element> &source1)
 
 2928   return operator!=(source1,val);
 
 2935template <
class Element>
 
 2939      ::Error(
"Add(TMatrixT &,Element,const TMatrixT &)", 
"matrices not compatible");
 
 2943   const Element *
sp = 
source.GetMatrixArray();
 
 2944   Element *
tp = 
target.GetMatrixArray();
 
 2949   } 
else if (
scalar == 1.) {
 
 
 2963template <
class Element>
 
 2968      ::Error(
"Add(TMatrixT &,Element,const TMatrixTSym &)", 
"matrices not compatible");
 
 2972   const Element *
sp = 
source.GetMatrixArray();
 
 2973   Element *
tp = 
target.GetMatrixArray();
 
 
 2984template <
class Element>
 
 2988      ::Error(
"ElementMult(TMatrixT &,const TMatrixT &)", 
"matrices not compatible");
 
 2992   const Element *
sp = 
source.GetMatrixArray();
 
 2993   Element *
tp = 
target.GetMatrixArray();
 
 
 3004template <
class Element>
 
 3008      ::Error(
"ElementMult(TMatrixT &,const TMatrixTSym &)", 
"matrices not compatible");
 
 3012   const Element *
sp = 
source.GetMatrixArray();
 
 3013   Element *
tp = 
target.GetMatrixArray();
 
 
 3024template <
class Element>
 
 3028      ::Error(
"ElementDiv(TMatrixT &,const TMatrixT &)", 
"matrices not compatible");
 
 3032   const Element *
sp = 
source.GetMatrixArray();
 
 3033   Element *
tp = 
target.GetMatrixArray();
 
 
 3052template <
class Element>
 
 3056      ::Error(
"ElementDiv(TMatrixT &,const TMatrixTSym &)", 
"matrices not compatible");
 
 3060   const Element *
sp = 
source.GetMatrixArray();
 
 3061   Element *
tp = 
target.GetMatrixArray();
 
 
 3080template <
class Element>
 
 3084   const Element *
arp0 = 
ap; 
 
 
 3103template <
class Element>
 
 3107   const Element *
acp0 = 
ap; 
 
 
 3127template <
class Element>
 
 3131   const Element *
arp0 = 
ap; 
 
 3133      const Element *
brp0 = 
bp; 
 
 
 3150template <
class Element>
 
 3153   if (
R__b.IsReading()) {
 
 3159      } 
else if (
R__v == 2) { 
 
 3163         R__b >> this->fNrows;
 
 3164         R__b >> this->fNcols;
 
 3165         R__b >> this->fNelems;
 
 3166         R__b >> this->fRowLwb;
 
 3167         R__b >> this->fColLwb;
 
 3171            if (this->fNelems > 0) {
 
 3172               fElements = 
new Element[this->fNelems];
 
 3173               R__b.ReadFastArray(fElements, this->fNelems);
 
 3175               fElements = 
nullptr;
 
 3181         R__b >> this->fNrows;
 
 3182         R__b >> this->fNcols;
 
 3183         R__b >> this->fRowLwb;
 
 3184         R__b >> this->fColLwb;
 
 3185         this->fNelems = 
R__b.ReadArray(fElements);
 
 3189      if (
R__v <= 2 && fElements) {
 
 3190         for (
Int_t i = 0; i < this->fNrows; i++) {
 
 3192            for (
Int_t j = i; 
j < this->fNcols; 
j++) {
 
 3194               const Element tmp = fElements[
off_i + 
j];
 
 3196               fElements[
off_j + i] = tmp;
 
 3202            memcpy(fDataStack, fElements, this->fNelems * 
sizeof(Element));
 
 3205         fElements = fDataStack;
 
 3206      } 
else if (this->fNelems < 0)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.
Bool_t operator<=(const TDatime &d1, const TDatime &d2)
Bool_t operator>(const TDatime &d1, const TDatime &d2)
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
Bool_t operator>=(const TDatime &d1, const TDatime &d2)
Bool_t operator<(const TDatime &d1, const TDatime &d2)
#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.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
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
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
TTime operator*(const TTime &t1, const TTime &t2)
TTime operator-(const TTime &t1, const TTime &t2)
Buffer base class used for serializing objects.
static Bool_t InvertLU(TMatrixD &a, Double_t tol, Double_t *det=nullptr)
Calculate matrix inversion through in place forward/backward substitution.
virtual TMatrixTBase< Element > & SetMatrixArray(const Element *data, Option_t *option="")
Copy array data to matrix .
TMatrixTBase< Element > & GetSub(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, TMatrixTBase< Element > &target, Option_t *option="S") const override
Get submatrix [row_lwb..row_upb] x [col_lwb..col_upb]; The indexing range of the returned matrix depe...
TMatrixT< Element > & Rank1Update(const TVectorT< Element > &v, Element alpha=1.0)
Perform a rank 1 operation on matrix A: A += alpha * v * v^T.
TMatrixT< Element > & Use(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Element *data)
Use the array data to fill the matrix ([row_lwb..row_upb] x [col_lwb..col_upb])
void Delete_m(Int_t size, Element *&)
Delete data pointer m, if it was assigned on the heap.
void Streamer(TBuffer &) override
Stream an object of class TMatrixT.
TMatrixT< Element > & operator*=(Element val)
Multiply every element of the matrix with val.
TMatrixT< Element > & operator=(const TMatrixT< Element > &source)
Assignment operator.
TMatrixT< Element > & NormByRow(const TVectorT< Element > &v, Option_t *option="D")
Multiply/divide matrix rows with a vector: option: "D" : b(i,j) = a(i,j)/v(j) i = 0,...
void Minus(const TMatrixT< Element > &a, const TMatrixT< Element > &b)
General matrix subtraction. Replace this matrix with C such that C = A - B.
Element Similarity(const TVectorT< Element > &v) const
Calculate scalar v * (*this) * v^T.
void Plus(const TMatrixT< Element > &a, const TMatrixT< Element > &b)
General matrix summation. Replace this matrix with C such that C = A + B.
TMatrixT< Element > & operator-=(Element val)
Subtract val from every element of the matrix.
Double_t Determinant() const override
Return the matrix determinant.
TMatrixT< Element > & Transpose(const TMatrixT< Element > &source)
Transpose matrix source.
void MultT(const TMatrixT< Element > &a, const TMatrixT< Element > &b)
General matrix multiplication. Replace this matrix with C such that C = A * B^T.
TMatrixT< Element > & InvertFast(Double_t *det=nullptr)
Invert the matrix and calculate its determinant, however upto (6x6) a fast Cramer inversion is used .
TMatrixTBase< Element > & SetSub(Int_t row_lwb, Int_t col_lwb, const TMatrixTBase< Element > &source) override
Insert matrix source starting at [row_lwb][col_lwb], thereby overwriting the part [row_lwb....
Element * New_m(Int_t size)
Return data pointer .
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
TMatrixT< Element > & Invert(Double_t *det=nullptr)
Invert the matrix and calculate its determinant.
void Allocate(Int_t nrows, Int_t ncols, Int_t row_lwb=0, Int_t col_lwb=0, Int_t init=0, Int_t=-1)
Allocate new matrix.
TMatrixT< Element > & operator+=(Element val)
Add val to every element of the matrix.
TMatrixT< Element > & NormByColumn(const TVectorT< Element > &v, Option_t *option="D")
Multiply/divide matrix columns by a vector: option: "D" : b(i,j) = a(i,j)/v(i) i = 0,...
void TMult(const TMatrixT< Element > &a, const TMatrixT< Element > &b)
Replace this matrix with C such that C = A' * B.
const TMatrixT< Element > EigenVectors(TVectorT< Element > &eigenValues) const
Return a matrix containing the eigen-vectors ordered by descending values of Re^2+Im^2 of the complex...
void Mult(const TMatrixT< Element > &a, const TMatrixT< Element > &b)
General matrix multiplication. Replace this matrix with C such that C = A * B.
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 .
TMatrixT< Element > & operator/=(const TMatrixTDiag_const< Element > &diag)
Divide a matrix row by the diagonal of another matrix matrix(i,j) /= diag(j)
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
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
TMatrixT< Element > operator!=(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
logical operation source1 != source2
void AMultBt(const Element *const ap, Int_t na, Int_t ncolsa, const Element *const bp, Int_t nb, Int_t ncolsb, Element *cp)
Elementary routine to calculate matrix multiplication A*B^T.
void AMultB(const Element *const ap, Int_t na, Int_t ncolsa, const Element *const bp, Int_t nb, Int_t ncolsb, Element *cp)
Elementary routine to calculate matrix multiplication A*B.
TMatrixT< Element > operator+(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
operation this = source1+source2
void AtMultB(const Element *const ap, Int_t ncolsa, const Element *const bp, Int_t nb, Int_t ncolsb, Element *cp)
Elementary routine to calculate matrix multiplication A^T*B.
TMatrixT< Element > operator>=(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
logical operation source1 >= source2
TMatrixT< Element > & ElementMult(TMatrixT< Element > &target, const TMatrixT< Element > &source)
Multiply target by the source, element-by-element.
TMatrixT< Element > operator||(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
Logical OR.
TMatrixT< Element > operator<(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
logical operation source1 < source2
TMatrixT< Element > operator>(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
logical operation source1 > source2
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.
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
TMatrixT< Element > operator<=(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
logical operation source1 <= source2
TMatrixT< Element > operator&&(const TMatrixT< Element > &source1, const TMatrixT< Element > &source2)
Logical AND.
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 .