• Main Page
  • Namespaces
  • Classes
  • Files
  • Class List
  • Class Hierarchy
  • Class Members

BinaryGrayIntegerGene Class Reference

Abstract class representing a binary gray coded real gene.

#include <BinaryGrayIntegerGene.h>

Inheritance diagram for BinaryGrayIntegerGene:

BinaryIntegerGene Gene List of all members.

Public Member Functions

 BinaryGrayIntegerGene (int numberOfBits, int lowerBound, int upperBound, Random *random)
 Constructor.
 BinaryGrayIntegerGene (BinaryGrayIntegerGene &BinaryGrayIntegerGene)
 Copy constructor.
 BinaryGrayIntegerGene (BinaryGrayIntegerGene *BinaryGrayIntegerGene)
 Copy constructor.
virtual ~BinaryGrayIntegerGene ()
 Destructor.
double decodeToInteger ()
 Decodes a binary string into an integer value.
bitset< MAX_LENGTH > grayToBinary ()

Detailed Description

Definition at line 20 of file BinaryGrayIntegerGene.h.


Constructor & Destructor Documentation

BinaryGrayIntegerGene::BinaryGrayIntegerGene (  int  numberOfBits,
int  lowerBound,
int  upperBound,
Random *  random
) 
 

Parameters:
numberOfBits Bits of the binary allele
lowerBound Lower limit of the gene value
upperBound Upper limit of the gene value
random Pointer to the random number generator
Constructor of the class

Definition at line 20 of file BinaryGrayIntegerGene.cpp.

BinaryGrayIntegerGene::BinaryGrayIntegerGene (  BinaryGrayIntegerGene &  gene  ) 
 

Parameters:
gene The gene to copy
Constructor of the class

Definition at line 35 of file BinaryGrayIntegerGene.cpp.

BinaryGrayIntegerGene::BinaryGrayIntegerGene (  BinaryGrayIntegerGene *  gene  ) 
 

Parameters:
gene The gene to copy
Constructor of the class

Definition at line 47 of file BinaryGrayIntegerGene.cpp.

BinaryGrayIntegerGene::~BinaryGrayIntegerGene (   )  [virtual]
 

Destructor of the class

Definition at line 56 of file BinaryGrayIntegerGene.cpp.


Member Function Documentation

double BinaryGrayIntegerGene::decodeToInteger (   ) 
 

Reimplemented from BinaryIntegerGene.

Definition at line 70 of file BinaryGrayIntegerGene.cpp.

References grayToBinary(), and BinaryIntegerGene::numberOfBits_.

bitset< BinaryIntegerGene::MAX_LENGTH > BinaryGrayIntegerGene::grayToBinary (   ) 
 

Definition at line 59 of file BinaryGrayIntegerGene.cpp.

References BinaryIntegerGene::binaryAllele_, and BinaryIntegerGene::numberOfBits_.

Referenced by decodeToInteger().


The documentation for this class was generated from the following files:
  • BinaryGrayIntegerGene.h
  • BinaryGrayIntegerGene.cpp

Our Software

orangebox Mallba

orangebox ssGA

orangebox JGDS

orangebox xxGA

orangebox JCell

orangebox MHTB

orangebox DEME

orangebox JMetal

orangebox More...

orangebox Go Back