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)
| 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. |