initRules()
Generate a 2^k x n or 2^kMax x n matrix containing logic transition
rules for each node.
Syntax
rule = initRules(n,k)
rule = initRules(rulesMatrix)
rule = initRules(n,kMin,kMax,connectionMatrix)
Description
initRules(n,k) generates a 2^k x
n matrix defining logic transition rules for each of the n nodes. A node with k incoming connections has 2^k possible input vectors. Corresponding output (0 or 1) for each input vector is assigned at random.
initRules(rulesMatrix) assigns given
rulesMatrix to rule.
initRules(n,kMin,kMax,connectionMatrix) generates a
2^kMax x n matrix defining logic transition rules for each of the n nodes. kMin and kMax define the minimum/maximum incoming connections per node. The actual number of incoming connections is determined by inspection of connectionMatrix.
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
rulesMatrix - (Optional) 2^k x n matrix containing logic transition rules for each node
connectionMatrix - (Optional) n x n adjacent matrix (defined as in graph theory)
Output:
rule - 2^k x n (2^kMax x n) matrix containing transition logic rules for each node
Example
Using
the Toolbox - CA: an application
See also
initNodes(),
initConnections()
|