Changeset 935 for cpp/frams/genetics/f4


Ignore:
Timestamp:
05/29/20 15:20:29 (5 years ago)
Author:
Maciej Komosinski
Message:

Utility functions that provide a set of all neuron classes fulfilling given criteria now also filter neuron classes by the desired Model shape type (BALL_AND_STICK or SOLIDS)

File:
1 edited

Legend:

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

    r899 r935  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2017  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    164164                        {
    165165                                // make neuron
    166                                 NeuroClass *rndclass = GenoOperators::getRandomNeuroClass();
     166                                NeuroClass *rndclass = GenoOperators::getRandomNeuroClass(Model::SHAPE_BALL_AND_STICK);
    167167                                if (rndclass == NULL)
    168168                                {
     
    434434        {
    435435                // '*', 'G', 'T', or 'S', 1/4 chance each
    436                 nc = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs();
     436                nc = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs(Model::SHAPE_BALL_AND_STICK);
    437437        }
    438438        if (nc != NULL)
     
    470470                if (rndDouble(1) < 0.2f)
    471471                {
    472                         cl = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs();
     472                        cl = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs(Model::SHAPE_BALL_AND_STICK);
    473473                        if (cl != NULL)
    474474                        {
Note: See TracChangeset for help on using the changeset viewer.