openModeller  Version 1.5.0
AtomicRule Class Reference

#include <Rule.h>

Inheritance diagram for AtomicRule:
Inheritance graph
Collaboration diagram for AtomicRule:
Collaboration graph

Public Member Functions

 AtomicRule ()
 
virtual ~AtomicRule ()
 
virtual RuleobjFactory ()
 
virtual char type () const
 
virtual void fromString (char *strRule)
 
virtual void initialize (EnvCellSet *objEnvCellSet, const RuleSet *objRuleSet, bool *geneIsActivePtr, int *geneIndexPtr, int iActGenes)
 
virtual bool applyToCell (EnvCell *cell)
 
virtual double getStrength (EnvCell *cell)
 
- Public Member Functions inherited from GarpRule
 GarpRule ()
 
virtual ~GarpRule ()
 
 GarpRule ()
 Default constructor. More...
 
 GarpRule (const int numGenes)
 Constructor with defined size. More...
 
 GarpRule (Scalar prediction, int numGenes, const Sample &chrom1, const Sample &chrom2, const double *performances)
 Constructor with setters. More...
 
virtual ~GarpRule ()
 Default destructor. More...
 
virtual GarpRuleclone () const
 
virtual GarpRuleobjFactory () const =0
 
virtual int copy (const GarpRule *fromRule)
 
int numGenes () const
 
bool needsEvaluation () const
 
void forceEvaluation ()
 
void evaluated ()
 
void setPrediction (double pred)
 
Scalar getPrediction () const
 
const SamplegetChrom1 () const
 
const SamplegetChrom2 () const
 
const double * getPerformanceArray () const
 
double getPerformance (PerfIndex perfIndex) const
 
virtual int getStrength (const Sample &sample) const =0
 
virtual int getCertainty (const Scalar pred) const
 
virtual double getError (const Scalar predefinedValue, const Scalar prediction) const
 
virtual bool similar (const GarpRule *compareToRule) const
 
virtual void mutate (double temperature)
 
virtual void crossover (GarpRule *rule, int xpt1, int xpt2)
 
void adjustRange (Scalar &v1, Scalar &v2) const
 
virtual bool applies (const Sample &sample) const =0
 
double evaluate (const OccurrencesPtr &occs)
 
virtual void log ()
 
- Public Member Functions inherited from Rule
 Rule ()
 Default constructor. More...
 
virtual ~Rule ()
 Default destructor. More...
 
virtual Ruleclone ()
 
virtual void copy (Rule *fromRule)
 
void RestoreRule (double *perf, unsigned char *genes, int arry_len, int *gene_index)
 Restore Model. More...
 
virtual char * toString ()
 
virtual char * toXML ()
 
virtual double getCertainty (EnvCell *cell)
 
virtual double getError (BYTE pred, EnvCell *cell)
 
virtual bool similar (Rule *objOtherRule)
 
virtual void mutate (int intTemperature)
 
double testWithData (EnvCellSet *objTrainSet)
 
bool needsEvaluation ()
 

Additional Inherited Members

- Protected Attributes inherited from GarpRule
Sample _chrom1
 BYTE vector containing the genes (representation of the variables in a Genetic Algorithm. More...
 
Sample _chrom2
 
Scalar _prediction
 
int _numGenes
 Number of genes stored by the rule. More...
 
double _performance [10]
 Vector for storing the performance values for the rule. More...
 
bool _needsEvaluation
 
char _origin
 
- Protected Attributes inherited from Rule
BYTEGene
 BYTE vector containing the genes (representation of the variables in a Genetic Algorithm. More...
 
int intGenes
 Number of genes stored by the rule. More...
 
double dblPerformance [10]
 Vector for storing the performance values for the rule. More...
 
bool blnNeedsEvaluation
 
int intGens
 
int intTrials
 
int intScreener
 
int intScreen
 
int intLength
 
int intNumber
 
int intConclusion
 
char chrOrigin
 
char chrPad
 
int lId
 
int iOrigGen
 
double _pXYs
 
int _no
 
double _dA
 
double _dSig
 
bool * bGeneIsActive
 
int * iGeneIndex
 
int iActiveGenes
 

Detailed Description

Definition at line 162 of file Rule.h.

Constructor & Destructor Documentation

AtomicRule::AtomicRule ( )

Definition at line 663 of file Rule.cpp.

Referenced by objFactory().

AtomicRule::~AtomicRule ( )
virtual

Definition at line 666 of file Rule.cpp.

Member Function Documentation

bool AtomicRule::applyToCell ( EnvCell cell)
virtual

Implements Rule.

Definition at line 698 of file Rule.cpp.

References Rule::Gene, Rule::iActiveGenes, Rule::iGeneIndex, and EnvCell::values.

void AtomicRule::fromString ( char *  strRule)
virtual

Implements Rule.

Definition at line 693 of file Rule.cpp.

double AtomicRule::getStrength ( EnvCell cell)
virtual

Implements Rule.

Definition at line 714 of file Rule.cpp.

References Rule::Gene, Rule::iActiveGenes, Rule::iGeneIndex, GarpUtil::membership(), and EnvCell::values.

Here is the call graph for this function:

void AtomicRule::initialize ( EnvCellSet objEnvCellSet,
const RuleSet objRuleSet,
bool *  geneIsActivePtr,
int *  geneIndexPtr,
int  iActGenes 
)
virtual

Implements Rule.

Definition at line 669 of file Rule.cpp.

References Rule::Gene, EnvCellSet::get(), Rule::iActiveGenes, Rule::iGeneIndex, Rule::initialize(), Rule::intLength, GarpUtil::randint(), and EnvCellSet::size().

Here is the call graph for this function:

virtual Rule* AtomicRule::objFactory ( )
inlinevirtual

Implements Rule.

Definition at line 167 of file Rule.h.

References AtomicRule().

Here is the call graph for this function:

virtual char AtomicRule::type ( ) const
inlinevirtual

Reimplemented from GarpRule.

Definition at line 169 of file Rule.h.


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