ROOT logo

/**********************************************************************************
 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
 * Package: TMVA                                                                  *
 * Classes: PDEFoamVect                                                           *
 * Web    : http://tmva.sourceforge.net                                           *
 *                                                                                *
 * Description:                                                                   *
 *      Auxiliary class PDEFoamVect of n-dimensional vector, with dynamic         *
 *      allocation used for the cartesian geometry of the PDEFoam cells           *
 *                                                                                *
 * Authors (alphabetical):                                                        *
 *      S. Jadach        - Institute of Nuclear Physics, Cracow, Poland           *
 *      Tancredi Carli   - CERN, Switzerland                                      *
 *      Dominik Dannheim - CERN, Switzerland                                      *
 *      Alexander Voigt  - CERN, Switzerland                                      *
 *                                                                                *
 * Copyright (c) 2008:                                                            *
 *      CERN, Switzerland                                                         *
 *      MPI-K Heidelberg, Germany                                                 *
 *                                                                                *
 * Redistribution and use in source and binary forms, with or without             *
 * modification, are permitted according to the terms listed in LICENSE           *
 * (http://tmva.sourceforge.net/LICENSE)                                          *
 **********************************************************************************/

#ifndef ROOT_TMVA_PDEFoamVect
#define ROOT_TMVA_PDEFoamVect

#ifndef ROOT_TObject
#include "TObject.h"
#endif

#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif

namespace TMVA {

   class PDEFoamVect : public TObject {

   private:
      Int_t       fDim;                     // Dimension
      Double_t   *fCoords;                  // [fDim] Coordinates

   protected:
      mutable MsgLogger* fLogger;                     //! message logger
      MsgLogger& Log() const { return *fLogger; }

   public:
      // constructor
      PDEFoamVect();                                 // Constructor
      PDEFoamVect(Int_t);                            // USER Constructor
      PDEFoamVect(const PDEFoamVect &);              // Copy constructor
      virtual ~PDEFoamVect();                        // Destructor

      //////////////////////////////////////////////////////////////////////////////
      //                     Overloading operators                                //
      //////////////////////////////////////////////////////////////////////////////
      PDEFoamVect& operator =( const PDEFoamVect& ); // = operator; Substitution
      Double_t & operator[]( Int_t );                // [] provides POINTER to coordinate
      PDEFoamVect& operator =( Double_t [] );        // LOAD IN entire double vector
      PDEFoamVect& operator =( Double_t );           // LOAD IN double number
      //////////////////////////   OTHER METHODS    //////////////////////////////////
      PDEFoamVect& operator+=( const  PDEFoamVect& );  // +=; add vector u+=v  (FAST)
      PDEFoamVect& operator-=( const  PDEFoamVect& );  // +=; add vector u+=v  (FAST)
      PDEFoamVect& operator*=( const  Double_t&  );    // *=; mult. by scalar v*=x (FAST)
      PDEFoamVect  operator+ ( const  PDEFoamVect& );  // +;  u=v+s, NEVER USE IT, SLOW!!!
      PDEFoamVect  operator- ( const  PDEFoamVect& );  // -;  u=v-s, NEVER USE IT, SLOW!!!
      void       Print(Option_t *option) const;    // Prints vector
      Int_t      GetDim() const { return fDim; }   // Returns dimension
      Double_t   GetCoord(Int_t i) const { return fCoords[i]; }   // Returns coordinate

      ClassDef(PDEFoamVect,1) //n-dimensional vector with dynamical allocation
   }; // end of PDEFoamVect
}  // namespace TMVA

#endif
 PDEFoamVect.h:1
 PDEFoamVect.h:2
 PDEFoamVect.h:3
 PDEFoamVect.h:4
 PDEFoamVect.h:5
 PDEFoamVect.h:6
 PDEFoamVect.h:7
 PDEFoamVect.h:8
 PDEFoamVect.h:9
 PDEFoamVect.h:10
 PDEFoamVect.h:11
 PDEFoamVect.h:12
 PDEFoamVect.h:13
 PDEFoamVect.h:14
 PDEFoamVect.h:15
 PDEFoamVect.h:16
 PDEFoamVect.h:17
 PDEFoamVect.h:18
 PDEFoamVect.h:19
 PDEFoamVect.h:20
 PDEFoamVect.h:21
 PDEFoamVect.h:22
 PDEFoamVect.h:23
 PDEFoamVect.h:24
 PDEFoamVect.h:25
 PDEFoamVect.h:26
 PDEFoamVect.h:27
 PDEFoamVect.h:28
 PDEFoamVect.h:29
 PDEFoamVect.h:30
 PDEFoamVect.h:31
 PDEFoamVect.h:32
 PDEFoamVect.h:33
 PDEFoamVect.h:34
 PDEFoamVect.h:35
 PDEFoamVect.h:36
 PDEFoamVect.h:37
 PDEFoamVect.h:38
 PDEFoamVect.h:39
 PDEFoamVect.h:40
 PDEFoamVect.h:41
 PDEFoamVect.h:42
 PDEFoamVect.h:43
 PDEFoamVect.h:44
 PDEFoamVect.h:45
 PDEFoamVect.h:46
 PDEFoamVect.h:47
 PDEFoamVect.h:48
 PDEFoamVect.h:49
 PDEFoamVect.h:50
 PDEFoamVect.h:51
 PDEFoamVect.h:52
 PDEFoamVect.h:53
 PDEFoamVect.h:54
 PDEFoamVect.h:55
 PDEFoamVect.h:56
 PDEFoamVect.h:57
 PDEFoamVect.h:58
 PDEFoamVect.h:59
 PDEFoamVect.h:60
 PDEFoamVect.h:61
 PDEFoamVect.h:62
 PDEFoamVect.h:63
 PDEFoamVect.h:64
 PDEFoamVect.h:65
 PDEFoamVect.h:66
 PDEFoamVect.h:67
 PDEFoamVect.h:68
 PDEFoamVect.h:69
 PDEFoamVect.h:70
 PDEFoamVect.h:71
 PDEFoamVect.h:72
 PDEFoamVect.h:73
 PDEFoamVect.h:74
 PDEFoamVect.h:75
 PDEFoamVect.h:76
 PDEFoamVect.h:77
 PDEFoamVect.h:78