Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members

BinaryGrayRealGene Class Reference

#include <BinaryGrayRealGene.h>

Inheritance diagram for BinaryGrayRealGene:

Gene List of all members.

Public Member Functions

 BinaryGrayRealGene (int numberOfBits, double lowerBound, double upperBound, Random *random)
 BinaryGrayRealGene (BinaryGrayRealGene &binaryGrayRealGene)
 Copy constructor.

 BinaryGrayRealGene (BinaryGrayRealGene *binaryGrayRealGene)
 Copy constructor.

int bitFlipMutation (double mutationProbability)
double getRealAllele ()
void writeGenotype (ofstream &outputFile)
BinaryGrayRealGeneoperator= (const BinaryGrayRealGene &gene)

Public Attributes

char * binaryAllele_
int numberOfBits_
double realAllele_
double lowerBound_
double upperBound_

Private Member Functions

void decodeGene (double lowerLimit, double upperLimit)

Friends

ostream & operator<< (ostream &outputStream, BinaryGrayRealGene &gene)

Constructor & Destructor Documentation

BinaryGrayRealGene::BinaryGrayRealGene int  numberOfBits,
double  lowerBound,
double  upperBound,
Random random
 

Definition at line 3 of file BinaryGrayRealGene.cpp.

References BINARY_GRAY_REAL, binaryAllele_, lowerBound_, numberOfBits_, Gene::random_, realAllele_, Random::rnd(), Random::rndreal(), and upperBound_.

BinaryGrayRealGene::BinaryGrayRealGene BinaryGrayRealGene gene  ) 
 

Parameters:
individual The individual to copy
Constructor of the class

Definition at line 37 of file BinaryGrayRealGene.cpp.

References binaryAllele_, lowerBound_, numberOfBits_, realAllele_, and upperBound_.

BinaryGrayRealGene::BinaryGrayRealGene BinaryGrayRealGene gene  ) 
 

Parameters:
individual The individual to copy
Constructor of the class

Definition at line 66 of file BinaryGrayRealGene.cpp.

References binaryAllele_, lowerBound_, numberOfBits_, realAllele_, and upperBound_.


Member Function Documentation

int BinaryGrayRealGene::bitFlipMutation double  mutationProbability  )  [virtual]
 

Reimplemented from Gene.

Definition at line 102 of file BinaryGrayRealGene.cpp.

References binaryAllele_, Random::flip(), lowerBound_, numberOfBits_, Gene::random_, realAllele_, Random::rndreal(), and upperBound_.

void BinaryGrayRealGene::decodeGene double  lowerLimit,
double  upperLimit
[private]
 

Definition at line 146 of file BinaryGrayRealGene.cpp.

double BinaryGrayRealGene::getRealAllele  )  [virtual]
 

Reimplemented from Gene.

Definition at line 141 of file BinaryGrayRealGene.cpp.

References realAllele_.

BinaryGrayRealGene & BinaryGrayRealGene::operator= const BinaryGrayRealGene gene  ) 
 

Definition at line 88 of file BinaryGrayRealGene.cpp.

References binaryAllele_, lowerBound_, numberOfBits_, realAllele_, and upperBound_.

void BinaryGrayRealGene::writeGenotype ofstream &  outputFile  )  [virtual]
 

Implements Gene.

Definition at line 123 of file BinaryGrayRealGene.cpp.


Friends And Related Function Documentation

ostream& operator<< ostream &  outputStream,
BinaryGrayRealGene gene
[friend]
 

Definition at line 127 of file BinaryGrayRealGene.cpp.


Member Data Documentation

char* BinaryGrayRealGene::binaryAllele_
 

Definition at line 11 of file BinaryGrayRealGene.h.

Referenced by BinaryGrayRealGene(), bitFlipMutation(), operator<<(), and operator=().

double BinaryGrayRealGene::lowerBound_
 

Definition at line 14 of file BinaryGrayRealGene.h.

Referenced by BinaryGrayRealGene(), bitFlipMutation(), and operator=().

int BinaryGrayRealGene::numberOfBits_
 

Definition at line 12 of file BinaryGrayRealGene.h.

Referenced by BinaryGrayRealGene(), bitFlipMutation(), operator<<(), and operator=().

double BinaryGrayRealGene::realAllele_
 

Definition at line 13 of file BinaryGrayRealGene.h.

Referenced by BinaryGrayRealGene(), bitFlipMutation(), getRealAllele(), operator<<(), and operator=().

double BinaryGrayRealGene::upperBound_
 

Definition at line 15 of file BinaryGrayRealGene.h.

Referenced by BinaryGrayRealGene(), bitFlipMutation(), and operator=().


The documentation for this class was generated from the following files:
Generated on Wed Feb 11 10:38:03 2004 for Paes by doxygen 1.3.3