Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Interval Class Reference

The TMVA::Interval Class.

Interval definition, continuous and discrete

  • Interval(min,max) : a continous interval [min,max]
  • Interval(min,max,n): a "discrete interval" [min,max], i.e the n numbers: min, min+step, min+2*step,...., min+(n-1)*step, min+n*step=max

e.g.:

  • Interval(1,5,5) = 1,2,3,4,5
  • Interval(.5,1.,6) = .5, .6., .7, .8, .9, 1.0

Note: bin counting starts from ZERO unlike in ROOT histograms

  • Interval definition, continuous and discrete
    • Interval(min,max) : a continous interval [min,max]
    • Interval(min,max,n): a "discrete interval" [min,max], i.e the n numbers:

      min, min+step, min+2*step,...., min+(n-1)*step=max

      e.g.:

      • Interval(1,5,5)=1,2,3,4,5
      • Interval(.5,1.,6)= .5, .6., .7, .8, .9, 1.0
Example: Interval(.5,1.,6)
[ min max ]
-----------------------------------------------
| | | | | |
.5 .6 .7 .8 .9 1.0
bin 0 1 2 3 4 5
The TMVA::Interval Class.
Definition Interval.h:61

Definition at line 61 of file Interval.h.

Public Member Functions

 Interval (const Interval &other)
 
 Interval (Double_t min, Double_t max, Int_t nbins=0)
 defines minimum and maximum of an interval
 
virtual ~Interval ()
 destructor
 
virtual Double_t GetElement (Int_t position) const
 calculates the value of the "number" bin in a discrete interval.
 
virtual Double_t GetMax () const
 
virtual Double_t GetMean () const
 
virtual Double_t GetMin () const
 
virtual Int_t GetNbins () const
 
virtual Double_t GetRndm (TRandom3 &) const
 get uniformly distributed number within interval
 
virtual Double_t GetStepSize (Int_t iBin=0) const
 returns the step size between the numbers of a "discrete Interval"
 
virtual Double_t GetWidth () const
 
virtual TClassIsA () const
 
virtual void Print (std::ostream &os) const
 
void SetMax (Double_t m)
 
void SetMin (Double_t m)
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Attributes

Double_t fMax
 the constraints of the Interval
 
Double_t fMin
 
Int_t fNbins
 when >0 : number of bins (discrete interval); when ==0 continuous interval
 

Private Member Functions

MsgLoggerLog () const
 

#include <TMVA/Interval.h>

Inheritance diagram for TMVA::Interval:
[legend]

Constructor & Destructor Documentation

◆ Interval() [1/2]

TMVA::Interval::Interval ( Double_t  min,
Double_t  max,
Int_t  nbins = 0 
)

defines minimum and maximum of an interval

  • when nbins > 0, interval describes a discrete distribution (equally distributed in the interval)
  • when nbins == 0, interval describes a continous interval

Definition at line 83 of file Interval.cxx.

◆ Interval() [2/2]

TMVA::Interval::Interval ( const Interval other)

Definition at line 99 of file Interval.cxx.

◆ ~Interval()

TMVA::Interval::~Interval ( )
virtual

destructor

Definition at line 109 of file Interval.cxx.

Member Function Documentation

◆ Class()

static TClass * TMVA::Interval::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TMVA::Interval::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TMVA::Interval::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 93 of file Interval.h.

◆ DeclFileName()

static const char * TMVA::Interval::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 93 of file Interval.h.

◆ GetElement()

Double_t TMVA::Interval::GetElement ( Int_t  bin) const
virtual

calculates the value of the "number" bin in a discrete interval.

Parameters: Double_t position

Reimplemented in TMVA::LogInterval.

Definition at line 119 of file Interval.cxx.

◆ GetMax()

virtual Double_t TMVA::Interval::GetMax ( ) const
inlinevirtual

Reimplemented in TMVA::LogInterval.

Definition at line 72 of file Interval.h.

◆ GetMean()

Double_t TMVA::Interval::GetMean ( ) const
virtual

Reimplemented in TMVA::LogInterval.

Definition at line 159 of file Interval.cxx.

◆ GetMin()

virtual Double_t TMVA::Interval::GetMin ( ) const
inlinevirtual

Reimplemented in TMVA::LogInterval.

Definition at line 71 of file Interval.h.

◆ GetNbins()

virtual Int_t TMVA::Interval::GetNbins ( ) const
inlinevirtual

Reimplemented in TMVA::LogInterval.

Definition at line 74 of file Interval.h.

◆ GetRndm()

Double_t TMVA::Interval::GetRndm ( TRandom3 rnd) const
virtual

get uniformly distributed number within interval

Reimplemented in TMVA::LogInterval.

Definition at line 150 of file Interval.cxx.

◆ GetStepSize()

Double_t TMVA::Interval::GetStepSize ( Int_t  iBin = 0) const
virtual

returns the step size between the numbers of a "discrete Interval"

Reimplemented in TMVA::LogInterval.

Definition at line 135 of file Interval.cxx.

◆ GetWidth()

Double_t TMVA::Interval::GetWidth ( ) const
virtual

Reimplemented in TMVA::LogInterval.

Definition at line 155 of file Interval.cxx.

◆ IsA()

virtual TClass * TMVA::Interval::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented in TMVA::LogInterval.

Definition at line 93 of file Interval.h.

◆ Log()

TMVA::MsgLogger & TMVA::Interval::Log ( ) const
private

Definition at line 171 of file Interval.cxx.

◆ Print()

void TMVA::Interval::Print ( std::ostream &  os) const
virtual

Definition at line 164 of file Interval.cxx.

◆ SetMax()

void TMVA::Interval::SetMax ( Double_t  m)
inline

Definition at line 80 of file Interval.h.

◆ SetMin()

void TMVA::Interval::SetMin ( Double_t  m)
inline

Definition at line 81 of file Interval.h.

◆ Streamer()

virtual void TMVA::Interval::Streamer ( TBuffer )
virtual

Reimplemented in TMVA::LogInterval.

◆ StreamerNVirtual()

void TMVA::Interval::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 93 of file Interval.h.

Member Data Documentation

◆ fMax

Double_t TMVA::Interval::fMax
protected

the constraints of the Interval

Definition at line 87 of file Interval.h.

◆ fMin

Double_t TMVA::Interval::fMin
protected

Definition at line 87 of file Interval.h.

◆ fNbins

Int_t TMVA::Interval::fNbins
protected

when >0 : number of bins (discrete interval); when ==0 continuous interval

Definition at line 88 of file Interval.h.

Libraries for TMVA::Interval:

The documentation for this class was generated from the following files: