Ignore:
Timestamp:
11/30/19 02:13:25 (12 days ago)
Author:
Maciej Komosinski
Message:

Code formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f4/f4_oper.cpp

    r896 r899  
    448448                int relid = neuid - id;
    449449                nn->l1 = relid;
    450                 //nn->l1 = (int)(4.0f * (rnd01 - 0.5f));
     450                //nn->l1 = (int)(4.0f * (rndDouble(1) - 0.5f));
    451451        }
    452452        // weight
    453453        nn->f1 = GenoOperators::mutateNeuProperty(nn->f1, NULL, -1);
    454         //nn->f1 = 10.0f * (rnd01 - 0.5f);
     454        //nn->f1 = 10.0f * (rndDouble(1) - 0.5f);
    455455}
    456456
     
    485485                        nn->l1 = neuid - id;
    486486                }
    487                 //nn->l1 += (int)(2.0f * (rnd01 - 0.5f));
     487                //nn->l1 += (int)(2.0f * (rndDouble(1) - 0.5f));
    488488                break;
    489489        case 2: // change weight
    490490                nn->f1 = GenoOperators::mutateNeuProperty(nn->f1, NULL, -1);
    491                 //nn->f1 += 1.0f * (rnd01 - 0.5f);
     491                //nn->f1 += 1.0f * (rndDouble(1) - 0.5f);
    492492                break;
    493493        }
     
    630630
    631631// decide number of nodes to mutate
    632 n = (int)( 0.5f + rnd01 * maxToMut );
     632n = (int)( 0.5f + rndDouble(1) * maxToMut );
    633633if (n<1) n=1;
    634634if (n>totNodes) n=totNodes;
Note: See TracChangeset for help on using the changeset viewer.