public class IndexedPriorityQueue extends Object
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
Constructor and Description |
---|
IndexedPriorityQueue(double[] t)
Creates a
IndexedPriorityQueue from the given taus |
Modifier and Type | Method and Description |
---|---|
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
|
public static final Random RND
public IndexedPriorityQueue(double[] t)
IndexedPriorityQueue
from the given taust
- tauspublic 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 reactionCopyright © 2007–2021. All rights reserved.