brainpy.connect.FixedPreNum
brainpy.connect.FixedPreNum#
- class brainpy.connect.FixedPreNum(num, include_self=True, seed=None)[source]#
Connect the pre-synaptic neurons with fixed number for each post-synaptic neuron.
- Parameters
num (float, int) – The connection probability (if “num” is float) or the fixed number of connectivity (if “num” is int).
include_self (bool) – Whether create (i, i) conn ?
seed (None, int) –
Seed the random generator.
matrix
: This method will create a big matrix, then, the connectivity is constructed from this matrix \((N_{pre}, N_{post})\). In a large network, this method will consume huge memories, including a matrix: \((N_{pre}, N_{post})\), two vectors: \(2 * N_{need} * N_{post}\).iter
: This method will iteratively build the synaptic connections. It has the minimum pressure of memory consuming, only \(2 * N_{need} * N_{post}\) (i
andj
vectors).
Methods
__init__
(num[, include_self, seed])build_conn
()build connections with certain data type.
check
(structures)make_returns
(structures, conn_data[, csr, ...])Make the desired synaptic structures and return them.
require
(*structures)requires
(*structures)