#ifndef GENETIC_PHENOTYPE_BINARY_H #define GENETIC_PHENOTYPE_BINARY_H #include "genetic/phenotype.h" namespace Genetic { class PhenotypeBinary : public Phenotype { public: PhenotypeBinary( int iSize, bool bRandom=false ); virtual ~PhenotypeBinary(); virtual int getSize() { return iSize; } virtual Phenotype &randomize(); virtual void mutate( int iLocation, float fMagnitude ); virtual Phenotype *makeEmptyOffspring( int iNewSize=-1 ); virtual Phenotype ©From( const Phenotype &rSrc, int iStart, int iCount, int iDest=-1 ); virtual Bu::String toString(); private: int iSize; int iWords; uint_fast32_t *aGenes; }; }; #endif