|
||||
File indexing completed on 2025-01-18 10:11:03
0001 // @(#)root/tmva $Id$ 0002 // Author: S. Jadach, Tancredi Carli, Dominik Dannheim, Alexander Voigt 0003 0004 /********************************************************************************** 0005 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 0006 * Package: TMVA * 0007 * Classes: PDEFoamVect * 0008 * * 0009 * * 0010 * Description: * 0011 * Auxiliary class PDEFoamVect of n-dimensional vector, with dynamic * 0012 * allocation used for the cartesian geometry of the PDEFoam cells * 0013 * * 0014 * Authors (alphabetical): * 0015 * S. Jadach - Institute of Nuclear Physics, Cracow, Poland * 0016 * Tancredi Carli - CERN, Switzerland * 0017 * Dominik Dannheim - CERN, Switzerland * 0018 * Alexander Voigt - TU Dresden, Germany * 0019 * * 0020 * Copyright (c) 2008: * 0021 * CERN, Switzerland * 0022 * MPI-K Heidelberg, Germany * 0023 * * 0024 * Redistribution and use in source and binary forms, with or without * 0025 * modification, are permitted according to the terms listed in LICENSE * 0026 * (see tmva/doc/LICENSE) * 0027 **********************************************************************************/ 0028 0029 #ifndef ROOT_TMVA_PDEFoamVect 0030 #define ROOT_TMVA_PDEFoamVect 0031 0032 #include "TObject.h" 0033 0034 namespace TMVA { 0035 0036 class PDEFoamVect : public TObject { 0037 0038 private: 0039 Int_t fDim; ///< Dimension 0040 Double_t *fCoords; ///< [fDim] Coordinates 0041 0042 public: 0043 // constructor 0044 PDEFoamVect(); ///< Constructor 0045 PDEFoamVect(Int_t); ///< USER Constructor 0046 PDEFoamVect(const PDEFoamVect &); ///< Copy constructor 0047 virtual ~PDEFoamVect(); ///< Destructor 0048 0049 ////////////////////////////////////////////////////////////////////////////// 0050 // Overloading operators // 0051 ////////////////////////////////////////////////////////////////////////////// 0052 PDEFoamVect& operator =( const PDEFoamVect& ); // = operator; Substitution 0053 Double_t & operator[]( Int_t ); // [] provides POINTER to coordinate 0054 PDEFoamVect& operator =( Double_t [] ); // LOAD IN entire double vector 0055 PDEFoamVect& operator =( Double_t ); // LOAD IN double number 0056 ////////////////////////// OTHER METHODS ////////////////////////////////// 0057 PDEFoamVect& operator+=( const PDEFoamVect& ); // +=; add vector u+=v (FAST) 0058 PDEFoamVect& operator-=( const PDEFoamVect& ); // +=; add vector u+=v (FAST) 0059 PDEFoamVect& operator*=( const Double_t& ); // *=; mult. by scalar v*=x (FAST) 0060 PDEFoamVect operator+ ( const PDEFoamVect& ); // +; u=v+s, NEVER USE IT, SLOW!!! 0061 PDEFoamVect operator- ( const PDEFoamVect& ); // -; u=v-s, NEVER USE IT, SLOW!!! 0062 void Print(Option_t *option) const; // Prints vector 0063 Int_t GetDim() const { return fDim; } // Returns dimension 0064 Double_t GetCoord(Int_t i) const { return fCoords[i]; } // Returns coordinate 0065 0066 ClassDef(PDEFoamVect,2) //n-dimensional vector with dynamical allocation 0067 }; // end of PDEFoamVect 0068 } // namespace TMVA 0069 0070 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |