91 if (fMax - fMin < 0)
Log() <<
kFATAL <<
"maximum lower than minimum" <<
Endl;
96 else if (nbins == 1) {
97 Log() <<
kFATAL <<
"interval has to have at least 2 bins if discrete" <<
Endl;
105 fNbins( other.fNbins )
125 Log() <<
kFATAL <<
"GetElement only defined for discrete value Intervals" <<
Endl;
128 else if (bin < 0 || bin >= fNbins) {
129 Log() <<
kFATAL <<
"bin " << bin <<
" out of range: interval *bins* count from 0 to " << fNbins-1 <<
Endl;
132 return fMin + ( (
Double_t(bin)/(fNbins-1)) *(fMax - fMin) );
141 Log() <<
kFATAL <<
"GetElement only defined for discrete value Intervals" <<
Endl;
144 Log() <<
kFATAL <<
"You asked for iBin=" << iBin
145 <<
" in interval .. and.. sorry, I cannot let this happen.."<<
Endl;
147 return (fMax-fMin)/(
Double_t)(fNbins-1);
155 return rnd.
Rndm()*(fMax - fMin) + fMin;
164 return (fMax + fMin)/2;
169 for (
Int_t i=0; i<GetNbins(); i++){
170 os <<
"| " << GetElement(i)<<
" |" ;
175 TTHREAD_TLS_DECL_ARG(
MsgLogger,logger,
"Interval");
Random number generator class based on M.
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
MsgLogger & Endl(MsgLogger &ml)
virtual Double_t GetMean() const
ClassImp(TMVA::Interval) TMVA
defines minimum and maximum of an interval when nbins > 0, interval describes a discrete distribution...
virtual ~Interval()
destructor
virtual Double_t GetWidth() const
virtual Double_t GetElement(Int_t position) const
calculates the value of the "number" bin in a discrete interval.
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
Interval(Double_t min, Double_t max, Int_t nbins=0)
virtual Double_t GetStepSize(Int_t iBin=0) const
retuns the step size between the numbers of a "discrete Interval"
virtual Double_t GetRndm(TRandom3 &) const
get uniformely distributed number within interval
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
virtual void Print(std::ostream &os) const