diff options
author | Mike Buland <mike@xagasoft.com> | 2012-07-09 08:39:37 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2012-07-09 08:39:37 -0600 |
commit | 40ee7ad5aeadeb9823e1cd6e1218a1999c608a65 (patch) | |
tree | 6e819d8406d818eaa63cb6f04e2a129b8561c213 /src/operator.h | |
download | libgenetic-40ee7ad5aeadeb9823e1cd6e1218a1999c608a65.tar.gz libgenetic-40ee7ad5aeadeb9823e1cd6e1218a1999c608a65.tar.bz2 libgenetic-40ee7ad5aeadeb9823e1cd6e1218a1999c608a65.tar.xz libgenetic-40ee7ad5aeadeb9823e1cd6e1218a1999c608a65.zip |
New libgenetic. Genetic algorithms, only good.
Diffstat (limited to '')
-rw-r--r-- | src/operator.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/operator.h b/src/operator.h new file mode 100644 index 0000000..8688667 --- /dev/null +++ b/src/operator.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef GENETIC_OPERATOR_H | ||
2 | #define GENETIC_OPERATOR_H | ||
3 | |||
4 | #include <bu/list.h> | ||
5 | |||
6 | namespace Genetic | ||
7 | { | ||
8 | class Phenotype; | ||
9 | typedef Bu::List<Phenotype *> PhenotypeList; | ||
10 | |||
11 | class Operator | ||
12 | { | ||
13 | public: | ||
14 | Operator(); | ||
15 | virtual ~Operator(); | ||
16 | |||
17 | virtual Phenotype *random()=0; | ||
18 | virtual int parentCount()=0; | ||
19 | virtual Phenotype *mate( const PhenotypeList &lParents )=0; | ||
20 | |||
21 | private: | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | #endif | ||