Ignore:
Timestamp:
06/28/20 23:33:17 (4 years ago)
Author:
Maciej Komosinski
Message:

Improved names of functions that mutate neuron properties and improved docs

File:
1 edited

Legend:

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

    r959 r967  
    7676}
    7777
    78 bool GenoOperators::mutateRandomNeuronOrNeuroclassProperty(Neuro* n)
     78bool GenoOperators::mutateRandomNeuroClassProperty(Neuro* n)
    7979{
    8080        bool mutated = false;
    81         int prop = selectRandomNeuronProperty(n);
     81        int prop = selectRandomNeuroClassProperty(n);
    8282        if (prop >= 0)
    8383        {
    8484                if (prop >= GenoOperators::NEUROCLASS_PROP_OFFSET)
    8585                {
    86                         SyntParam par = n->classProperties();   //commits changes when p is destroyed
     86                        SyntParam par = n->classProperties();   //commits changes when this object is destroyed
    8787                        mutated = mutateProperty(par, prop - GenoOperators::NEUROCLASS_PROP_OFFSET);
    8888                }
     
    9696}
    9797
    98 int GenoOperators::selectRandomNeuronProperty(Neuro *n)
     98int GenoOperators::selectRandomNeuroClassProperty(Neuro *n)
    9999{
    100100        int neuext = n->extraProperties().getPropCount(),
     
    106106}
    107107
    108 double GenoOperators::mutateNeuronProperty(double current, Neuro *n, int i)
     108double GenoOperators::getMutatedNeuroClassProperty(double current, Neuro *n, int i)
    109109{
    110110        if (i == -1) return mutateCreepNoLimit('f', current, 2, true); //i==-1: mutating weight of neural connection
Note: See TracChangeset for help on using the changeset viewer.