summaryrefslogtreecommitdiff
path: root/src/phenotypebinary.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2012-07-09 15:34:11 -0600
committerMike Buland <mike@xagasoft.com>2012-07-09 15:34:11 -0600
commita48556c1c5c01892cf493cd3eb4ff969a2f548fd (patch)
treeafd36d14133069fed0fcfccefb827c92da51496c /src/phenotypebinary.h
parentd9dc8bda6278cc1f64b3656336d3f01472458303 (diff)
downloadlibgenetic-a48556c1c5c01892cf493cd3eb4ff969a2f548fd.tar.gz
libgenetic-a48556c1c5c01892cf493cd3eb4ff969a2f548fd.tar.bz2
libgenetic-a48556c1c5c01892cf493cd3eb4ff969a2f548fd.tar.xz
libgenetic-a48556c1c5c01892cf493cd3eb4ff969a2f548fd.zip
Simple saving/loading - consider this temporary.
It should be a little more compact, and have more header info so we can reconstruct the entire object from the file, right now you have to know the size in bits.
Diffstat (limited to '')
-rw-r--r--src/phenotypebinary.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/phenotypebinary.h b/src/phenotypebinary.h
index cbae392..f312187 100644
--- a/src/phenotypebinary.h
+++ b/src/phenotypebinary.h
@@ -3,6 +3,8 @@
3 3
4#include "genetic/phenotype.h" 4#include "genetic/phenotype.h"
5 5
6#include <bu/stream.h>
7
6namespace Genetic 8namespace Genetic
7{ 9{
8 class PhenotypeBinary : public Phenotype 10 class PhenotypeBinary : public Phenotype
@@ -22,6 +24,9 @@ namespace Genetic
22 void extractBits( uint32_t &rTarget, int iStart, int iBits ); 24 void extractBits( uint32_t &rTarget, int iStart, int iBits );
23 void extractBits( uint64_t &rTarget, int iStart, int iBits ); 25 void extractBits( uint64_t &rTarget, int iStart, int iBits );
24 26
27 void write( Bu::Stream &rStream );
28 void read( Bu::Stream &rStream );
29
25 private: 30 private:
26 int iSize; 31 int iSize;
27 int iWords; 32 int iWords;