fern.simulation.algorithm
Class DependencyGraph

java.lang.Object
  extended by fern.simulation.algorithm.DependencyGraph

public class DependencyGraph
extends Object

Implements a dependency graph. It is a directed graph whose vertices are the reactions of a network. From vertex i to vertex j is an edge iff i=j or there is at least one species that changes quantity when reaction i fires and is reactant of reaction j.

This definition implies that if a reaction i fires, the propensities of each descendant in the dependency graph has to be recalculated and no other.

For reference see M.A.Gibson and J.Bruck, Efficient Exact Stochastic Simulation of Chemical Systems with Many Species and Many Channels, J.Phys.Chem.A., Vol 104, no 9, 2000

Author:
Florian Erhard
See Also:
GillespieEnhanced, GibsonBruckSimulator

Constructor Summary
DependencyGraph(Network net)
          Creates the dependency graph for a given network
 
Method Summary
 LinkedList<Integer> getDependent(int reaction)
          Gets the descendants of a reaction in the dependency graph
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyGraph

public DependencyGraph(Network net)
Creates the dependency graph for a given network

Parameters:
net - the network
Method Detail

getDependent

public LinkedList<Integer> getDependent(int reaction)
Gets the descendants of a reaction in the dependency graph

Parameters:
reaction - index of the reaction
Returns:
list of dependent reactions