Changeset 532 for cpp/frams/genetics/genman.h
- Timestamp:
- 07/19/16 18:11:24 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/genman.h
r467 r532 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2016 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 42 42 int testValidity(Geno &g, bool &canvalidate); 43 43 int testGenoValidity(Geno& g); //class GenoValidator (geno.h) 44 Geno Validate(const Geno&); ///<returns validated (if possible) genotype 45 Geno Mutate(const Geno&); //returns mutated genotype or empty if errors 46 Geno CrossOver(const Geno&, const Geno&); //returns xover genotype ("child") or empty if errors 47 float Similarity(const Geno&, const Geno&); //returns GENOPER_NOOPER or normalized similarity (1: identical, 0: different) 48 uint32_t Style(const char* g, int pos); //returns Style (and validity) of a genotype char. 49 void GetFullStyle(const char *g, uint32_t *styletab); //optimized. Fills styletab with styles for all genotype chars. sizeof(*styletab) must be at least strlen(g). 44 Geno validate(const Geno&); ///<returns validated (if possible) genotype 45 Geno mutate(const Geno&); //returns mutated genotype or empty if errors 46 Geno crossOver(const Geno&, const Geno&); //returns xover genotype ("child") or empty if errors 47 float similarity(const Geno&, const Geno&); //returns GENOPER_NOOPER or normalized similarity (1: identical, 0: different) 48 uint32_t getStyle(const char* g, int pos); //returns style (and validity) of a genotype char. 49 uint32_t getStyle(const char *g, const Geno *G, int pos); //returns style (and validity) of a genotype char. Assumes G is created from g. 50 void getFullStyle(const char *g, uint32_t *styletab); //optimized. Fills styletab with styles for all genotype chars. sizeof(*styletab) must be at least strlen(g). 51 void getFullStyle(const char *g, const Geno *G, uint32_t *styletab); //optimized. Assumes G is created from g. Fills styletab with styles for all genotype chars. sizeof(*styletab) must be at least strlen(g). 50 52 string HTMLize(const char *g); //returns colored genotype in HTML. 51 53 string HTMLizeShort(const char *g); //returns colored genotype (abbreviated if needed) in HTML. 52 Geno GetSimplest(char format); ///<returns pointer to the simplest genotype of \e format or empty Geno()53 const char * GetOpName(char format); ///<returns pointer to the active operator set for \e format54 Geno getSimplest(char format); ///<returns pointer to the simplest genotype of \e format or empty Geno() 55 const char *getOpName(char format); ///<returns pointer to the active operator set for \e format 54 56 const vector<GenoOperators*>& GetOperators() const { return oper_fx_list; } ///<returns the list of available genetic operators 55 57 private:
Note: See TracChangeset
for help on using the changeset viewer.