X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliSymMatrix.h;h=1f0eaea9492932aa51a2e8de0dbb06c757871877;hb=e0677b19cbc414afdfa53e98d18cd6efb6556a10;hp=f22d5d54ea227ebbda942cd31956a4358dfc7fd4;hpb=de34b538ab40a03fb2cfcedb2f9b2618cb190caf;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliSymMatrix.h b/STEER/AliSymMatrix.h index f22d5d54ea2..1f0eaea9492 100644 --- a/STEER/AliSymMatrix.h +++ b/STEER/AliSymMatrix.h @@ -1,5 +1,17 @@ #ifndef ALISYMMATRIX_H #define ALISYMMATRIX_H +/**********************************************************************************************/ +/* Fast symmetric matrix with dynamically expandable size. */ +/* Only part can be used for matrix operations. It is defined as: */ +/* fNCols: rows built by constructor (GetSizeBooked) */ +/* fNRows: number of rows added dynamically (automatically added on assignment to row) */ +/* GetNRowAdded */ +/* fNRowIndex: total size (fNCols+fNRows), GetSize */ +/* fRowLwb : actual size to used for given operation, by default = total size, GetSizeUsed */ +/* */ +/* Author: ruben.shahoyan@cern.ch */ +/* */ +/**********************************************************************************************/ #include #include @@ -20,8 +32,12 @@ class AliSymMatrix : public AliMatrixSq { void Reset(); // Int_t GetSize() const {return fNrowIndex;} + Int_t GetSizeUsed() const {return fRowLwb;} + Int_t GetSizeBooked() const {return fNcols;} + Int_t GetSizeAdded() const {return fNrows;} Float_t GetDensity() const; AliSymMatrix& operator=(const AliSymMatrix& src); + AliSymMatrix& operator+=(const AliSymMatrix& src); Double_t operator()(Int_t rown, Int_t coln) const; Double_t& operator()(Int_t rown, Int_t coln); // @@ -32,6 +48,7 @@ class AliSymMatrix : public AliMatrixSq { // void Print(Option_t* option="") const; void AddRows(int nrows=1); + void SetSizeUsed(Int_t sz) {fRowLwb = sz;} // void Scale(Double_t coeff); void MultiplyByVec(Double_t* vecIn, Double_t* vecOut) const;