BinaryGene Class Reference
Abstract class representing a binary gene.
#include <BinaryGene.h>
Inheritance diagram for BinaryGene:

Public Member Functions | |
| BinaryGene (int bits, Random *random) | |
| Constructor. | |
| BinaryGene (BinaryGene &binaryGene) | |
| Copy constructor. | |
| BinaryGene (BinaryGene *binaryGene) | |
| Copy constructor. | |
| ~BinaryGene () | |
| Destructor. | |
| int | bitFlipMutation (double mutationProbability) |
| void | singlePointCrossover (int point, Gene *gene) |
| Bitwise crossover between two genes. | |
| int | getNumberOfBits () |
| void | writeGenotype (ofstream &outputFile) |
| void | printGenotype () |
| BinaryGene & | operator= (const BinaryGene &binaryGene) |
| bool | operator== (const BinaryGene &binaryGene) |
| bool | operator!= (const BinaryGene &binaryGene) |
Public Attributes | |
| bitset< MAX_LENGTH > | allele_ |
| int | numberOfBits_ |
Static Private Attributes | |
| static const int | MAX_LENGTH = 512 |
Friends | |
| ostream & | operator<< (ostream &outputStream, BinaryGene &gene) |
Detailed Description
Definition at line 20 of file BinaryGene.h.
Constructor & Destructor Documentation
|
||||||||||||
|
Definition at line 18 of file BinaryGene.cpp. References allele_, MAX_LENGTH, numberOfBits_, Gene::random_, and Random::rnd(). |
|
|
Definition at line 45 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
|
|
Definition at line 63 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
|
|
Destructor of the class Definition at line 80 of file BinaryGene.cpp. |
Member Function Documentation
|
|
Reimplemented from Gene. Definition at line 103 of file BinaryGene.cpp. References allele_, Random::flip(), numberOfBits_, and Gene::random_. |
|
|
Reimplemented from Gene. Definition at line 84 of file BinaryGene.cpp. References numberOfBits_. |
|
|
Definition at line 154 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
|
|
Definition at line 137 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
|
|
Definition at line 146 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
|
|
Implements Gene. Definition at line 129 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
|
||||||||||||
|
Reimplemented from Gene. Definition at line 93 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
|
|
Implements Gene. Definition at line 120 of file BinaryGene.cpp. References allele_, and numberOfBits_. |
Friends And Related Function Documentation
|
||||||||||||
|
Definition at line 162 of file BinaryGene.cpp. |
Member Data Documentation
|
|
Definition at line 24 of file BinaryGene.h. Referenced by BinaryGene(), bitFlipMutation(), operator!=(), operator<<(), operator=(), operator==(), printGenotype(), singlePointCrossover(), and writeGenotype(). |
|
|
Definition at line 22 of file BinaryGene.h. Referenced by BinaryGene(). |
|
|
Definition at line 25 of file BinaryGene.h. Referenced by BinaryGene(), bitFlipMutation(), getNumberOfBits(), operator!=(), operator<<(), operator=(), operator==(), printGenotype(), singlePointCrossover(), and writeGenotype(). |
The documentation for this class was generated from the following files: