Ignore:
Timestamp:
07/19/16 18:11:24 (8 years ago)
Author:
Maciej Komosinski
Message:

A new set of getStyle/getFullStyle functions in GenMan? and cosmetic rename of other functions (first letter lowercase)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/genman.h

    r467 r532  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2016  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    4242        int testValidity(Geno &g, bool &canvalidate);
    4343        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).
    5052        string HTMLize(const char *g); //returns colored genotype in HTML.
    5153        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 format
     54        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
    5456        const vector<GenoOperators*>& GetOperators() const { return oper_fx_list; } ///<returns the list of available genetic operators
    5557private:
Note: See TracChangeset for help on using the changeset viewer.