diff options
| author | Mike Buland <mike@xagasoft.com> | 2012-07-09 12:01:50 -0600 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2012-07-09 12:01:50 -0600 |
| commit | 1f7c135934b6604c5409d4b6f34861105c0a64cb (patch) | |
| tree | cc421e2e8620b72e202f0eddf2cd5f1478d3bc06 /src/phenotype.cpp | |
| parent | 40ee7ad5aeadeb9823e1cd6e1218a1999c608a65 (diff) | |
| download | libgenetic-1f7c135934b6604c5409d4b6f34861105c0a64cb.tar.gz libgenetic-1f7c135934b6604c5409d4b6f34861105c0a64cb.tar.bz2 libgenetic-1f7c135934b6604c5409d4b6f34861105c0a64cb.tar.xz libgenetic-1f7c135934b6604c5409d4b6f34861105c0a64cb.zip | |
It works well enough to solve polynomial maxima.
Diffstat (limited to 'src/phenotype.cpp')
| -rw-r--r-- | src/phenotype.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/phenotype.cpp b/src/phenotype.cpp index 1eca170..b965ffd 100644 --- a/src/phenotype.cpp +++ b/src/phenotype.cpp | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | #include "genetic/phenotype.h" | 1 | #include "genetic/phenotype.h" |
| 2 | 2 | ||
| 3 | Genetic::Phenotype::Phenotype() | 3 | Genetic::Phenotype::Phenotype() : |
| 4 | tCreated( 0 ), | ||
| 5 | uId( 0 ), | ||
| 6 | bActive( false ) | ||
| 4 | { | 7 | { |
| 5 | } | 8 | } |
| 6 | 9 | ||
| @@ -8,3 +11,19 @@ Genetic::Phenotype::~Phenotype() | |||
| 8 | { | 11 | { |
| 9 | } | 12 | } |
| 10 | 13 | ||
| 14 | bool Genetic::Phenotype::hasProperty( const Bu::String &sKey ) const | ||
| 15 | { | ||
| 16 | return hProp.has( sKey ); | ||
| 17 | } | ||
| 18 | |||
| 19 | Bu::Variant Genetic::Phenotype::getProperty( const Bu::String &sKey ) const | ||
| 20 | { | ||
| 21 | return hProp.get( sKey ); | ||
| 22 | } | ||
| 23 | |||
| 24 | void Genetic::Phenotype::setProperty( const Bu::String &sKey, | ||
| 25 | Bu::Variant vValue ) | ||
| 26 | { | ||
| 27 | hProp.insert( sKey, vValue ); | ||
| 28 | } | ||
| 29 | |||
