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

Range definition for genetic algorithm.

Definition at line 42 of file GeneticRange.h.

Public Member Functions

 GeneticRange (TRandom3 *rnd, Interval *interval)
 defines the "f" (from) and "t" (to) of the coefficient and takes a randomgenerator
 
virtual ~GeneticRange ()
 destructor
 
Double_t GetFrom ()
 
Double_t GetTo ()
 
Double_t GetTotalLength ()
 
virtual TClassIsA () const
 
Double_t Random (Bool_t near=kFALSE, Double_t value=0, Double_t spread=0.1, Bool_t mirror=kFALSE)
 creates a new random value for the coefficient Parameters:
 
Double_t RandomDiscrete ()
 creates a new random value for the coefficient; returns a discrete value
 
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 ()
 

Private Member Functions

Double_t ReMap (Double_t val)
 remapping the value to the allowed space
 
Double_t ReMapMirror (Double_t val)
 remapping the value to the allowed space by reflecting on the boundaries
 

Private Attributes

Double_t fFrom
 
IntervalfInterval
 holds the complete information of the interval
 
Int_t fNbins
 
TRandom3fRandomGenerator
 the randomGenerator for calculating the new values
 
Double_t fTo
 the constraints of the coefficient
 
Double_t fTotalLength
 the distance between the lower and upper constraints
 

#include <TMVA/GeneticRange.h>

Constructor & Destructor Documentation

◆ GeneticRange()

TMVA::GeneticRange::GeneticRange ( TRandom3 rnd,
Interval interval 
)

defines the "f" (from) and "t" (to) of the coefficient and takes a randomgenerator

Definition at line 45 of file GeneticRange.cxx.

◆ ~GeneticRange()

TMVA::GeneticRange::~GeneticRange ( )
virtual

destructor

Definition at line 118 of file GeneticRange.cxx.

Member Function Documentation

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 73 of file GeneticRange.h.

◆ DeclFileName()

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

Definition at line 73 of file GeneticRange.h.

◆ GetFrom()

Double_t TMVA::GeneticRange::GetFrom ( )
inline

Definition at line 52 of file GeneticRange.h.

◆ GetTo()

Double_t TMVA::GeneticRange::GetTo ( )
inline

Definition at line 53 of file GeneticRange.h.

◆ GetTotalLength()

Double_t TMVA::GeneticRange::GetTotalLength ( )
inline

Definition at line 54 of file GeneticRange.h.

◆ IsA()

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

Definition at line 73 of file GeneticRange.h.

◆ Random()

Double_t TMVA::GeneticRange::Random ( Bool_t  near = kFALSE,
Double_t  value = 0,
Double_t  spread = 0.1,
Bool_t  mirror = kFALSE 
)

creates a new random value for the coefficient Parameters:

  • Bool_t near : takes a random value near the current value
  • double value : this is the current value
  • double spread : the sigma of the gaussian which is taken to calculate the new value
  • Bool_t mirror : if the new value would be outside of the range, mirror = false maps the value between the constraints by periodic boundary conditions. With mirror = true, the value gets "reflected" on the boundaries.

Definition at line 76 of file GeneticRange.cxx.

◆ RandomDiscrete()

Double_t TMVA::GeneticRange::RandomDiscrete ( )

creates a new random value for the coefficient; returns a discrete value

Definition at line 60 of file GeneticRange.cxx.

◆ ReMap()

Double_t TMVA::GeneticRange::ReMap ( Double_t  val)
private

remapping the value to the allowed space

Definition at line 96 of file GeneticRange.cxx.

◆ ReMapMirror()

Double_t TMVA::GeneticRange::ReMapMirror ( Double_t  val)
private

remapping the value to the allowed space by reflecting on the boundaries

Definition at line 107 of file GeneticRange.cxx.

◆ Streamer()

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

◆ StreamerNVirtual()

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

Definition at line 73 of file GeneticRange.h.

Member Data Documentation

◆ fFrom

Double_t TMVA::GeneticRange::fFrom
private

Definition at line 58 of file GeneticRange.h.

◆ fInterval

Interval* TMVA::GeneticRange::fInterval
private

holds the complete information of the interval

Definition at line 61 of file GeneticRange.h.

◆ fNbins

Int_t TMVA::GeneticRange::fNbins
private

Definition at line 59 of file GeneticRange.h.

◆ fRandomGenerator

TRandom3* TMVA::GeneticRange::fRandomGenerator
private

the randomGenerator for calculating the new values

Definition at line 71 of file GeneticRange.h.

◆ fTo

Double_t TMVA::GeneticRange::fTo
private

the constraints of the coefficient

Definition at line 58 of file GeneticRange.h.

◆ fTotalLength

Double_t TMVA::GeneticRange::fTotalLength
private

the distance between the lower and upper constraints

Definition at line 62 of file GeneticRange.h.

Libraries for TMVA::GeneticRange:

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