Cypress  1.0
C++ Spiking Neural Network Simulation Framework
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
GeNNModels::FixedNumberPostWithReplacement Class Reference

#include <genn_models.hpp>

Inheritance diagram for GeNNModels::FixedNumberPostWithReplacement:
Inheritance graph
[legend]
Collaboration diagram for GeNNModels::FixedNumberPostWithReplacement:
Collaboration graph
[legend]

Public Member Functions

 DECLARE_SNIPPET (FixedNumberPostWithReplacement, 1)
 
 SET_ROW_BUILD_CODE ("const scalar u = $(gennrand_uniform);\n""x += (1.0 - x) * (1.0 - pow(u, 1.0 / (scalar)($(rowLength) - c)));\n""const unsigned int postIdx = (unsigned int)(x * $(num_post));\n""if(postIdx < $(num_post)) {\n"" $(addSynapse, postIdx);\n""}\n""else {\n"" $(addSynapse, $(num_post) - 1);\n""}\n""c++;\n""if(c >= $(rowLength)) {\n"" $(endRow);\n""}\n")
 
 SET_ROW_BUILD_STATE_VARS ({{"x","scalar", 0.0},{"c","unsigned int", 0}})
 
 SET_PARAM_NAMES ({"rowLength"})
 
 SET_CALC_MAX_ROW_LENGTH_FUNC ([](unsigned int, unsigned int, const std::vector< double > &pars){return(unsigned int) pars[0];})
 

Member Function Documentation

GeNNModels::FixedNumberPostWithReplacement::DECLARE_SNIPPET ( FixedNumberPostWithReplacement  ,
 
)
GeNNModels::FixedNumberPostWithReplacement::SET_CALC_MAX_ROW_LENGTH_FUNC ( [] (unsigned int, unsigned int, const std::vector< double > &pars){return(unsigned int) pars[0];}  )
GeNNModels::FixedNumberPostWithReplacement::SET_PARAM_NAMES ( {"rowLength"}  )
GeNNModels::FixedNumberPostWithReplacement::SET_ROW_BUILD_CODE ( )
GeNNModels::FixedNumberPostWithReplacement::SET_ROW_BUILD_STATE_VARS ( {{"x","scalar", 0.0},{"c","unsigned int", 0}}  )

The documentation for this class was generated from the following file: