MCPcopy Create free account
hub / github.com/akeranen/the-one / getPredFor

Method getPredFor

routing/ProphetRouter.java:127–135  ·  view source on GitHub ↗

Returns the current prediction (P) value for a host or 0 if entry for the host doesn't exist. @param host The host to look the P for @return the current P value

(DTNHost host)

Source from the content-addressed store, hash-verified

125 * @return the current P value
126 */
127 public double getPredFor(DTNHost host) {
128 ageDeliveryPreds(); // make sure preds are updated before getting
129 if (preds.containsKey(host)) {
130 return preds.get(host);
131 }
132 else {
133 return 0;
134 }
135 }
136
137 /**
138 * Updates transitive (A->B->C) delivery predictions.

Callers 6

testRoutingMethod · 0.95
testAgingMethod · 0.95
updateDeliveryPredForMethod · 0.95
updateTransitivePredsMethod · 0.95
tryOtherMessagesMethod · 0.95
compareMethod · 0.45

Calls 2

ageDeliveryPredsMethod · 0.95
getMethod · 0.45

Tested by 2

testRoutingMethod · 0.76
testAgingMethod · 0.76