ChromosomeT< bool > Class Template Reference

chromosome based on bits More...

#include <ChromosomeT.h>

Inheritance diagram for ChromosomeT< bool >:

ChromosomeT_base< bool > Chromosome vector

List of all members.

Public Member Functions

 ChromosomeT ()
 ChromosomeT (unsigned l)
 ChromosomeT (unsigned l, const bool &v)
 ChromosomeT (const std::vector< bool > &v)
void initialize ()
void initialize (const unsigned pos)
void encode (double val, const Interval &range, unsigned nbits, bool useGray=false)
double decode (const Interval &range, bool useGray=false) const
void encodeBinary (const std::vector< double > &chrom, const Interval &range, unsigned nbits, bool useGray=false)
void encodeBinary (const Chromosome &chrom, const Interval &range, unsigned nbits, bool useGray=false)
void flip (double p)
void flip (const std::vector< double > &p, bool cycle=false)
void flip (const Chromosome &p, bool cycle=false)
bool operator== (const Chromosome &c) const
bool operator< (const Chromosome &c) const

Protected Member Functions

Chromosomeclone () const
Chromosomeempty () const
int pvm_pkchrom ()
int pvm_upkchrom ()
void writeTo (std::ostream &os) const
void readFrom (std::istream &is)


Detailed Description

template<>
class ChromosomeT< bool >

chromosome based on bits
Examples:

countingOnes.cpp, pvmSphereGA.cpp, sphereGA.cpp, and steadyState.cpp.

Definition at line 1583 of file ChromosomeT.h.


Constructor & Destructor Documentation

ChromosomeT< bool >::ChromosomeT (  )  [inline]

Definition at line 1586 of file ChromosomeT.h.

ChromosomeT< bool >::ChromosomeT ( unsigned  l  )  [inline, explicit]

Definition at line 1588 of file ChromosomeT.h.

ChromosomeT< bool >::ChromosomeT ( unsigned  l,
const bool &  v 
) [inline]

Definition at line 1591 of file ChromosomeT.h.

ChromosomeT< bool >::ChromosomeT ( const std::vector< bool > &  v  )  [inline]

Definition at line 1594 of file ChromosomeT.h.


Member Function Documentation

Chromosome* ChromosomeT< bool >::clone (  )  const [inline, protected, virtual]

Reimplemented from ChromosomeT_base< bool >.

Definition at line 1629 of file ChromosomeT.h.

double ChromosomeT< bool >::decode ( const Interval range,
bool  useGray = false 
) const

Chromosome* ChromosomeT< bool >::empty (  )  const [inline, protected, virtual]

Reimplemented from ChromosomeT_base< bool >.

Definition at line 1633 of file ChromosomeT.h.

void ChromosomeT< bool >::encode ( double  val,
const Interval range,
unsigned  nbits,
bool  useGray = false 
)

void ChromosomeT< bool >::encodeBinary ( const Chromosome chrom,
const Interval range,
unsigned  nbits,
bool  useGray = false 
)

Definition at line 128 of file ChromosomeT_bool.cpp.

void ChromosomeT< bool >::encodeBinary ( const std::vector< double > &  chrom,
const Interval range,
unsigned  nbits,
bool  useGray = false 
)

void ChromosomeT< bool >::flip ( const Chromosome p,
bool  cycle = false 
)

Definition at line 177 of file ChromosomeT_bool.cpp.

void ChromosomeT< bool >::flip ( const std::vector< double > &  p,
bool  cycle = false 
)

Definition at line 159 of file ChromosomeT_bool.cpp.

References ChromosomeT_base< T >::size().

void ChromosomeT< bool >::flip ( double  p  ) 

Definition at line 143 of file ChromosomeT_bool.cpp.

References ChromosomeT_base< T >::size().

void ChromosomeT< bool >::initialize ( const unsigned  pos  ) 

Definition at line 52 of file ChromosomeT_bool.cpp.

References ChromosomeT_base< T >::size().

void ChromosomeT< bool >::initialize (  ) 

Definition at line 46 of file ChromosomeT_bool.cpp.

References ChromosomeT_base< T >::size().

bool ChromosomeT< bool >::operator< ( const Chromosome c  )  const [virtual]

Reimplemented from Chromosome.

Definition at line 193 of file ChromosomeT_bool.cpp.

bool ChromosomeT< bool >::operator== ( const Chromosome c  )  const [virtual]

Reimplemented from Chromosome.

Definition at line 184 of file ChromosomeT_bool.cpp.

int ChromosomeT< bool >::pvm_pkchrom (  )  [inline, protected, virtual]

Part of PVM-send routine for type bool Chromosomes

Reimplemented from Chromosome.

Definition at line 1641 of file ChromosomeT.h.

References pvm_pkuint(), and ChromosomeT_base< T >::size().

int ChromosomeT< bool >::pvm_upkchrom (  )  [inline, protected, virtual]

Part of PVM-receive routine for type bool Chromosomes

Reimplemented from Chromosome.

Definition at line 1662 of file ChromosomeT.h.

References pvm_upkuint(), and ChromosomeT_base< T >::size().

void ChromosomeT< bool >::readFrom ( std::istream &  is  )  [inline, protected, virtual]

Reimplemented from ChromosomeT_base< bool >.

Definition at line 1690 of file ChromosomeT.h.

References ChromosomeT_base< T >::resize(), and ChromosomeT_base< T >::size().

void ChromosomeT< bool >::writeTo ( std::ostream &  os  )  const [inline, protected, virtual]

Reimplemented from ChromosomeT_base< bool >.

Definition at line 1682 of file ChromosomeT.h.

References ChromosomeT_base< T >::size().


The documentation for this class was generated from the following files: