Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TFoamVect.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/foam:$Id$
0002 // Author: S. Jadach <mailto:Stanislaw.jadach@ifj.edu.pl>, P.Sawicki <mailto:Pawel.Sawicki@ifj.edu.pl>
0003 
0004 #ifndef ROOT_TFoamVect
0005 #define ROOT_TFoamVect
0006 
0007 #include "TObject.h"
0008 
0009 
0010 class TFoamVect : public TObject {
0011    // constructor
0012 private:
0013    Int_t       fDim;                     ///< Dimension
0014    Double_t   *fCoords;                  ///< [fDim] Coordinates
0015 public:
0016    TFoamVect();                          // Constructor
0017    TFoamVect(Int_t);                     // USER Constructor
0018    TFoamVect(const TFoamVect &);         // Copy constructor
0019    ~TFoamVect() override;                 // Destructor
0020 
0021    TFoamVect& operator =(const TFoamVect&);  // = operator; Substitution
0022    Double_t &operator[](Int_t);              // [] provides POINTER to coordinate
0023    TFoamVect& operator =(Double_t []);       // LOAD IN entire double vector
0024    TFoamVect& operator =(Double_t);          // LOAD IN double number
0025 
0026    TFoamVect& operator+=(const  TFoamVect&); // +=; add vector u+=v  (FAST)
0027    TFoamVect& operator-=(const  TFoamVect&); // +=; add vector u+=v  (FAST)
0028    TFoamVect& operator*=(const Double_t&);   // *=; mult. by scalar v*=x (FAST)
0029    TFoamVect  operator+( const  TFoamVect&); // +;  u=v+s, NEVER USE IT, SLOW!!!
0030    TFoamVect  operator-( const  TFoamVect&); // -;  u=v-s, NEVER USE IT, SLOW!!!
0031    void Print(Option_t *option) const override;   // Prints vector
0032    Int_t    GetDim() const { return fDim; }  // Returns dimension
0033    Double_t GetCoord(Int_t i) const {return fCoords[i];};   // Returns coordinate
0034 
0035    ClassDefOverride(TFoamVect,1) //n-dimensional vector with dynamical allocation
0036 };
0037 
0038 #endif
0039