openModeller
Version 1.4.0
|
#include <Rule.h>
Public Member Functions | |
RangeRule () | |
virtual | ~RangeRule () |
virtual Rule * | objFactory () |
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) |
void | bioclimRange (EnvCellSet *objEnvCellSet, BYTE pred, double level, int var) |
RangeRule () | |
RangeRule (int numGenes) | |
RangeRule (Scalar prediction, int numGenes, const Sample &chrom1, const Sample &chrom2, const double *performances) | |
Constructor with setters. | |
virtual | ~RangeRule () |
virtual GarpRule * | objFactory () const |
virtual char | type () const |
virtual void | initialize (const BioclimHistogram &histogram) |
virtual bool | applies (const Sample &sample) const |
virtual int | getStrength (const Sample &sample) const |
void | log () |
Implements Garp Range rules. Also known as Bioclim rules. Examples of Range rules are:
IF temp between 10 and 20C THEN sp=PRESENT IF temp between 10 and 20C AND elevation between 500 and 2000m THEN sp=ABSENT
Definition at line 500 of file Rule.cpp.
Referenced by objFactory().
RangeRule::~RangeRule | ( | ) | [virtual] |
RangeRule::RangeRule | ( | int | numGenes | ) |
Definition at line 54 of file rules_range.cpp.
RangeRule::RangeRule | ( | Scalar | prediction, |
int | numGenes, | ||
const Sample & | chrom1, | ||
const Sample & | chrom2, | ||
const double * | performances | ||
) |
Constructor with setters.
Definition at line 58 of file rules_range.cpp.
virtual RangeRule::~RangeRule | ( | ) | [virtual] |
bool RangeRule::applies | ( | const Sample & | sample | ) | const [virtual] |
Implements GarpRule.
Reimplemented in NegatedRangeRule.
Definition at line 86 of file rules_range.cpp.
References GarpRule::_chrom1, GarpRule::_chrom2, GarpRule::_numGenes, between(), and equalEps().
bool RangeRule::applyToCell | ( | EnvCell * | cell | ) | [virtual] |
Implements Rule.
Reimplemented in NegatedRangeRule.
Definition at line 574 of file Rule.cpp.
References Rule::Gene, Rule::iActiveGenes, Rule::iGeneIndex, GarpUtil::notBetween(), and EnvCell::values.
void RangeRule::bioclimRange | ( | EnvCellSet * | objEnvCellSet, |
BYTE | pred, | ||
double | level, | ||
int | var | ||
) |
Definition at line 534 of file Rule.cpp.
References Rule::Gene, EnvCellSet::getBioclimHistogram(), and BioclimHistogram::matrix.
Referenced by initialize().
void RangeRule::fromString | ( | char * | strRule | ) | [virtual] |
int RangeRule::getStrength | ( | const Sample & | sample | ) | const [virtual] |
Implements GarpRule.
Reimplemented in NegatedRangeRule.
Definition at line 100 of file rules_range.cpp.
References GarpRule::_chrom1, GarpRule::_chrom2, GarpRule::_numGenes, and membership().
double RangeRule::getStrength | ( | EnvCell * | cell | ) | [virtual] |
Implements Rule.
Reimplemented in NegatedRangeRule.
Definition at line 588 of file Rule.cpp.
References Rule::Gene, Rule::iActiveGenes, Rule::iGeneIndex, Rule::intLength, GarpUtil::membership(), and EnvCell::values.
void RangeRule::initialize | ( | const BioclimHistogram & | histogram | ) | [virtual] |
Definition at line 68 of file rules_range.cpp.
References GarpRule::_chrom1, GarpRule::_chrom2, GarpRule::_numGenes, GarpRule::_prediction, Random::get(), and BioclimHistogram::getBioclimRange().
void RangeRule::initialize | ( | EnvCellSet * | objEnvCellSet, |
const RuleSet * | objRuleSet, | ||
bool * | geneIsActivePtr, | ||
int * | geneIndexPtr, | ||
int | iActGenes | ||
) | [virtual] |
Implements Rule.
Definition at line 511 of file Rule.cpp.
References bioclimRange(), Rule::Gene, Rule::iActiveGenes, Rule::iGeneIndex, Rule::intLength, GarpUtil::randint(), and GarpUtil::random().
void RangeRule::log | ( | ) | [virtual] |
Reimplemented from GarpRule.
Reimplemented in NegatedRangeRule.
Definition at line 117 of file rules_range.cpp.
References Log::info(), and Log::instance().
virtual GarpRule* RangeRule::objFactory | ( | ) | const [inline, virtual] |
Implements GarpRule.
Reimplemented in NegatedRangeRule.
Definition at line 69 of file rules_range.hh.
References RangeRule().
virtual Rule* RangeRule::objFactory | ( | ) | [inline, virtual] |
Implements Rule.
Reimplemented in NegatedRangeRule.
Definition at line 131 of file Rule.h.
References RangeRule().
virtual char RangeRule::type | ( | ) | const [inline, virtual] |
Reimplemented from GarpRule.
Reimplemented in NegatedRangeRule, and NegatedRangeRule.
Definition at line 71 of file rules_range.hh.
virtual char RangeRule::type | ( | ) | const [inline, virtual] |
Reimplemented from GarpRule.
Reimplemented in NegatedRangeRule, and NegatedRangeRule.