initConnections()
Generate N x N adjacent matrix with K incoming connections per node
Syntax
connection = initConnections(n,k)
connection = initConnections(n,kMin,kMax)
connection = initConnections(connnectionMatrix)
Description
initConnections(n,k) generates n
x n adjacent matrix (defined as in graph theory) with k incoming connections per node selected at random (uniformly distributed).
initConnections(n,kMin,kMax) generates
n x n adjacent matrix (defined as in graph theory) with at average
k=(kMin + kMax)/2 incoming connections per node selected at random (uniformly distributed). Each node has at least
kMin and at most kMax incoming connections per node (k ~ U[kMin,
kMax]).
initConnections(connnectionMatrix) generates N x N adjacent matrix using
connectionMatrix to set the incoming connections.
Input:
n - (Optional) Number of nodes
k - (Optional) Number of connections per node
kMin - (Optional) Minimal number of connections per node
kMax - (Optional) Maximal number of connections per node
connectionMatrix - (Optional) n x n adjacent matrix
Output:
connection - n x n adjacent matrix with at average k incoming
connections per node
Example
Using
the Toolbox - CA: an application
See also
initNodes(),
initRules()
|