#include <genes.h>
Inheritance diagram for IntGene:
Public Methods | |
IntGene () | |
virtual IntGene & | set (int val) |
virtual int | getvalue () const |
virtual void | init () |
virtual bool | pointMutate (const MutationRate &k) |
virtual double | equality (const Genstruct &other) const |
virtual void | copy (const Genstruct &other) |
virtual Genstruct * | replicate () const |
virtual void | print (TextOStream &out) const |
virtual void | check () const |
This is the integer equivalent of the FloatGene. The gaussian mutation method may not suit this data type so well, but... that's only life.
Definition at line 601 of file genes.h.
|
Default constructor, FORBIDDEN! Exists only because of RTTI system.
Definition at line 608 of file genes.h. Referenced by replicate(). |
|
Standard check operator. Implementation for Object.
Reimplemented from AnyIntGene. Definition at line 423 of file genes.cc. References AnyIntGene::check(), AnyIntGene::mMax, and AnyIntGene::mMin. |
|
Standard copy operator. Implementation for Genstruct. Reimplemented from AnyIntGene. Definition at line 385 of file genes.cc. References AnyIntGene::copy(). |
|
Implementation for Genstruct. The distance measure for two integer genes is 0.0 if they are equal, and 1.0 if they are different. Reimplemented from Genstruct. Definition at line 414 of file genes.cc. References AnyIntGene::mMax, and AnyIntGene::mMin. |
|
Implementation for AnyIntGene.
Reimplemented from AnyIntGene. |
|
This implementation initializes the gene into any value with equal probability.
Reimplemented from Genstruct. Definition at line 381 of file genes.cc. References AnyIntGene::mMax, and AnyIntGene::mMin. Referenced by pointMutate(). |
|
Implementation for Genstruct. If the mutation actualizes, it mutates the integer gene into any other value with uniform probability.
Reimplemented from Genstruct. Definition at line 397 of file genes.cc. References MutationRate::doubleVariance(), init(), MutationRate::intRate(), AnyIntGene::mMax, and Gene::mutability. |
|
Recursively prints the genome to the given stream. This is most cool. Reimplemented from Genstruct. Definition at line 419 of file genes.cc. References Genstruct::id. |
|
Clones a copy of self, RECURSIVELY. It's funny how simple reproduction is nowadays. Reimplemented from Genstruct. Definition at line 644 of file genes.h. References IntGene(). |
|
Sets the value of the gene.
|