No BSD License
-
assocNeighbours(node, connect...
ASSOCNEIGHBOURS Set the array "input" in the NODE structure-array according to the
-
assocRules(node,rulesMatrix)
ASSOCRULES Set the array "rule" in the NODE structure-array according to the network's
-
averageConnectivity(node)
AVERAGECONNECTIVITY Calculate average network connectivity.
-
bnKav(n, kavdesired)
BNKAV Generate network with N nodes and at average KAV incoming connections per node.
-
bsn(n, k, optionString)
BSN Build and show network.
-
connectivityDistribution(node...
CONNECTIVITYDISTRIBUTION Calculate and display the network's connectivity distribution.
-
countTransitionsPerNode(tsm)
COUNTTRANSITIONSPERNODE Count number of changes of a node through evolution.
-
displayEvolution(node, k, mod...
DISPLAYEVOLUTION Calculate and visualize evolution of NODE over K discrete time steps according to MODE update scheme
-
displayNodeStats(node,tsm)
DISPLAYNODESTATS Visualize node statistics (number of updates / nb of state-transitions).
-
displayTimeStateMatrix(tsm,va...
DISPLAYTIMESTATEMATRIX Visualize Time-State-Matrix.
-
displayTopology(node, connect...
DISPLAYTOPOLOGY Visualize network topology, set xy-components and "ouput" field in node structure-array.
-
entropy(rulesMatrix)
ENTROPY Calculate the entropy of the system. Indicator for the diversity of the rules in the network.
-
evolveARBN(node, varargin)
EVOLVEARBN Develop network gradually K discrete time-steps according to ARBN (Asynchronous
-
evolveCRBN(node, varargin)
EVOLVECRBN Develop network gradually K discrete time-steps according to CRBN (Classical
-
evolveDARBN(node, varargin)
EVOLVEDARBN Develop network gradually K discrete time-steps according to DARBN (Deterministic
-
evolveDGARBN(node, varargin)
EVOLVEDGARBN Develop network gradually K discrete time steps according to DGARBN (Deterministic
-
evolveGARBN(node, varargin)
EVOLVEGARBN Develop network gradually K discrete time steps according to GARBN (Generalized
-
evolveTopology(node, mode, tS...
EVOLVETOPOLOGY Evolve and display topology according to algorithm described by Christof Teuscher and Eduardo Sanchez
-
findAttractor(varargin)
FINDATTRACTOR Return attractor length and states in attractor.
-
frozenComp(kMax, n, r, step ,...
FROZENCOMP Visualize frozen components graph.
-
getStateVector(node)
GETSTATEVECTOR Return the states of the nodes in NODE as row vector.
-
initConnections(varargin)
INITCONNECTIONS Generate N x N adjacent matrix with K incoming connections per node.
-
initNodes(n, varargin)
INITNODES Generate structure-array containing node-state information.
-
initRules(varargin)
INITRULES Generate a 2^k x n or 2^kMax x n matrix containing logic transition
-
resetNodeStats(node)
RESETNODESTATS Reset all variables of the node structure which are involved in statistical evaluation to zero.
-
saveFigure(figure, varargin)
SAVEFIGURE Save a figure to the current directory in two formats (*.fig and *.eps).
-
saveMatrix(matrix, varargin)
SAVEMATRIX Save a matrix to the current directory.
-
scalingLaw(n, mode, tSteps, r...
SCALINGLAW Visualize Scaling Law.
-
setLUTLines(node, varargin)
SETLUTLINES Updates the "lineNumber" field of the NODE structure-array.
-
setNodeNextState(node)
SETNODENEXTSTATE Look up next state for each node and update "nextState" field of the NODE
-
x(~out);
end;
-
View all files
from
Random Boolean Network Toolbox
by Christian Schwarzer
Simulation und visualization of Random Boolean Networks.
|
| evolveDGARBN(node, varargin)
|
function [nodeUpdated, timeStateMatrix] = evolveDGARBN(node, varargin)
% EVOLVEDGARBN Develop network gradually K discrete time steps according to DGARBN (Deterministic
% Generalized Asynchronous Random Boolean Network) update scheme.
%
% EVOLVEDGARBN(NODE) advances all nodes in NODE one time-step in DGARBN update mode.
%
% EVOLVEDGARBN(NODE, K) advances all nodes in NODE K time-steps in DGARBN update mode.
%
% EVOLVEDGARBN(NODE, K, TK) advances all nodes in NODE K time-steps in DGARBN update mode
% and saves all TK steps all node-states and the timeStateMatrix to the disk.
%
% Input:
% node - 1 x n structure-array containing node information
% k - (Optional) Number of time-steps
% tk - (Optional) Period for saving node-states/timeStateMatrix to disk.
%
% Output:
% nodeUpdated - 1 x n sturcture-array with updated node information
% ("lineNumber", "state", "nextState")
% timeStateMatrix - n x k+1 matrix containing calculated time-state evolution
% Author: Christian Schwarzer - SSC EPFL
% CreationDate: 20.11.2002 LastModified: 20.01.2003
switch nargin
case 1
k = 1;
tk = inf;
case 2
k = varargin{1};
tk = inf;
case 3
k = varargin{1};
tk = varargin{2};
otherwise
error('Wrong number of arguments. Type: help evolveDGARBN');
end
nodeUpdated = resetNodeStats(node);
timeStateMatrix = zeros(length(nodeUpdated), k+1);
timeStateMatrix(1:length(nodeUpdated),1) = getStateVector(nodeUpdated)';
n = length(nodeUpdated);
% evolve network
for i=2:k+1
timeNow = i-1;
nodeSelected = [];
for j=1:n
if(mod(timeNow,nodeUpdated(j).p) == nodeUpdated(j).q)
nodeSelected = [nodeSelected j];
end
end
nodeUpdated = setLUTLines(nodeUpdated);
nodeUpdated = setNodeNextState(nodeUpdated);
for j=1:length(nodeSelected)
nodeUpdated(nodeSelected(j)).state = nodeUpdated(nodeSelected(j)).nextState;
nodeUpdated(nodeSelected(j)).nbUpdates = nodeUpdated(nodeSelected(j)).nbUpdates + 1;
end
timeStateMatrix(1:length(nodeUpdated),i) = getStateVector(nodeUpdated)';
if(mod(i-1,tk) == 0)
saveMatrix(nodeUpdated);
saveMatrix(timeStateMatrix(:,1:i));
i-1; % display current time-step for user information
end
end
|
|
Contact us at files@mathworks.com