parameters: (class_name, param_names=None,
                                        var_name_types=None,
                                        pre_var_name_types=None,
                                        post_var_name_types=None,
                                        derived_params=None, sim_code=None,
                                        event_code=None, learn_post_code=None,
                                        synapse_dynamics_code=None,
                                        event_threshold_condition_code=None,
                                        pre_spike_code=None,
                                        post_spike_code=None,
                                        pre_dynamics_code=None,
                                        post_dynamics_code=None,
                                        sim_support_code=None,
                                        learn_post_support_code=None,
                                        synapse_dynamics_suppport_code=None,
                                        extra_global_params=None,
                                        is_pre_spike_time_required=None,
                                        is_post_spike_time_required=None,
                                        is_pre_spike_event_time_required=None,
                                        is_prev_pre_spike_time_required=None,
                                        is_prev_post_spike_time_required=None,
                                        is_prev_pre_spike_event_time_required=None,
                                        custom_body=None)
return_statement: return create_custom_model_class(
          class_name, genn_wrapper.WeightUpdateModels.Custom, param_names,
          var_name_types, derived_params, body)
docstring: This helper function creates a custom WeightUpdateModel class.
      See also:
      create_custom_neuron_class
      create_custom_postsynaptic_class
      create_custom_current_source_class
      create_custom_init_var_snippet_class
      create_custom_sparse_connect_init_snippet_class
  
      Args:
      class_name                              --  name of the new class
  
      Keyword args:
      param_names                             --  list of strings with param names of
                                                  the model
      var_name_types                          --  list of pairs of strings with variable
                                                  names and types of the model
      pre_var_name_types                      --  list of pairs of strings with
                                                  presynaptic variable names and
                                                  types of the model
      post_var_name_types                     --  list of pairs of strings with
                                                  postsynaptic variable names and
                                                  types of the model
      derived_params                          --  list of pairs, where the first member
                                                  is string with name of the derived
                                                  parameter and the second should be 
                                                  a functor returned by create_dpf_class
      sim_code                                --  string with the simulation code
      event_code                              --  string with the event code
      learn_post_code                         --  string with the code to include in
                                                  learn_synapse_post kernel/function
      synapse_dynamics_code                   --  string with the synapse dynamics code
      event_threshold_condition_code          --  string with the event threshold
                                                  condition code
      pre_spike_code                          --  string with the code run once per
                                                  spiking presynaptic neuron
      post_spike_code                         --  string with the code run once per
                                                  spiking postsynaptic neuron
      pre_dynamics_code                       --  string with the code run every
                                                  timestep on presynaptic neuron
      post_dynamics_code                      --  string with the code run every
                                                  timestep on postsynaptic neuron
      sim_support_code                        --  string with simulation support code
      learn_post_support_code                 --  string with support code for
                                                  learn_synapse_post kernel/function
      synapse_dynamics_suppport_code          --  string with synapse dynamics
                                                  support code
      extra_global_params                     --  list of pairs of strings with names and
                                                  types of additional parameters
      is_pre_spike_time_required              --  boolean, is presynaptic spike time
                                                  required in any weight update kernels?
      is_post_spike_time_required             --  boolean, is postsynaptic spike time
                                                  required in any weight update kernels?
      is_pre_spike_event_time_required        --  boolean, is presynaptic spike-like-event
                                                  time required in any weight update kernels?
      is_prev_pre_spike_time_required         --  boolean, is previous presynaptic spike time
                                                  required in any weight update kernels?
      is_prev_post_spike_time_required        --  boolean, is previous postsynaptic spike time
                                                  required in any weight update kernels?
      is_prev_pre_spike_event_time_required   --  boolean, is _previous_ presynaptic spike-like-event 
                                                  time required in any weight update kernels?
      custom_body                             --  dictionary with additional attributes
                                                  and methods of the new class
docstring_summary: This helper function creates a custom WeightUpdateModel class.
      See also:
      create_custom_neuron_class
      create_custom_postsynaptic_class
      create_custom_current_source_class
      create_custom_init_var_snippet_class
      create_custom_sparse_connect_init_snippet_class
docstring_tokens: This helper function creates a custom WeightUpdateModel class . See also : create_custom_neuron_class create_custom_postsynaptic_class create_custom_current_source_class create_custom_init_var_snippet_class create_custom_sparse_connect_init_snippet_class
function: def create_custom_weight_update_class(class_name, param_names=None,
                                        var_name_types=None,
                                        pre_var_name_types=None,
                                        post_var_name_types=None,
                                        derived_params=None, sim_code=None,
                                        event_code=None, learn_post_code=None,
                                        synapse_dynamics_code=None,
                                        event_threshold_condition_code=None,
                                        pre_spike_code=None,
                                        post_spike_code=None,
                                        pre_dynamics_code=None,
                                        post_dynamics_code=None,
                                        sim_support_code=None,
                                        learn_post_support_code=None,
                                        synapse_dynamics_suppport_code=None,
                                        extra_global_params=None,
                                        is_pre_spike_time_required=None,
                                        is_post_spike_time_required=None,
                                        is_pre_spike_event_time_required=None,
                                        is_prev_pre_spike_time_required=None,
                                        is_prev_post_spike_time_required=None,
                                        is_prev_pre_spike_event_time_required=None,
                                        custom_body=None):
      """This helper function creates a custom WeightUpdateModel class.
      See also:
      create_custom_neuron_class
      create_custom_postsynaptic_class
      create_custom_current_source_class
      create_custom_init_var_snippet_class
      create_custom_sparse_connect_init_snippet_class
  
      Args:
      class_name                              --  name of the new class
  
      Keyword args:
      param_names                             --  list of strings with param names of
                                                  the model
      var_name_types                          --  list of pairs of strings with variable
                                                  names and types of the model
      pre_var_name_types                      --  list of pairs of strings with
                                                  presynaptic variable names and
                                                  types of the model
      post_var_name_types                     --  list of pairs of strings with
                                                  postsynaptic variable names and
                                                  types of the model
      derived_params                          --  list of pairs, where the first member
                                                  is string with name of the derived
                                                  parameter and the second should be 
                                                  a functor returned by create_dpf_class
      sim_code                                --  string with the simulation code
      event_code                              --  string with the event code
      learn_post_code                         --  string with the code to include in
                                                  learn_synapse_post kernel/function
      synapse_dynamics_code                   --  string with the synapse dynamics code
      event_threshold_condition_code          --  string with the event threshold
                                                  condition code
      pre_spike_code                          --  string with the code run once per
                                                  spiking presynaptic neuron
      post_spike_code                         --  string with the code run once per
                                                  spiking postsynaptic neuron
      pre_dynamics_code                       --  string with the code run every
                                                  timestep on presynaptic neuron
      post_dynamics_code                      --  string with the code run every
                                                  timestep on postsynaptic neuron
      sim_support_code                        --  string with simulation support code
      learn_post_support_code                 --  string with support code for
                                                  learn_synapse_post kernel/function
      synapse_dynamics_suppport_code          --  string with synapse dynamics
                                                  support code
      extra_global_params                     --  list of pairs of strings with names and
                                                  types of additional parameters
      is_pre_spike_time_required              --  boolean, is presynaptic spike time
                                                  required in any weight update kernels?
      is_post_spike_time_required             --  boolean, is postsynaptic spike time
                                                  required in any weight update kernels?
      is_pre_spike_event_time_required        --  boolean, is presynaptic spike-like-event
                                                  time required in any weight update kernels?
      is_prev_pre_spike_time_required         --  boolean, is previous presynaptic spike time
                                                  required in any weight update kernels?
      is_prev_post_spike_time_required        --  boolean, is previous postsynaptic spike time
                                                  required in any weight update kernels?
      is_prev_pre_spike_event_time_required   --  boolean, is _previous_ presynaptic spike-like-event 
                                                  time required in any weight update kernels?
      custom_body                             --  dictionary with additional attributes
                                                  and methods of the new class
      """
      if not isinstance(custom_body, dict) and custom_body is not None:
          raise ValueError("custom_body must be an instance of dict or None")
  
      body = {}
  
      if sim_code is not None:
          body["get_sim_code"] = lambda self: dedent(sim_code)
  
      if event_code is not None:
          body["get_event_code"] = lambda self: dedent(event_code)
  
      if learn_post_code is not None:
          body["get_learn_post_code"] = lambda self: dedent(learn_post_code)
  
      if synapse_dynamics_code is not None:
          body["get_synapse_dynamics_code"] = lambda self: dedent(synapse_dynamics_code)
  
      if event_threshold_condition_code is not None:
          body["get_event_threshold_condition_code"] = \
              lambda self: dedent(event_threshold_condition_code)
  
      if pre_spike_code is not None:
          body["get_pre_spike_code"] = lambda self: dedent(pre_spike_code)
  
      if post_spike_code is not None:
          body["get_post_spike_code"] = lambda self: dedent(post_spike_code)
  
      if pre_dynamics_code is not None:
          body["get_pre_dynamics_code"] = lambda self: dedent(pre_dynamics_code)
  
      if post_dynamics_code is not None:
          body["get_post_dynamics_code"] = lambda self: dedent(post_dynamics_code)
  
      if sim_support_code is not None:
          body["get_sim_support_code"] = lambda self: dedent(sim_support_code)
  
      if learn_post_support_code is not None:
          body["get_learn_post_support_code"] = \
              lambda self: dedent(learn_post_support_code)
  
      if synapse_dynamics_suppport_code is not None:
          body["get_synapse_dynamics_suppport_code"] = \
              lambda self: dedent(synapse_dynamics_suppport_code)
  
      if extra_global_params is not None:
          body["get_extra_global_params"] = \
              lambda self: EGPVector([EGP(egp[0], egp[1])
                                      for egp in extra_global_params])
  
      if pre_var_name_types is not None:
          body["get_pre_vars"] = \
              lambda self: VarVector([Var(*vn)
                                      for vn in pre_var_name_types])
  
      if post_var_name_types is not None:
          body["get_post_vars"] = \
              lambda self: VarVector([Var(*vn)
                                      for vn in post_var_name_types])
  
      if is_pre_spike_time_required is not None:
          body["is_pre_spike_time_required"] = \
              lambda self: is_pre_spike_time_required
  
      if is_post_spike_time_required is not None:
          body["is_post_spike_time_required"] = \
              lambda self: is_post_spike_time_required
      
      if is_pre_spike_event_time_required is not None:
          body["is_pre_spike_event_time_required"] = \
              lambda self: is_pre_spike_event_time_required
  
      if is_prev_pre_spike_time_required is not None:
          body["is_prev_pre_spike_time_required"] = \
              lambda self: is_prev_pre_spike_time_required
  
      if is_prev_post_spike_time_required is not None:
          body["is_prev_post_spike_time_required"] = \
              lambda self: is_prev_post_spike_time_required
  
      if is_prev_pre_spike_event_time_required is not None:
          body["is_prev_pre_spike_event_time_required"] = \
              lambda self: is_prev_pre_spike_event_time_required
  
      if custom_body is not None:
          body.update(custom_body)
  
      return create_custom_model_class(
          class_name, genn_wrapper.WeightUpdateModels.Custom, param_names,
          var_name_types, derived_params, body)
function_tokens: def create_custom_weight_update_class ( class_name , param_names = None , var_name_types = None , pre_var_name_types = None , post_var_name_types = None , derived_params = None , sim_code = None , event_code = None , learn_post_code = None , synapse_dynamics_code = None , event_threshold_condition_code = None , pre_spike_code = None , post_spike_code = None , pre_dynamics_code = None , post_dynamics_code = None , sim_support_code = None , learn_post_support_code = None , synapse_dynamics_suppport_code = None , extra_global_params = None , is_pre_spike_time_required = None , is_post_spike_time_required = None , is_pre_spike_event_time_required = None , is_prev_pre_spike_time_required = None , is_prev_post_spike_time_required = None , is_prev_pre_spike_event_time_required = None , custom_body = None ) : if not isinstance ( custom_body , dict ) and custom_body is not None : raise ValueError ( "custom_body must be an instance of dict or None" ) body = { } if sim_code is not None : body [ "get_sim_code" ] = lambda self : dedent ( sim_code ) if event_code is not None : body [ "get_event_code" ] = lambda self : dedent ( event_code ) if learn_post_code is not None : body [ "get_learn_post_code" ] = lambda self : dedent ( learn_post_code ) if synapse_dynamics_code is not None : body [ "get_synapse_dynamics_code" ] = lambda self : dedent ( synapse_dynamics_code ) if event_threshold_condition_code is not None : body [ "get_event_threshold_condition_code" ] = lambda self : dedent ( event_threshold_condition_code ) if pre_spike_code is not None : body [ "get_pre_spike_code" ] = lambda self : dedent ( pre_spike_code ) if post_spike_code is not None : body [ "get_post_spike_code" ] = lambda self : dedent ( post_spike_code ) if pre_dynamics_code is not None : body [ "get_pre_dynamics_code" ] = lambda self : dedent ( pre_dynamics_code ) if post_dynamics_code is not None : body [ "get_post_dynamics_code" ] = lambda self : dedent ( post_dynamics_code ) if sim_support_code is not None : body [ "get_sim_support_code" ] = lambda self : dedent ( sim_support_code ) if learn_post_support_code is not None : body [ "get_learn_post_support_code" ] = lambda self : dedent ( learn_post_support_code ) if synapse_dynamics_suppport_code is not None : body [ "get_synapse_dynamics_suppport_code" ] = lambda self : dedent ( synapse_dynamics_suppport_code ) if extra_global_params is not None : body [ "get_extra_global_params" ] = lambda self : EGPVector ( [ EGP ( egp [ 0 ] , egp [ 1 ] ) for egp in extra_global_params ] ) if pre_var_name_types is not None : body [ "get_pre_vars" ] = lambda self : VarVector ( [ Var ( * vn ) for vn in pre_var_name_types ] ) if post_var_name_types is not None : body [ "get_post_vars" ] = lambda self : VarVector ( [ Var ( * vn ) for vn in post_var_name_types ] ) if is_pre_spike_time_required is not None : body [ "is_pre_spike_time_required" ] = lambda self : is_pre_spike_time_required if is_post_spike_time_required is not None : body [ "is_post_spike_time_required" ] = lambda self : is_post_spike_time_required if is_pre_spike_event_time_required is not None : body [ "is_pre_spike_event_time_required" ] = lambda self : is_pre_spike_event_time_required if is_prev_pre_spike_time_required is not None : body [ "is_prev_pre_spike_time_required" ] = lambda self : is_prev_pre_spike_time_required if is_prev_post_spike_time_required is not None : body [ "is_prev_post_spike_time_required" ] = lambda self : is_prev_post_spike_time_required if is_prev_pre_spike_event_time_required is not None : body [ "is_prev_pre_spike_event_time_required" ] = lambda self : is_prev_pre_spike_event_time_required if custom_body is not None : body . update ( custom_body ) return create_custom_model_class ( class_name , genn_wrapper . WeightUpdateModels . Custom , param_names , var_name_types , derived_params , body )