|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrouting.maxprop.MeetingProbabilitySet
public class MeetingProbabilitySet
Class for storing and manipulating the meeting probabilities for the MaxProp router module.
| Field Summary | |
|---|---|
static int |
INFINITE_SET_SIZE
|
| Constructor Summary | |
|---|---|
MeetingProbabilitySet()
Constructor. |
|
MeetingProbabilitySet(double alpha,
java.util.List<java.lang.Integer> initiallyKnownNodes)
Constructor. |
|
MeetingProbabilitySet(int maxSetSize,
double alpha)
Constructor. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int INFINITE_SET_SIZE
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
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 for
public 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 for
public 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||