diff options
| author | Mike Buland <mike@xagasoft.com> | 2012-08-04 18:34:57 -0600 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2012-08-04 18:34:57 -0600 |
| commit | 2406848173c445a94a1710106116ad796a8bacb9 (patch) | |
| tree | 7852d9e401d6c2833ee01c4a1c71f4fcc70a1362 /src/phenotypebinary.h | |
| parent | aaa733d789612289396d69bb6cf3a0e5de1798a8 (diff) | |
| download | libgenetic-2406848173c445a94a1710106116ad796a8bacb9.tar.gz libgenetic-2406848173c445a94a1710106116ad796a8bacb9.tar.bz2 libgenetic-2406848173c445a94a1710106116ad796a8bacb9.tar.xz libgenetic-2406848173c445a94a1710106116ad796a8bacb9.zip | |
Made some changes to make serializing workable.
There's no official format yet, but that's coming, most likely.
Diffstat (limited to 'src/phenotypebinary.h')
| -rw-r--r-- | src/phenotypebinary.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/phenotypebinary.h b/src/phenotypebinary.h index f312187..92146d2 100644 --- a/src/phenotypebinary.h +++ b/src/phenotypebinary.h | |||
| @@ -3,8 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #include "genetic/phenotype.h" | 4 | #include "genetic/phenotype.h" |
| 5 | 5 | ||
| 6 | #include <bu/stream.h> | ||
| 7 | |||
| 8 | namespace Genetic | 6 | namespace Genetic |
| 9 | { | 7 | { |
| 10 | class PhenotypeBinary : public Phenotype | 8 | class PhenotypeBinary : public Phenotype |
| @@ -21,12 +19,12 @@ namespace Genetic | |||
| 21 | int iCount, int iDest=-1 ); | 19 | int iCount, int iDest=-1 ); |
| 22 | virtual Bu::String toString(); | 20 | virtual Bu::String toString(); |
| 23 | 21 | ||
| 22 | virtual void write( Bu::Stream &rStream ); | ||
| 23 | virtual void read( Bu::Stream &rStream ); | ||
| 24 | |||
| 24 | void extractBits( uint32_t &rTarget, int iStart, int iBits ); | 25 | void extractBits( uint32_t &rTarget, int iStart, int iBits ); |
| 25 | void extractBits( uint64_t &rTarget, int iStart, int iBits ); | 26 | void extractBits( uint64_t &rTarget, int iStart, int iBits ); |
| 26 | 27 | ||
| 27 | void write( Bu::Stream &rStream ); | ||
| 28 | void read( Bu::Stream &rStream ); | ||
| 29 | |||
| 30 | private: | 28 | private: |
| 31 | int iSize; | 29 | int iSize; |
| 32 | int iWords; | 30 | int iWords; |
