// @(#)root/tmva $Id$ // Author: S. Jadach, Tancredi Carli, Dominik Dannheim, Alexander Voigt /********************************************************************************** * 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 - TU Dresden, Germany * * * * 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) * **********************************************************************************/ #include #include #ifndef ROOT_TMVA_PDEFoamVect #include "TMVA/PDEFoamVect.h" #endif using namespace std; //#define SW2 std::setw(12) ClassImp(TMVA::PDEFoamVect) //_____________________________________________________________________ TMVA::PDEFoamVect::PDEFoamVect() : TObject(), fDim(0), fCoords(0) { // Default constructor for streamer } //_____________________________________________________________________ TMVA::PDEFoamVect::PDEFoamVect(Int_t n) : TObject(), fDim(n), fCoords(0) { // User constructor creating n-dimensional vector // and allocating dynamically array of components if (n>0) { fCoords = new Double_t[fDim]; for (Int_t i=0; i=fDim)) { Error( "PDEFoamVect","operator[], out of range \n"); } return fCoords[n]; } //_____________________________________________________________________ TMVA::PDEFoamVect& TMVA::PDEFoamVect::operator*=(const Double_t &x) { // unary multiplication operator *= for(Int_t i=0;i