#include <genes.h>
Inheritance diagram for BinaryGene:
Public Methods | |
BinaryGene () | |
BinaryGene (const GeneticID &id, double mut=1.0, double initP=0.5) | |
BinaryGene & | set (bool value) |
bool | getvalue () const |
void | setInitP (double initP) |
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 DataOStream & | operator>> (DataOStream &out) const |
Definition at line 130 of file genes.h.
|
Default constructor, FORBIDDEN! Exists only because of RTTI system.
Definition at line 136 of file genes.h. Referenced by replicate(). |
|
The standard constructor.
Definition at line 86 of file genes.cc. References init(). |
|
Implementation for Genstruct.
Reimplemented from Gene. Definition at line 120 of file genes.cc. References Gene::copy(). |
|
Implementation for Genstruct. The distance is calculated as trivial case of Hamming distance. Reimplemented from Genstruct. |
|
Returns the value of the gene as either true (1) or false (0).
|
|
Implementation for Genstruct.
Reimplemented from Genstruct. Definition at line 93 of file genes.cc. Referenced by BinaryGene(). |
|
Implementation for Object.
Reimplemented from Genstruct. Definition at line 129 of file genes.cc. References Genstruct::id, and Gene::mutability. |
|
Implementation for Genstruct. Flips the current value over with propability k*c, where c is the gene-local probability coefficient, and k is described below.
Reimplemented from Genstruct. Definition at line 97 of file genes.cc. References MutationRate::autoAdaptation(), MutationRate::binaryRate(), and Gene::mutability. |
|
Implementation for Genstruct.
Reimplemented from Genstruct. |
|
Implementation for Genstruct.
Reimplemented from Genstruct. Definition at line 190 of file genes.h. References BinaryGene(). |
|
Sets the value of the gene.
|
|
Sets the probability of value 1 in initialization. The default initialization probability (see the constructor) is 0.5. |