From 3cdf68e08d438a0ced0f5f8d957a6aafd68cb43a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 2 Aug 2012 15:20:58 -0600 Subject: New commit method --- src/tests/binary.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/tests') diff --git a/src/tests/binary.cpp b/src/tests/binary.cpp index 717c171..727feec 100644 --- a/src/tests/binary.cpp +++ b/src/tests/binary.cpp @@ -13,24 +13,30 @@ int main( int argc, char *argv[] ) Bu::Random::setGenerator(); Bu::Random::seed( time( NULL ) ); - Genetic::OperatorBasic op( new Genetic::PhenotypeBinary( 45 ), 0.1 ); + Genetic::OperatorBasic op( new Genetic::PhenotypeBinary( 422*1024 ), 0.0 ); Genetic::Phenotype *pPb1 = op.random(); Genetic::Phenotype *pPb2 = op.random(); Genetic::Phenotype *pPb3; - sio << pPb1->toString() << sio.nl; - sio << pPb2->toString() << sio.nl; +// sio << pPb1->toString() << sio.nl; +// sio << pPb2->toString() << sio.nl; Genetic::PhenotypeList lParents; lParents.append( pPb1 ); lParents.append( pPb2 ); - pPb3 = op.mate( lParents ); - sio << pPb3->toString() << sio.nl; + for( int j = 0; j < 1000; j++ ) + { + delete op.mate( lParents ); + } + +// pPb3 = pPb1->makeEmptyOffspring(); +// pPb3->copyFrom( *pPb1, 4, 88 ); +// sio << pPb3->toString() << sio.nl; delete pPb1; delete pPb2; - delete pPb3; +// delete pPb3; return 0; } -- cgit v1.2.3