routing.maxprop
Class MaxPropDijkstra

java.lang.Object
  extended by routing.maxprop.MaxPropDijkstra

public class MaxPropDijkstra
extends java.lang.Object

Dijkstra's shortest path implementation for MaxProp Router module.


Constructor Summary
MaxPropDijkstra(java.util.Map<java.lang.Integer,MeetingProbabilitySet> probs)
          Constructor.
 
Method Summary
 java.util.Map<java.lang.Integer,java.lang.Double> getCosts(java.lang.Integer from, java.util.Set<java.lang.Integer> to)
          Calculates total costs to the given set of target nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxPropDijkstra

public MaxPropDijkstra(java.util.Map<java.lang.Integer,MeetingProbabilitySet> probs)
Constructor.

Parameters:
probs - A reference to the mapping of the known hosts meeting probability sets
Method Detail

getCosts

public java.util.Map<java.lang.Integer,java.lang.Double> getCosts(java.lang.Integer from,
                                                                  java.util.Set<java.lang.Integer> to)
Calculates total costs to the given set of target nodes. The cost to a node is the sum of complements of probabilities that all the links come up as the next contact of the nodes.

Parameters:
from - The index (address) of the start node
to - The address set of destination nodes
Returns:
A map of (destination node, cost) tuples