Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
Volume.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : Volume *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Volume for BinarySearchTree *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
16  * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
17  * *
18  * Copyright (c) 2005: *
19  * CERN, Switzerland *
20  * U. of Victoria, Canada *
21  * MPI-K Heidelberg, Germany *
22  * *
23  * Redistribution and use in source and binary forms, with or without *
24  * modification, are permitted according to the terms listed in LICENSE *
25  * (http://tmva.sourceforge.net/LICENSE) *
26  **********************************************************************************/
27 
28 #ifndef ROOT_TMVA_Volume
29 #define ROOT_TMVA_Volume
30 
31 //////////////////////////////////////////////////////////////////////////
32 // //
33 // Volume //
34 // //
35 // Volume for BinarySearchTree //
36 // //
37 // volume element: cubic variable space beteen upper and lower bonds of //
38 // nvar-dimensional variable space //
39 // //
40 //////////////////////////////////////////////////////////////////////////
41 
42 #include <vector>
43 #include "Rtypes.h"
44 //#include "time.h"
45 
46 namespace TMVA {
47 
48  class Volume {
49 
50  public:
51 
52  // constructors
53  Volume( std::vector<Float_t>* l, std::vector<Float_t>* u = 0);
54  Volume( std::vector<Double_t>* l = 0, std::vector<Double_t>* u = 0);
55  Volume( Volume& );
56  Volume( Float_t* l , Float_t* u , Int_t nvar );
57  Volume( Double_t* l , Double_t* u , Int_t nvar );
58  Volume( Float_t l , Float_t u );
59  Volume( Double_t l , Double_t u );
60 
61  // destructor
62  virtual ~Volume( void );
63 
64  // operators
65  Volume& operator=( const Volume& );
66 
67  // destruct the volue
68  void Delete ( void );
69  // "scale" the volume by multiplying each upper and lower boundary by "f"
70  void Scale ( Double_t f );
71  // "scale" the volume by symmetrically blowing up the interval in each dimension
72  void ScaleInterval( Double_t f );
73  void Print ( void ) const;
74 
75  // allow direct access for better speed
76  std::vector<Double_t> *fLower; // vector with lower volume dimensions
77  std::vector<Double_t> *fUpper; // vector with upper volume dimensions
78 
79  private:
80 
81  Bool_t fOwnerShip; // flag if "boundary vector" is owned by the volume of not
82  };
83 
84 } // namespace TMVA
85 
86 #endif