base class for chromosomes that are of the template type std::vector More...
#include <ChromosomeT.h>
Public Member Functions | |
| ChromosomeT_base () | |
| ChromosomeT_base (unsigned l) | |
| ChromosomeT_base (unsigned l, const T &v) | |
| ChromosomeT_base (const std::vector< T > &v) | |
| const char * | typeOfAlleles () const |
| unsigned | sizeOfAlleles () const |
| unsigned | size () const |
| Chromosome & | operator= (const Chromosome &c) |
| Chromosome & | operator= (const std::vector< T > &c) |
| Chromosome & | operator= (const ChromosomeT_base< T > &c) |
| Chromosome & | operator= (const T &c) |
| void | resize (unsigned n) |
| void | duplicate (unsigned start, unsigned stop, unsigned dest) |
| void | invert (unsigned start, unsigned stop, unsigned granularity=1) |
| void | invert (unsigned granularity=1) |
| void | transcribe (unsigned start, unsigned stop, const Chromosome &chrom) |
| void | swap (unsigned i, unsigned j) |
| void | shuffle () |
| void | replace (unsigned i, const T &v) |
| void | replace (unsigned i, const Chromosome &chrom) |
| void | insert (unsigned i, const T &allele) |
| void | insert (unsigned i, const Chromosome &chrom) |
| void | append (const T &allele) |
| void | append (const Chromosome &chrom) |
| void | remove (unsigned i) |
| void | remove (unsigned i, unsigned k) |
| void | rotateRight (unsigned n=1) |
| void | rotateLeft (unsigned n=1) |
| void | crossover (const Chromosome &dadChrom, const Chromosome &momChrom, const std::vector< unsigned > &points) |
| void | crossover (Chromosome &mate, const std::vector< unsigned > &points) |
| void | crossover (const Chromosome &dadChrom, const Chromosome &momChrom, const std::vector< bool > &pos) |
| void | crossover (Chromosome &mate, const std::vector< bool > &pos) |
| void | crossover (const Chromosome &dadChrom, const Chromosome &momChrom, unsigned npoints, unsigned align=1, bool chromswap=0) |
| void | crossover (Chromosome &mate, unsigned npoints, unsigned align=1, bool chromswap=0) |
| void | crossover (const Chromosome &dadChrom, const Chromosome &momChrom, const Chromosome &posChrom) |
| void | crossover (Chromosome &mate, const Chromosome &posChrom) |
| void | crossoverUniform (const Chromosome &dadChrom, const Chromosome &momChrom, const std::vector< bool > &pos) |
| void | crossoverUniform (Chromosome &mateChrom, const std::vector< bool > &pos) |
| void | crossoverUniform (const Chromosome &dadChrom, const Chromosome &momChrom) |
| void | crossoverUniform (Chromosome &mateChrom) |
| void | crossoverUniform (const Chromosome &dadChrom, const Chromosome &momChrom, const Chromosome &posChrom) |
| void | crossoverUniform (Chromosome &mateChrom, const Chromosome &posChrom) |
| void | recombineDiscrete (const Chromosome &dad, const Chromosome &mom) |
| void | recombineDiscrete (Chromosome &mate) |
| void | writeTo (std::ostream &os) const |
| void | readFrom (std::istream &is) |
Protected Member Functions | |
| Chromosome * | clone () const |
| Chromosome * | empty () const |
base class for chromosomes that are of the template type std::vector
Definition at line 68 of file ChromosomeT.h.
| ChromosomeT_base< T >::ChromosomeT_base | ( | ) | [inline] |
Definition at line 71 of file ChromosomeT.h.
| ChromosomeT_base< T >::ChromosomeT_base | ( | unsigned | l | ) | [inline, explicit] |
Definition at line 73 of file ChromosomeT.h.
| ChromosomeT_base< T >::ChromosomeT_base | ( | unsigned | l, | |
| const T & | v | |||
| ) | [inline] |
Definition at line 75 of file ChromosomeT.h.
| ChromosomeT_base< T >::ChromosomeT_base | ( | const std::vector< T > & | v | ) | [inline] |
Definition at line 77 of file ChromosomeT.h.
| void ChromosomeT_base< T >::append | ( | const Chromosome & | chrom | ) | [inline] |
Definition at line 310 of file ChromosomeT.h.
| void ChromosomeT_base< T >::append | ( | const T & | allele | ) | [inline] |
Definition at line 300 of file ChromosomeT.h.
| Chromosome* ChromosomeT_base< T >::clone | ( | ) | const [inline, protected, virtual] |
Implements Chromosome.
Reimplemented in ChromosomeCMA, ChromosomeCMACholesky, ChromosomeT< T >, ChromosomeT< double >, ChromosomeT< char >, ChromosomeT< int >, and ChromosomeT< bool >.
Definition at line 855 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | Chromosome & | mate, | |
| const Chromosome & | posChrom | |||
| ) | [inline] |
Definition at line 636 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | const Chromosome & | dadChrom, | |
| const Chromosome & | momChrom, | |||
| const Chromosome & | posChrom | |||
| ) | [inline] |
Definition at line 623 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | Chromosome & | mate, | |
| unsigned | npoints, | |||
| unsigned | align = 1, |
|||
| bool | chromswap = 0 | |||
| ) | [inline] |
Definition at line 593 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | const Chromosome & | dadChrom, | |
| const Chromosome & | momChrom, | |||
| unsigned | npoints, | |||
| unsigned | align = 1, |
|||
| bool | chromswap = 0 | |||
| ) | [inline] |
Definition at line 562 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | Chromosome & | mate, | |
| const std::vector< bool > & | pos | |||
| ) | [inline] |
Definition at line 527 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | const Chromosome & | dadChrom, | |
| const Chromosome & | momChrom, | |||
| const std::vector< bool > & | pos | |||
| ) | [inline] |
Definition at line 495 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | Chromosome & | mate, | |
| const std::vector< unsigned > & | points | |||
| ) | [inline] |
Definition at line 444 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossover | ( | const Chromosome & | dadChrom, | |
| const Chromosome & | momChrom, | |||
| const std::vector< unsigned > & | points | |||
| ) | [inline] |
Definition at line 394 of file ChromosomeT.h.
Referenced by ChromosomeT_base< bool >::crossover().
| void ChromosomeT_base< T >::crossoverUniform | ( | Chromosome & | mateChrom, | |
| const Chromosome & | posChrom | |||
| ) | [inline] |
Definition at line 768 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossoverUniform | ( | const Chromosome & | dadChrom, | |
| const Chromosome & | momChrom, | |||
| const Chromosome & | posChrom | |||
| ) | [inline] |
Definition at line 755 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossoverUniform | ( | Chromosome & | mateChrom | ) | [inline] |
Definition at line 724 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossoverUniform | ( | const Chromosome & | dadChrom, | |
| const Chromosome & | momChrom | |||
| ) | [inline] |
Definition at line 702 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossoverUniform | ( | Chromosome & | mateChrom, | |
| const std::vector< bool > & | pos | |||
| ) | [inline] |
Definition at line 670 of file ChromosomeT.h.
| void ChromosomeT_base< T >::crossoverUniform | ( | const Chromosome & | dadChrom, | |
| const Chromosome & | momChrom, | |||
| const std::vector< bool > & | pos | |||
| ) | [inline] |
Definition at line 647 of file ChromosomeT.h.
Referenced by ChromosomeT_base< bool >::crossoverUniform(), and ChromosomeT_base< bool >::recombineDiscrete().
| void ChromosomeT_base< T >::duplicate | ( | unsigned | start, | |
| unsigned | stop, | |||
| unsigned | dest | |||
| ) | [inline, virtual] |
Implements Chromosome.
Definition at line 142 of file ChromosomeT.h.
| Chromosome* ChromosomeT_base< T >::empty | ( | ) | const [inline, protected, virtual] |
Implements Chromosome.
Reimplemented in ChromosomeCMA, ChromosomeCMACholesky, ChromosomeT< T >, ChromosomeT< double >, ChromosomeT< char >, ChromosomeT< int >, and ChromosomeT< bool >.
Definition at line 859 of file ChromosomeT.h.
| void ChromosomeT_base< T >::insert | ( | unsigned | i, | |
| const Chromosome & | chrom | |||
| ) | [inline] |
Definition at line 288 of file ChromosomeT.h.
| void ChromosomeT_base< T >::insert | ( | unsigned | i, | |
| const T & | allele | |||
| ) | [inline] |
Definition at line 277 of file ChromosomeT.h.
Referenced by ChromosomeT_base< bool >::append(), ChromosomeT_base< bool >::insert(), and ChromosomeT_base< bool >::resize().
| void ChromosomeT_base< T >::invert | ( | unsigned | granularity = 1 |
) | [inline] |
Definition at line 190 of file ChromosomeT.h.
| void ChromosomeT_base< T >::invert | ( | unsigned | start, | |
| unsigned | stop, | |||
| unsigned | granularity = 1 | |||
| ) | [inline, virtual] |
Implements Chromosome.
Definition at line 161 of file ChromosomeT.h.
Referenced by ChromosomeT_base< bool >::invert().
| Chromosome& ChromosomeT_base< T >::operator= | ( | const T & | c | ) | [inline] |
Definition at line 115 of file ChromosomeT.h.
| Chromosome& ChromosomeT_base< T >::operator= | ( | const ChromosomeT_base< T > & | c | ) | [inline, virtual] |
Implements Chromosome.
Definition at line 109 of file ChromosomeT.h.
| Chromosome& ChromosomeT_base< T >::operator= | ( | const std::vector< T > & | c | ) | [inline] |
Definition at line 100 of file ChromosomeT.h.
| Chromosome& ChromosomeT_base< T >::operator= | ( | const Chromosome & | c | ) | [inline] |
Definition at line 94 of file ChromosomeT.h.
| void ChromosomeT_base< T >::readFrom | ( | std::istream & | is | ) | [inline, virtual] |
Implements Chromosome.
Reimplemented in ChromosomeT< T >, ChromosomeT< double >, ChromosomeT< char >, ChromosomeT< int >, and ChromosomeT< bool >.
Definition at line 823 of file ChromosomeT.h.
| void ChromosomeT_base< T >::recombineDiscrete | ( | Chromosome & | mate | ) | [inline] |
Definition at line 791 of file ChromosomeT.h.
| void ChromosomeT_base< T >::recombineDiscrete | ( | const Chromosome & | dad, | |
| const Chromosome & | mom | |||
| ) | [inline] |
Definition at line 780 of file ChromosomeT.h.
| void ChromosomeT_base< T >::remove | ( | unsigned | i, | |
| unsigned | k | |||
| ) | [inline, virtual] |
Implements Chromosome.
Definition at line 332 of file ChromosomeT.h.
| void ChromosomeT_base< T >::remove | ( | unsigned | i | ) | [inline, virtual] |
Implements Chromosome.
Definition at line 321 of file ChromosomeT.h.
| void ChromosomeT_base< T >::replace | ( | unsigned | i, | |
| const Chromosome & | chrom | |||
| ) | [inline] |
Definition at line 265 of file ChromosomeT.h.
| void ChromosomeT_base< T >::replace | ( | unsigned | i, | |
| const T & | v | |||
| ) | [inline] |
Definition at line 254 of file ChromosomeT.h.
| void ChromosomeT_base< T >::resize | ( | unsigned | n | ) | [inline, virtual] |
Implements Chromosome.
Definition at line 125 of file ChromosomeT.h.
Referenced by ChromosomeT_base< bool >::crossover(), ChromosomeT_base< bool >::crossoverUniform(), ChromosomeT< double >::decodeBinary(), ChromosomeT< bool >::encode(), ChromosomeT< bool >::encodeBinary(), CMSA::init(), CMA::init(), ChromosomeT_num< char >::initialize(), ChromosomeT< bool >::readFrom(), ChromosomeT< int >::readFrom(), ChromosomeT< char >::readFrom(), ChromosomeT< double >::readFrom(), ChromosomeT_base< bool >::readFrom(), ChromosomeT< double >::recombineGenIntermediate(), ChromosomeT< double >::recombineGeomIntermediate(), ChromosomeT< double >::recombineIntermediate(), and ChromosomeT_base< bool >::transcribe().
| void ChromosomeT_base< T >::rotateLeft | ( | unsigned | n = 1 |
) | [inline, virtual] |
Implements Chromosome.
Definition at line 370 of file ChromosomeT.h.
| void ChromosomeT_base< T >::rotateRight | ( | unsigned | n = 1 |
) | [inline, virtual] |
Implements Chromosome.
Definition at line 350 of file ChromosomeT.h.
| void ChromosomeT_base< T >::shuffle | ( | ) | [inline, virtual] |
Implements Chromosome.
Definition at line 243 of file ChromosomeT.h.
| unsigned ChromosomeT_base< T >::size | ( | ) | const [inline, virtual] |
Implements Chromosome.
Definition at line 89 of file ChromosomeT.h.
Referenced by ChromosomeT< double >::accumulate(), ChromosomeT_base< bool >::crossover(), ChromosomeT_base< bool >::crossoverUniform(), ChromosomeT_num< char >::cutOff(), ChromosomeT< bool >::decode(), ChromosomeT< double >::decodeBinary(), ChromosomeT_base< bool >::duplicate(), ChromosomeT< bool >::flip(), ChromosomeT< bool >::initialize(), ChromosomeT_num< char >::initialize(), ChromosomeT_base< bool >::insert(), ChromosomeT_base< bool >::invert(), ChromosomeT< double >::mutateCauchy(), ChromosomeT< int >::mutateDiffGeom(), ChromosomeT< double >::mutateLogNormal(), ChromosomeT< double >::mutateNormal(), ChromosomeT< double >::mutateNormalRotAngles(), ChromosomeT_num< char >::mutateUniform(), ChromosomeT_base< bool >::operator=(), ChromosomeT< bool >::pvm_pkchrom(), ChromosomeT< int >::pvm_pkchrom(), ChromosomeT< char >::pvm_pkchrom(), ChromosomeT< double >::pvm_pkchrom(), ChromosomeT< bool >::pvm_upkchrom(), ChromosomeT< int >::pvm_upkchrom(), ChromosomeT< char >::pvm_upkchrom(), ChromosomeT< double >::pvm_upkchrom(), ChromosomeT< bool >::readFrom(), ChromosomeT< int >::readFrom(), ChromosomeT< char >::readFrom(), ChromosomeT< double >::readFrom(), ChromosomeT< T >::readFrom(), ChromosomeT_base< bool >::readFrom(), ChromosomeT< double >::recombineGenIntermediate(), ChromosomeT< double >::recombineGeomIntermediate(), ChromosomeT< double >::recombineIntermediate(), ChromosomeT_base< bool >::remove(), ChromosomeT_base< bool >::replace(), ChromosomeT_base< bool >::resize(), ChromosomeT_base< bool >::rotateLeft(), ChromosomeT_base< bool >::rotateRight(), ChromosomeT< double >::SBX(), ChromosomeT_base< bool >::shuffle(), ChromosomeT< double >::simpleMutatePolynomial(), ChromosomeT_base< bool >::size(), ChromosomeT_base< bool >::swap(), ChromosomeT< bool >::writeTo(), ChromosomeT< int >::writeTo(), ChromosomeT< char >::writeTo(), ChromosomeT< double >::writeTo(), ChromosomeT< T >::writeTo(), and ChromosomeT_base< bool >::writeTo().
| unsigned ChromosomeT_base< T >::sizeOfAlleles | ( | ) | const [inline, virtual] |
Implements Chromosome.
Definition at line 84 of file ChromosomeT.h.
| void ChromosomeT_base< T >::swap | ( | unsigned | i, | |
| unsigned | j | |||
| ) | [inline, virtual] |
Implements Chromosome.
Definition at line 222 of file ChromosomeT.h.
Referenced by ChromosomeT_base< bool >::crossover(), ChromosomeT_base< bool >::crossoverUniform(), ChromosomeT_base< bool >::invert(), ChromosomeT_base< bool >::shuffle(), and ChromosomeT_base< bool >::swap().
| void ChromosomeT_base< T >::transcribe | ( | unsigned | start, | |
| unsigned | stop, | |||
| const Chromosome & | chrom | |||
| ) | [inline] |
Definition at line 200 of file ChromosomeT.h.
| const char* ChromosomeT_base< T >::typeOfAlleles | ( | ) | const [inline, virtual] |
Implements Chromosome.
Definition at line 80 of file ChromosomeT.h.
| void ChromosomeT_base< T >::writeTo | ( | std::ostream & | os | ) | const [inline, virtual] |
Implements Chromosome.
Reimplemented in ChromosomeT< T >, ChromosomeT< double >, ChromosomeT< char >, ChromosomeT< int >, and ChromosomeT< bool >.
Definition at line 801 of file ChromosomeT.h.