Changeset 726 for cpp/frams/neuro


Ignore:
Timestamp:
01/19/18 19:37:43 (7 years ago)
Author:
Maciej Komosinski
Message:
  • Changed Model::singleStepBuild() to Model::addFromString() to create model elements; the latter requires explicit indication of element type (P/J/N/C)
  • Removed old compatibility source (#ifdef MODEL_V1_COMPATIBLE) from f1->f0 converter and neuron definitions
Location:
cpp/frams/neuro/impl
Files:
2 edited

Legend:

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

    r286 r726  
    1212int NI_StdNeuron::lateinit()
    1313{
    14 #ifdef MODEL_V1_COMPATIBLE
    15 if (inertia<0) inertia=neuro->inertia;
    16 if (force<0) force=neuro->force;
    17 if (sigmo>1e9) sigmo=neuro->sigmo;
    18 #endif
    1914istate=newstate+neuro->state; // neuro->state -> random initialization
    2015calcOutput();
  • cpp/frams/neuro/impl/neuroimpl-simple.h

    r286 r726  
    1919  public:
    2020double inertia,force,sigmo;
    21 NI_StdNeuron():velocity(0)
    22 #ifdef MODEL_V1_COMPATIBLE
    23         ,inertia(-1),force(-1),sigmo(1e10)// illegal values, will be adjusted in lateinit()
    24 #else
    25         ,inertia(0),force(0),sigmo(0)
    26 #endif
     21NI_StdNeuron():velocity(0),inertia(0),force(0),sigmo(0)
    2722        {paramentries=NI_StdNeuron_tab;}
    2823NeuroImpl* makeNew(){return new NI_StdNeuron();} // for NeuroFactory
Note: See TracChangeset for help on using the changeset viewer.