SpatialConnRule#
- class brainpy.state.spatial.SpatialConnRule(p, mask=None, allow_autapses=True, _pre_pos=None, _post_pos=None)#
Spatially-resolved pairwise-Bernoulli rule:
p(d)within an optionalmask.Each ordered
(pre, post)pair is connected independently with probabilitymask(d) * p(d), wheredis their Euclidean distance. Constructed unbound;Simulator.connect()binds sliced(n_pre, d)/(n_post, d)positions.- Parameters:
p (
callableorfloat) – A distance kernelp(d)(e.g.gaussian()) or a constant probability.mask (
object, optional) – A mask withcontains(pre_pos, post_pos) -> bool (n_pre, n_post)(hard cutoff).allow_autapses (
bool, optional) – Rule-level self-connection switch (ANDed with the connect-level flag).