Logo ROOT   6.21/01
Reference Guide
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

Definition at line 61 of file Interval.h.

Public Member Functions

 Interval (Double_t min, Double_t max, Int_t nbins=0)
 defines minimum and maximum of an interval More...
 
 Interval (const Interval &other)
 
virtual ~Interval ()
 destructor More...
 
virtual Double_t GetElement (Int_t position) const
 calculates the value of the "number" bin in a discrete interval. More...
 
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 More...
 
virtual Double_t GetStepSize (Int_t iBin=0) const
 returns the step size between the numbers of a "discrete Interval" More...
 
virtual Double_t GetWidth () const
 
virtual void Print (std::ostream &os) const
 
void SetMax (Double_t m)
 
void SetMin (Double_t m)
 

Protected Attributes

Double_t fMax
 
Double_t fMin
 
Int_t fNbins
 

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 84 of file Interval.cxx.

◆ Interval() [2/2]

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

Definition at line 100 of file Interval.cxx.

◆ ~Interval()

TMVA::Interval::~Interval ( )
virtual

destructor

Definition at line 110 of file Interval.cxx.

Member Function Documentation

◆ 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 120 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 160 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 151 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 136 of file Interval.cxx.

◆ GetWidth()

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

Reimplemented in TMVA::LogInterval.

Definition at line 156 of file Interval.cxx.

◆ Log()

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

Definition at line 172 of file Interval.cxx.

◆ Print()

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

Definition at line 165 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.

Member Data Documentation

◆ fMax

Double_t TMVA::Interval::fMax
protected

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

Definition at line 88 of file Interval.h.


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