openModeller  Version 1.5.0
DummyRule Class Reference
Inheritance diagram for DummyRule:
Inheritance graph
Collaboration diagram for DummyRule:
Collaboration graph

Public Member Functions

 DummyRule (int id=-1)
 
GarpRuleobjFactory () const
 
int getStrength (const Sample &) const
 
double getValue (const Sample &) const
 
bool applies (const Sample &) const
 
int getId ()
 
void setPerformance (PerfIndex index, double newPerf)
 
- Public Member Functions inherited from GarpRule
 GarpRule ()
 
virtual ~GarpRule ()
 
virtual char type () const
 
 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 int copy (const GarpRule *fromRule)
 
int numGenes () const
 
virtual char type () 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 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
 
double evaluate (const OccurrencesPtr &occs)
 
virtual void log ()
 
- Public Member Functions inherited from Rule
 Rule ()
 Default constructor. More...
 
virtual ~Rule ()
 Default destructor. More...
 
virtual RuleobjFactory ()=0
 
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 void fromString (char *strRule)=0
 
virtual char * toXML ()
 
virtual void initialize (EnvCellSet *objEnvCellSet, const RuleSet *objRuleSet, bool *geneIsActivePtr, int *geneIndexPtr, int iActGenes)=0
 
virtual bool applyToCell (EnvCell *cell)=0
 
virtual double getCertainty (EnvCell *cell)
 
virtual double getError (BYTE pred, EnvCell *cell)
 
virtual double getStrength (EnvCell *cell)=0
 
virtual bool similar (Rule *objOtherRule)
 
virtual void mutate (int intTemperature)
 
double testWithData (EnvCellSet *objTrainSet)
 
bool needsEvaluation ()
 

Private Attributes

int _id
 

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 35 of file test_ruleset.cpp.

Constructor & Destructor Documentation

DummyRule::DummyRule ( int  id = -1)

Definition at line 51 of file test_ruleset.cpp.

References _id.

Referenced by objFactory().

Member Function Documentation

bool DummyRule::applies ( const Sample ) const
inlinevirtual

Implements GarpRule.

Definition at line 42 of file test_ruleset.cpp.

int DummyRule::getId ( )
inline

Definition at line 44 of file test_ruleset.cpp.

References _id.

int DummyRule::getStrength ( const Sample ) const
inlinevirtual

Implements GarpRule.

Definition at line 40 of file test_ruleset.cpp.

double DummyRule::getValue ( const Sample ) const
inline

Definition at line 41 of file test_ruleset.cpp.

GarpRule* DummyRule::objFactory ( ) const
inlinevirtual

Implements GarpRule.

Definition at line 39 of file test_ruleset.cpp.

References DummyRule().

Here is the call graph for this function:

void DummyRule::setPerformance ( PerfIndex  index,
double  newPerf 
)
inline

Definition at line 45 of file test_ruleset.cpp.

References GarpRule::_performance.

Referenced by TEST().

Member Data Documentation

int DummyRule::_id
private

Definition at line 48 of file test_ruleset.cpp.

Referenced by DummyRule(), and getId().


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