Ignore:
Timestamp:
05/21/23 22:52:02 (2 years ago)
Author:
Maciej Komosinski
Message:

Cosmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified cpp/frams/genetics/genooperators.cpp

    r1243 r1247  
    44
    55#include <ctype.h>  //isupper()
     6#include <algorithm> // std::min, std::max
    67#include "genooperators.h"
    78#include <common/log.h>
    89#include <common/nonstd_math.h>
    910#include <frams/util/rndutil.h>
    10 #include <algorithm> // std::min, std::max
    1111
    1212//
     
    537537string GenoOperators::simplifiedModifiers(const string & original)
    538538{
    539         const int MAX_NUMBER_SAME_TYPE = 6; // max. number of modifiers of each type (case-insensitive). rR is treated separately in simplification because their influence follows different (i.e., simple additive) logic - so the simplifiedModifiersFixedOrder() logic with cancelling out antagonistic modifiers is appropriate for rR.
     539        const int MAX_NUMBER_SAME_TYPE = 5; // max. number of modifiers of each type (case-insensitive). The more characters, the closer we can get to min and max values of a given property at the expense of the length of evolved genotypes. 5 is "close enough", but how close we get to the extreme also depends on the initial value of a given property, which is not always exactly in the middle of min and max. rR is treated separately in simplification because their influence follows different (i.e., simple additive) logic - so the simplifiedModifiersFixedOrder() logic with cancelling out antagonistic modifiers would be appropriate for rR.
    540540        int counter[256] = {}; //initialize with zeros; 256 is unnecessarily too big and redundant, but enables very fast access (indexed directly by the ascii code)
    541541        string simplified = "";
Note: See TracChangeset for help on using the changeset viewer.