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, setTotalAtoms
private 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 AbstractList
public void deleteAtom(AbstractAtom atom)
deleteAtom
in class AbstractList
atom
- atom to be deleted.public void addDiffusionProbability(double probabilityChange)
addDiffusionProbability
in interface IProbabilityHolder
probabilityChange
- probability changepublic AbstractAtom nextEvent()
nextEvent
in class AbstractList
public int cleanup()
cleanup
in class AbstractList
public double getDiffusionProbabilityFromList()
getDiffusionProbabilityFromList
in class AbstractList
public void reset()
reset
in class AbstractList
public AbstractAtom getAtomAt(int position)
getAtomAt
in class AbstractList
public int getSize()
getSize
in class AbstractList
public void traceSizes(java.lang.String separator)
public AbstractList[] getBins()
public java.util.ListIterator getIterator()
getIterator
in class AbstractList