public class BinnedList extends AbstractList implements IProbabilityHolder
| Modifier and Type | Field and Description |
|---|---|
private static float |
BIN_DIFFERENCE_FACTOR |
private AbstractList[] |
bins |
private boolean |
clean
Stores if the current totalProbability and the probability calculated from the list are the same.
|
private int |
currentBin |
EVENTS_PER_CLEANUP| Constructor and Description |
|---|
BinnedList(Parser parser,
int binAmount,
int extraBinLevels) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAtom(AbstractAtom atom) |
void |
addDiffusionProbability(double probabilityChange)
Updates the total probability
|
int |
cleanup() |
void |
deleteAtom(AbstractAtom atom)
Not tested.
|
AbstractAtom |
getAtomAt(int position) |
AbstractList[] |
getBins() |
double |
getDiffusionProbabilityFromList() |
java.util.ListIterator |
getIterator() |
int |
getSize() |
AbstractAtom |
nextEvent() |
void |
reset() |
void |
traceSizes(java.lang.String separator) |
private void |
updateCurrentList() |
addRemovalsSinceLastCleanup, addTime, addTime, autoCleanup, autoCleanup, getDeltaTime, getDepositionProbability, getDiffusionProbability, getGlobalProbability, getLevel, getParent, getRemovalsSinceLastCleanup, getTime, getTotalAtoms, nextReaction, resetRemovalsSinceLastCleanup, resetTime, setDepositionProbability, setDiffusionProbability, setLevel, setParent, setRates, setTotalAtomsprivate static final float BIN_DIFFERENCE_FACTOR
private final AbstractList[] bins
private int currentBin
private boolean clean
public BinnedList(Parser parser, int binAmount, int extraBinLevels)
private void updateCurrentList()
public void addAtom(AbstractAtom atom)
addAtom in class AbstractListpublic void deleteAtom(AbstractAtom atom)
deleteAtom in class AbstractListatom - atom to be deleted.public void addDiffusionProbability(double probabilityChange)
addDiffusionProbability in interface IProbabilityHolderprobabilityChange - probability changepublic AbstractAtom nextEvent()
nextEvent in class AbstractListpublic int cleanup()
cleanup in class AbstractListpublic double getDiffusionProbabilityFromList()
getDiffusionProbabilityFromList in class AbstractListpublic void reset()
reset in class AbstractListpublic AbstractAtom getAtomAt(int position)
getAtomAt in class AbstractListpublic int getSize()
getSize in class AbstractListpublic void traceSizes(java.lang.String separator)
public AbstractList[] getBins()
public java.util.ListIterator getIterator()
getIterator in class AbstractList