1 #ifndef ALIRECTMATRIX_H
2 #define ALIRECTMATRIX_H
7 class AliRectMatrix : public TObject {
11 AliRectMatrix(Int_t nrow,Int_t ncol);
12 AliRectMatrix(const AliRectMatrix &src);
13 virtual ~AliRectMatrix();
15 Int_t GetNRows() const {return fNRows;}
16 Int_t GetNCols() const {return fNCols;}
18 Double_t Query(Int_t rown, Int_t coln) const {return operator()(rown,coln);}
20 AliRectMatrix& operator=(const AliRectMatrix& src);
21 Double_t operator()(Int_t rown, Int_t coln) const;
22 Double_t& operator()(Int_t rown, Int_t coln);
23 Double_t* operator()(Int_t row) const {return GetRow(row);}
24 Double_t* GetRow(Int_t row) const {return fRows[row];}
28 virtual void Print(Option_t* option="") const;
32 Int_t fNRows; // Number of rows
33 Int_t fNCols; // Number of columns
34 Double_t **fRows; // pointers on rows
36 ClassDef(AliRectMatrix,0) //Rectangular Matrix Class
39 //___________________________________________________________
40 inline Double_t AliRectMatrix::operator()(Int_t row, Int_t col) const
42 return (const Double_t&) GetRow(row)[col];
45 //___________________________________________________________
46 inline Double_t& AliRectMatrix::operator()(Int_t row, Int_t col)
48 return (Double_t&) fRows[row][col];