Last change
on this file since 1277 was
1157,
checked in by Maciej Komosinski, 3 years ago
|
Improved f9 mutation
|
-
Property svn:eol-style set to
native
|
File size:
813 bytes
|
Rev | Line | |
---|
[286] | 1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
---|
[1157] | 2 | // Copyright (C) 1999-2021 Maciej Komosinski and Szymon Ulatowski. |
---|
[286] | 3 | // See LICENSE.txt for details. |
---|
[120] | 4 | |
---|
[779] | 5 | #ifndef _F9_OPER_H_ |
---|
| 6 | #define _F9_OPER_H_ |
---|
[120] | 7 | |
---|
[779] | 8 | #include "../genooperators.h" |
---|
[120] | 9 | |
---|
| 10 | |
---|
| 11 | class GenoOper_f9 : public GenoOperators |
---|
| 12 | { |
---|
| 13 | public: |
---|
| 14 | GenoOper_f9(); |
---|
[513] | 15 | int checkValidity(const char *, const char *genoname); |
---|
| 16 | int validate(char *&, const char *genoname); |
---|
| 17 | int mutate(char *&g, float& chg, int &method); |
---|
| 18 | int crossOver(char *&g1, char *&g2, float& chg1, float& chg2); |
---|
[247] | 19 | uint32_t style(const char *g, int pos); |
---|
[513] | 20 | const char* getSimplest() { return "R"; } |
---|
[120] | 21 | |
---|
[1157] | 22 | void mutate_replace(char *gene, int i); //helper for mutate() |
---|
| 23 | void mutate_add_or_del(char *& gene, int len, int add_0_del_1); //helper for mutate() |
---|
| 24 | |
---|
[120] | 25 | double mut_prob; //mutation probability |
---|
| 26 | }; |
---|
| 27 | |
---|
| 28 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.