|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.simulation.algorithm.IndexedPriorityQueue
public class IndexedPriorityQueue
Implements an indexed priority queue. It is a data structure to manage the absolute taus of the Gibson-Bruck algorithm in an efficient way. It is composed of a binary heap (the taus are the keys) and an index for fast access to a node of the heap. The fast access is necessary to update unused taus in the queue.
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
GibsonBruckSimulator
Field Summary | |
---|---|
static Random |
RND
|
Constructor Summary | |
---|---|
IndexedPriorityQueue(double[] t)
Creates a IndexedPriorityQueue from the given taus |
Method Summary | |
---|---|
double |
getKey(int i)
Gets the tau of a reaction by lookup in the index |
int |
getMin()
Gets the index of the minimal tau in the queue. |
double |
getMinKey()
Gets the minimal tau in the queue. |
int |
size()
Gets the number of nodes in the binary heap. |
String |
toString()
|
void |
update(int i,
double value)
Updates the tau of a reaction to a given value |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Random RND
Constructor Detail |
---|
public IndexedPriorityQueue(double[] t)
IndexedPriorityQueue
from the given taus
t
- tausMethod Detail |
---|
public String toString()
toString
in class Object
public int size()
public int getMin()
public double getMinKey()
public void update(int i, double value)
i
- index of the reactionvalue
- new taupublic double getKey(int i)
i
- index of the reaction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |