Ignore:
Timestamp:
06/07/18 17:40:49 (6 years ago)
Author:
Maciej Komosinski
Message:

Added a helper function that counts active neuron classes

File:
1 edited

Legend:

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

    r779 r801  
    223223}
    224224
     225int GenoOperators::getActiveNeuroClassCount()
     226{
     227        int count = 0;
     228        for (int i = 0; i < Neuro::getClassCount(); i++)
     229                if (Neuro::getClass(i)->genactive)
     230                        count++;
     231        return count;
     232}
     233
    225234NeuroClass* GenoOperators::getRandomNeuroClass()
    226235{
Note: See TracChangeset for help on using the changeset viewer.