public class MeetingProbabilitySet
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
INFINITE_SET_SIZE |
| Constructor and Description |
|---|
MeetingProbabilitySet()
Constructor.
|
MeetingProbabilitySet(double alpha,
java.util.List<java.lang.Integer> initiallyKnownNodes)
Constructor.
|
MeetingProbabilitySet(int maxSetSize,
double alpha)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.Integer,java.lang.Double> |
getAllProbs()
Returns a reference to the probability map of this probability set
|
double |
getLastUpdateTime()
Returns the time when this probability set was last updated
|
double |
getProbFor(java.lang.Integer index)
Returns the current delivery probability value for the given node index
|
MeetingProbabilitySet |
replicate()
Returns a deep copy of the probability set
|
void |
setAlpha(double alpha)
Enables changing the alpha parameter dynamically
|
java.lang.String |
toString()
Returns a String presentation of the probabilities
|
void |
updateMeetingProbFor(java.lang.Integer index)
Updates meeting probability for the given node index.
|
void |
updateMeetingProbFor(java.lang.Integer index,
double iet) |
public static final int INFINITE_SET_SIZE
public MeetingProbabilitySet(int maxSetSize,
double alpha)
maxSetSize - Maximum size of the probability set; when the set is
full, smallest values are dropped when new are addedpublic MeetingProbabilitySet()
public MeetingProbabilitySet(double alpha,
java.util.List<java.lang.Integer> initiallyKnownNodes)
public void updateMeetingProbFor(java.lang.Integer index)
P(b) = P(b)_old + alpha
Normalize{P}
I.e., The probability of the given node index is increased by one and
then all the probabilities are normalized so that their sum equals to 1.index - The node index to update the probability forpublic void updateMeetingProbFor(java.lang.Integer index,
double iet)
public double getProbFor(java.lang.Integer index)
index - The index of the node to look the P forpublic java.util.Map<java.lang.Integer,java.lang.Double> getAllProbs()
public double getLastUpdateTime()
public void setAlpha(double alpha)
public MeetingProbabilitySet replicate()
public java.lang.String toString()
toString in class java.lang.Object