# brainpy.connect.ScaleFreeBA#

class brainpy.connect.ScaleFreeBA(m, directed=False, seed=None)[source]#

Build a random graph according to the Barabási–Albert preferential attachment model.

A graph of $$num\_node$$ nodes is grown by attaching new nodes each with $$m$$ edges that are preferentially attached to existing nodes with high degree.

Parameters
• m (int) – Number of edges to attach from a new node to existing nodes

• seed (integer, random_state, or None (default)) – Indicator of random number generation state.

Raises

ConnectorError – If m does not satisfy 1 <= m < n.

References

1

A. L. Barabási and R. Albert “Emergence of scaling in random networks”, Science 286, pp 509-512, 1999.

__init__(m, directed=False, seed=None)[source]#

Methods

 __init__(m[, directed, 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)