1package aud.example.graph;
11 assert(!Double.isInfinite(node.
d));
15 @Override
public String
name() {
return "PFS (Dijkstra)"; }
implements Dijkstra's algorithm by defining priority
double priority(MyNode node, MyEdge e)
Compute priority of a node:
String name()
get traversal name
DijkstraShortestPaths(MyGraph g)
edge with all possible attributes that we require ;-)
graph based on aud.graph.GraphAM
node with all possible attributes that we require ;-)
double d
distance to start node (sum of weighs or edge count if no weights defined)
Priority first search implementation.
boolean hasWeight()
determine if edge weight is defined
double getWeight()
set edge weight