Changeset 348 for cpp/frams/neuro


Ignore:
Timestamp:
04/09/15 23:51:28 (10 years ago)
Author:
Maciej Komosinski
Message:
  • explicit c_str() in SString instead of (const char*) cast
  • genetic converters and GenMan? are now thread-local which enables multi-threaded simulator separation
Location:
cpp/frams/neuro
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/neuro/impl/neuroimpl-fuzzy-f0.cpp

    r286 r348  
    2323      break;
    2424    else
    25       numbers[have++]=atof(t);
     25      numbers[have++]=atof(t.c_str());
    2626
    2727  //check if number of read numbers (separated with semicolon) is equal to declared
     
    122122        t += str.charAt(pos++);
    123123      pos++;
    124       rules[j][k]=atol(t); //convert cut out string into number
     124      rules[j][k]=atol(t.c_str()); //convert cut out string into number
    125125      //fuzzy sets - odd index table - are counted from 0,
    126126      //so if 5 fuzzy sets declared, values acceptable are 0,1,2,3,4
  • cpp/frams/neuro/impl/neuroimpl-fuzzy.cpp

    r286 r348  
    3535  rulesDef = new int[2*rulesNr];    //for each rule remembers number of inputs and outputs
    3636  //check correctness of string and fill in the rulesDef
    37   if (FuzzyF0String::countInputsOutputs(fuzzyRulesString, rulesDef, rulesNr) == 0)
     37  if (FuzzyF0String::countInputsOutputs(fuzzyRulesString.c_str(), rulesDef, rulesNr) == 0)
    3838  {
    3939    defuzzParam = new double[rulesNr]; // parameters used in defuzyfication process
  • cpp/frams/neuro/neurofactory.cpp

    r286 r348  
    9999if (removed.len())
    100100        FMprintf("NeuroFactory","removeUninmplemented",FMLV_INFO,
    101          "Removed Neuro classes: %s",(const char*)removed);
     101         "Removed Neuro classes: %s",removed.c_str());
    102102}
    103103
  • cpp/frams/neuro/neuroimpl.cpp

    r288 r348  
    7373        if (!ni) { errorcount++;
    7474                FMprintf("NeuroNetImpl","create",FMLV_WARN,"neuron #%d (%s) implementation not available",
    75                          i,(const char*)n->getClassName());
     75                         i,n->getClassName().c_str());
    7676                continue; } // implementation not available?!
    7777        ni->owner=this;
     
    8888                { ni->status=NeuroImpl::InitError; errorcount++;
    8989                FMprintf("NeuroNetImpl","create",FMLV_WARN,"neuron #%d (%s) initialization failed",
    90                          i,(const char*)n->getClassName());
     90                         i,n->getClassName().c_str());
    9191                continue; }
    9292        ni->status=NeuroImpl::InitOk;
  • cpp/frams/neuro/neurolibparam.cpp

    r286 r348  
    5151        t+=n;
    5252        }
    53 return t;
     53return t.c_str();
    5454}
    5555
     
    5959t=Neuro::getClass(i)->getLongName();
    6060t+=" ("; t+=Neuro::getClassName(i); t+=")";
    61 return t;
     61return t.c_str();
    6262}
    6363
     
    6666static SString t;
    6767t=Neuro::getClass(i)->getSummary();
    68 return t;
     68return t.c_str();
    6969}
    7070
Note: See TracChangeset for help on using the changeset viewer.