|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.graph.alg.Dijkstra<N,E>
N - The type of the nodes.E - The type of the edges.public class Dijkstra<N,E extends Edge<N>>
Implements a basic Dijkstra algorithm.
| Nested Class Summary | |
|---|---|
static class |
Dijkstra.GoalMode
Specifies the termination of the algorithm. |
| Constructor Summary | |
|---|---|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start)
Executes the dijkstra algorithm. |
|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
GraphElementFilter<N> filter)
Executes the dijkstra algorithm. |
|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
N goal)
Executes the dijkstra algorithm. |
|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
N goal,
GraphElementFilter<N> filter)
Executes the dijkstra algorithm. |
|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals)
Executes the dijkstra algorithm. |
|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals,
Dijkstra.GoalMode mode,
GraphElementFilter<Edge<N>> edgeFilter)
Executes the dijkstra algorithm. |
|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals,
Dijkstra.GoalMode mode,
GraphElementFilter<N> filter,
GraphElementFilter<Edge<N>> edgeFilter)
Executes the dijkstra algorithm. |
|
Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals,
GraphElementFilter<N> filter)
Executes the dijkstra algorithm. |
|
| Method Summary | |
|---|---|
double |
cost(N node)
|
N |
getClosestGoal()
|
Set<N> |
getGoals()
|
Path<N,E> |
getShortestPath(N goal)
Determines the shortest path to goal, i.e. the path with minimum overall cost from start to goal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start)
graph - the graphcost - the coststart - the start node
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
GraphElementFilter<N> filter)
graph - the graph to find a path incost - the function providing information about graph traversal costsstart - the start node in the graphfilter - the filter specifying whether a node may be traversed or must not be included in the path
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
N goal)
graph - the graph to find a path incost - the function providing information about graph traversal costsstart - the start node in the graphgoal - the goal node in the graph
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
N goal,
GraphElementFilter<N> filter)
graph - the graph to find a path incost - the function providing information about graph traversal costsstart - the start node in the graphgoal - the goal node in the graphfilter - the filter specifying whether a node may be traversed or must not be included in the path
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals,
GraphElementFilter<N> filter)
graph - the graph to find a path incost - the function providing information about graph traversal costsstart - the start node in the graphgoals - the goal nodes in the graph for which the shortest paths shall be computed.filter - the filter specifying whether a node may be traversed or must not be included in the path
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals)
graph - the graph to find a path incost - the function providing information about graph traversal costsstart - the start node in the graphgoals - the goal nodes in the graph for which the shortest paths shall be computed.
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals,
Dijkstra.GoalMode mode,
GraphElementFilter<Edge<N>> edgeFilter)
graph - the graph to find a path incost - the function providing information about graph traversal costsstart - the start node in the graphgoals - the goal nodes in the graph for which the shortest paths shall be computed.mode - the goal mode (Dijkstra.GoalMode) of the algorithm.edgeFilter - a filter specifying whether an edge may be traversed or must not be included in the path.
public Dijkstra(Graph<N,E> graph,
CostFunction<N,E> cost,
N start,
Set<N> goals,
Dijkstra.GoalMode mode,
GraphElementFilter<N> filter,
GraphElementFilter<Edge<N>> edgeFilter)
graph - the graph to find a path incost - the function providing information about graph traversal costsstart - the start node in the graphgoals - the goal nodes in the graph for which the shortest paths shall be computed.mode - the goal mode (Dijkstra.GoalMode) of the algorithm.filter - the filter specifying whether a node may be traversed or must not be included in the pathedgeFilter - a filter specifying whether an edge may be traversed or must not be included in the path.| Method Detail |
|---|
public Set<N> getGoals()
public N getClosestGoal()
public Path<N,E> getShortestPath(N goal)
goal - the goal node in the graph
public double cost(N node)
node - the node for which the cost shall be retrieved.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||