Changeset 803 for cpp/frams/genetics/fH


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

Performance improvements, including avoiding unnecessary passing of objects by value

Location:
cpp/frams/genetics/fH
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/fH/fH_general.cpp

    r797 r803  
    189189}
    190190
    191 int fH_Builder::parseGenotype(SString genotype)
     191int fH_Builder::parseGenotype(const SString &genotype)
    192192{
    193193        // Firstly, number of dimensions is parsed
  • cpp/frams/genetics/fH/fH_general.h

    r797 r803  
    408408         * @return 0 if processing was successful, 1 if parsing of dimensions went wrong or one of genotype lines could not be parsed
    409409         */
    410         int parseGenotype(SString genotype);
     410        int parseGenotype(const SString &genotype);
    411411
    412412        /**
  • cpp/frams/genetics/fH/fH_oper.cpp

    r797 r803  
    255255                fH_Handle *handle = NULL;
    256256                method = FH_OPCOUNT + roulette(addoperations, FH_ADD_OPCOUNT);
     257                if (getActiveNeuroClassCount() == 0) method = FH_OPCOUNT + FH_ADD_STICK;
    257258                switch (method - FH_OPCOUNT)
    258259                {
     
    466467        {
    467468                nc = getRandomNeuroClass();
    468                 if (!nc) nc = Neuro::getClass("N");
     469                // checking of neuron class availability should be checked before
    469470        }
    470471
Note: See TracChangeset for help on using the changeset viewer.