#include <genes.h>
Inheritance diagram for AnyIntGene:
Public Methods | |
AnyIntGene () | |
AnyIntGene (const GeneticID &id, int min, int max, double m=1.0) | |
virtual int | getvalue () const |
virtual void | copy (const Genstruct &other) |
virtual void | check () const |
Protected Attributes | |
int | mMin |
int | mMax |
You can read about the creation of integer-valued genes and how they are inserted in the genomes from the specific subclass documentation. The values of the genes are read from the genome as follows:
double x = dynamic_cast<const AnyIntGene&> (*individual.getGene("myGene")).getvalue();
Because of technical limitations, the class is not actually abstract.
Definition at line 536 of file genes.h.
|
Default constructor, FORBIDDEN! Exists only because of RTTI system.
|
|
The subclass should call this constructor to set the name and some variables.
|
|
Standard check operator. Implementation for Object.
Reimplemented from Gene. Reimplemented in IntGene, and BitIntGene. Definition at line 573 of file genes.h. References Gene::check(), mMax, and mMin. Referenced by BitIntGene::check(), and IntGene::check(). |
|
Standard copy operator. Implementation for Genstruct. Reimplemented from Gene. Reimplemented in IntGene, and BitIntGene. Definition at line 349 of file genes.cc. References Gene::copy(). Referenced by BitIntGene::copy(), and IntGene::copy(). |
|
Returns the decoded phenotypic value of the gene. The inheritor MUST overload this method. Reimplemented in IntGene, and BitIntGene. |
|
The upper limit for the gene value.
Definition at line 580 of file genes.h. Referenced by AnyIntGene(), check(), BitIntGene::check(), IntGene::check(), IntGene::equality(), IntGene::init(), and IntGene::pointMutate(). |
|
The lower limit for the gene value.
Definition at line 577 of file genes.h. Referenced by AnyIntGene(), check(), BitIntGene::check(), IntGene::check(), IntGene::equality(), BitIntGene::getvalue(), and IntGene::init(). |