|
|||||||||
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.
Constructor Summary | |
---|---|
MeetingProbabilitySet()
Constructor. |
|
MeetingProbabilitySet(java.util.List<java.lang.Integer> initiallyKnownNodes)
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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MeetingProbabilitySet()
public MeetingProbabilitySet(java.util.List<java.lang.Integer> initiallyKnownNodes)
Method Detail |
---|
public void updateMeetingProbFor(java.lang.Integer index)
P(b) = P(b)_old + 1 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 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 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 |