#include <genn_models.hpp>
|  | 
|  | 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];}) | 
|  | 
      
        
          | 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: