Changeset 999 for cpp/frams/genetics


Ignore:
Timestamp:
07/13/20 13:51:43 (4 years ago)
Author:
Maciej Komosinski
Message:

More consistent usage of "shapetype" (vs. "shape")

Location:
cpp/frams/genetics
Files:
6 edited

Legend:

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

    r974 r999  
    164164                        {
    165165                                // make neuron
    166                                 NeuroClass *rndclass = GenoOperators::getRandomNeuroClass(Model::SHAPE_BALL_AND_STICK);
     166                                NeuroClass *rndclass = GenoOperators::getRandomNeuroClass(Model::SHAPETYPE_BALL_AND_STICK);
    167167                                if (rndclass == NULL)
    168168                                {
     
    434434        {
    435435                // '*', 'G', 'T', or 'S', 1/4 chance each
    436                 nc = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs(Model::SHAPE_BALL_AND_STICK);
     436                nc = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs(Model::SHAPETYPE_BALL_AND_STICK);
    437437        }
    438438        if (nc != NULL)
     
    470470                if (rndDouble(1) < 0.2f)
    471471                {
    472                         cl = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs(Model::SHAPE_BALL_AND_STICK);
     472                        cl = GenoOperators::getRandomNeuroClassWithOutputAndNoInputs(Model::SHAPETYPE_BALL_AND_STICK);
    473473                        if (cl != NULL)
    474474                        {
  • cpp/frams/genetics/fB/fB_oper.cpp

    r974 r999  
    287287                int rndid = rndUint(tokenized.size()); // select random insertion point
    288288                std::advance(it, rndid);
    289                 NeuroClass *cls = getRandomNeuroClass(Model::SHAPE_BALL_AND_STICK);
     289                NeuroClass *cls = getRandomNeuroClass(Model::SHAPETYPE_BALL_AND_STICK);
    290290                if (cls)
    291291                {
  • cpp/frams/genetics/fH/fH_oper.cpp

    r974 r999  
    255255                fH_Handle *handle = NULL;
    256256                method = FH_OPCOUNT + roulette(addoperations, FH_ADD_OPCOUNT);
    257                 if (getActiveNeuroClassCount(Model::SHAPE_BALL_AND_STICK) == 0) method = FH_OPCOUNT + FH_ADD_STICK;
     257                if (getActiveNeuroClassCount(Model::SHAPETYPE_BALL_AND_STICK) == 0) method = FH_OPCOUNT + FH_ADD_STICK;
    258258                switch (method - FH_OPCOUNT)
    259259                {
     
    440440        if (userandomclass)
    441441        {
    442                 NeuroClass *nc = getRandomNeuroClass(Model::SHAPE_BALL_AND_STICK); // checking that neuron classes are available should be done before
     442                NeuroClass *nc = getRandomNeuroClass(Model::SHAPETYPE_BALL_AND_STICK); // checking that neuron classes are available should be done before
    443443                det = nc->getName();
    444444        }
  • cpp/frams/genetics/fL/fL_oper.cpp

    r974 r999  
    141141                {
    142142                        SString det;
    143                         NeuroClass *cls = getRandomNeuroClass(Model::SHAPE_BALL_AND_STICK);
     143                        NeuroClass *cls = getRandomNeuroClass(Model::SHAPETYPE_BALL_AND_STICK);
    144144                        det = cls->getName();
    145145                        Geno_fH::mutateNeuronProperties(det);
     
    201201                        return creature->words["S"];
    202202                case FL_ADD_NEURO:
    203                         if (getActiveNeuroClassCount(Model::SHAPE_BALL_AND_STICK) == 0)
     203                        if (getActiveNeuroClassCount(Model::SHAPETYPE_BALL_AND_STICK) == 0)
    204204                                return creature->words["S"];
    205205                        else
  • cpp/frams/genetics/geno.cpp

    r988 r999  
    260260        if (Geno::formatIsOneOf(g.getFormat(), Geno::F0_FORMAT_LIST))
    261261        {
    262                 Model mod(g, Model::SHAPE_UNKNOWN);
     262                Model mod(g, Model::SHAPETYPE_UNKNOWN);
    263263                return mod.isValid();
    264264        }
  • cpp/frams/genetics/genoconv.h

    r988 r999  
    3434
    3535/// Base class for all Geno Converters.
    36 /// In constructor you have to set public fields
    37 /// indicating your identity and supported formats.
     36/// In constructor you have to set public fields indicating your identity and supported formats.
    3837/// Each converter serves one in-out format pair.
    39 /// Instance of your converter should be registered
    40 /// in GenoConvManager.
     38/// The instance of your converter should be registered in GenoConvManager.
    4139class GenoConverter
    4240{
    4341public:
    4442        const char *name;       //< converter name (short)
    45         SString in_format,      //< input format, eg. "1"
    46                 out_format;     //< output format, eg. "0"
     43        SString in_format,      //< input format, e.g. "1"
     44                out_format;     //< output format, e.g. "0"
    4745        paInt enabled;  //< don't touch this! (used by configuration module)
    4846        paInt mapsupport; //< set to 1 if your converter supports genotype mapping
Note: See TracChangeset for help on using the changeset viewer.