#ifndef ROOT_TMVA_GeneticAlgorithm
#define ROOT_TMVA_GeneticAlgorithm
#include <vector>
#include <deque>
#include <iosfwd>
#ifndef ROOT_TMVA_IFitterTarget
#include "TMVA/IFitterTarget.h"
#endif
#ifndef ROOT_TMVA_GeneticPopulation
#include "TMVA/GeneticPopulation.h"
#endif
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
namespace TMVA {
class IFitterTarget;
class Interval;
class GeneticAlgorithm {
public:
GeneticAlgorithm( IFitterTarget& target, Int_t populationSize,
const std::vector<TMVA::Interval*>& ranges, UInt_t seed = 0 );
virtual ~GeneticAlgorithm() {}
void Init();
virtual Bool_t HasConverged(Int_t steps = 10, Double_t ratio = 0.1);
virtual Double_t SpreadControl(Int_t steps, Int_t ofSteps,
Double_t factor);
virtual Double_t NewFitness(Double_t oldValue, Double_t newValue);
virtual Double_t CalculateFitness();
Double_t DoRenewFitness();
virtual Double_t RenewFitness(std::vector < Double_t > factors,
std::vector < Double_t > results);
virtual void Evolution();
void Finalize();
GeneticPopulation& GetGeneticPopulation() { return fPopulation; }
Double_t GetSpread() const { return fSpread; }
void SetSpread(Double_t s) { fSpread = s; }
Int_t fConvCounter;
protected:
IFitterTarget& fFitterTarget;
GeneticPopulation fPopulation;
Double_t fConvValue;
std::deque<Int_t> fSuccessList;
Double_t fLastResult;
Double_t fSpread;
Bool_t fMirror;
Bool_t fSexual;
Bool_t fFirstTime;
Int_t fPopulationSize;
const std::vector<TMVA::Interval*>& fRanges;
mutable MsgLogger fLogger;
ClassDef(GeneticAlgorithm, 0)
};
}
#endif
Last change: Wed Jun 25 08:48:11 2008
Last generated: 2008-06-25 08:48
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.