FixedTotalNum

FixedTotalNum#

class brainpy.connect.FixedTotalNum(num, allow_multi_conn=False, seed=None, **kwargs)[source]#

Connect the synaptic neurons with fixed total number.

Parameters:
  • num (float,int) – The conn total number.

  • allow_multi_conn (bool, optional) – Whether allow one pre-synaptic neuron connects to multiple post-synaptic neurons.

  • seed (int, optional) – The random number seed.

build_coo()[source]#

Build a coo sparse connection data.

Returns:

conn – A tuple denoting the (pre_ids, post_ids).

Return type:

tuple