|
||||
File indexing completed on 2025-01-18 10:10:59
0001 /********************************************************************************** 0002 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 0003 * Package: TMVA * 0004 * Class : Interval * 0005 * * 0006 * * 0007 * Description: * 0008 * Extension of the Interval to "logarithmic" intervals * 0009 * * 0010 * * 0011 * * 0012 * Authors (alphabetical): * 0013 * Helge Voss <helge.voss@cern.ch> - MPI-K Heidelberg, Germany * 0014 * * 0015 * Copyright (c) 2005: * 0016 * CERN, Switzerland * 0017 * MPI-K Heidelberg, Germany * 0018 * * 0019 * Redistribution and use in source and binary forms, with or without * 0020 * modification, are permitted according to the terms listed in LICENSE * 0021 * (see tmva/doc/LICENSE) * 0022 **********************************************************************************/ 0023 0024 #ifndef ROOT_TMVA_LogInterval 0025 #define ROOT_TMVA_LogInterval 0026 0027 ////////////////////////////////////////////////////////////////////////////// 0028 // // 0029 // Interval with non-equi distant bins // 0030 // that are equi-distant in a logarithmic scale) // 0031 // // 0032 // Interval definition, continuous and discrete // 0033 // // 0034 // Note: **bin** counting starts from ZERO unlike in ROOT histograms // 0035 // // 0036 // ---------------- // 0037 // LogInterval(1,10000,5) // 0038 // i=0 --> 1 note: StepSize(ibin=0) = not defined !! // 0039 // i=1 --> 10 StepSize(ibin=1) = 9 // 0040 // i=2 --> 100 StepSize(ibin=2) = 99 // 0041 // i=3 --> 1000 StepSize(ibin=3) = 999 // 0042 // i=4 --> 10000 StepSize(ibin=4) = 9999 // 0043 // // 0044 // LogInterval(1,1000,11) // 0045 // i=0 --> 1 // 0046 // i=1 --> 1.99526 // 0047 // i=2 --> 3.98107 // 0048 // i=3 --> 7.94328 // 0049 // i=4 --> 15.8489 // 0050 // i=5 --> 31.6228 // 0051 // i=6 --> 63.0957 // 0052 // i=7 --> 125.893 // 0053 // i=8 --> 251.189 // 0054 // i=9 --> 501.187 // 0055 // i=10 --> 1000 // 0056 // // 0057 // LogInterval(1,1024,11) // 0058 // i=0 --> 1 // 0059 // i=1 --> 2 // 0060 // i=2 --> 4 // 0061 // i=3 --> 8 // 0062 // i=4 --> 16 // 0063 // i=5 --> 32 // 0064 // i=6 --> 64 // 0065 // i=7 --> 128 // 0066 // i=8 --> 256 // 0067 // i=9 --> 512 // 0068 // i=10 --> 1024 // 0069 // // 0070 ////////////////////////////////////////////////////////////////////////////// 0071 #include "Rtypes.h" 0072 0073 #include "Interval.h" 0074 0075 0076 0077 class TRandom3; 0078 0079 namespace TMVA { 0080 0081 class MsgLogger; 0082 0083 class LogInterval : public Interval { 0084 0085 public: 0086 0087 LogInterval( Double_t min, Double_t max, Int_t nbins = 0 ); 0088 LogInterval( const LogInterval& other ); 0089 virtual ~LogInterval(); 0090 0091 // accessors 0092 virtual Double_t GetMin() const { return fMin; } 0093 virtual Double_t GetMax() const { return fMax; } 0094 virtual Double_t GetWidth() const; 0095 virtual Int_t GetNbins() const { return fNbins; } 0096 virtual Double_t GetMean() const; 0097 virtual Double_t GetRndm( TRandom3& ) const; 0098 virtual Double_t GetElement( Int_t position ) const; 0099 virtual Double_t GetStepSize(Int_t iBin=0) const; 0100 0101 void SetMax( Double_t m ) { fMax = m; } 0102 void SetMin( Double_t m ) { fMin = m; } 0103 0104 MsgLogger& Log() const; 0105 0106 ClassDef(Interval,0); // Interval definition, continuous and discrete 0107 }; 0108 0109 } // namespace TMVA 0110 0111 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |