Package dsa.lab11.solutions
Class DAGRelaxer
java.lang.Object
dsa.lab11.solutions.DAGRelaxer
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
DAGRelaxerpublic DAGRelaxer()
 
- 
- 
Method Details- 
relaxDAGpublic static <Vertex> Map<Vertex,Path<Vertex, relaxDAGDouble>> (DirectedGraph<Vertex, Double> dag, Vertex source) Find the shortest (weighted) paths to each of the vertices reachable from the given source vertex in the given directed acyclic graph (DAG).The weighted distance between two vertices is the sum of the path's edges' weights. Here we consider only weights that are doubles (e.g. 8.2).- Type Parameters:
- Vertex- the vertex type
- Parameters:
- dag- the directed acyclic graph
- source- the source vertex
- Returns:
- the shortest (weighted) paths to each reachable vertex and their (weighted) distances
 
 
-