V - the graph vertex typeE - the graph edge typeBellmanFordShortestPath@Deprecated public class BellmanFordShortestPath<V,E> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Graph<V,E> |
graph
Deprecated.
Graph on which shortest paths are searched.
|
protected V |
startVertex
Deprecated.
Start vertex.
|
| Constructor and Description |
|---|
BellmanFordShortestPath(Graph<V,E> graph,
V startVertex)
Deprecated.
Creates an object to calculate shortest paths between the start vertex and others vertices
using the Bellman-Ford algorithm.
|
BellmanFordShortestPath(Graph<V,E> graph,
V startVertex,
int nMaxHops)
Deprecated.
Creates an object to calculate shortest paths between the start vertex and others vertices
using the Bellman-Ford algorithm.
|
BellmanFordShortestPath(Graph<V,E> graph,
V startVertex,
int nMaxHops,
double epsilon)
Deprecated.
Creates an object to calculate shortest paths between the start vertex and others vertices
using the Bellman-Ford algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
static <V,E> List<E> |
findPathBetween(Graph<V,E> graph,
V startVertex,
V endVertex)
Deprecated.
Convenience method to find the shortest path via a single static method call.
|
double |
getCost(V endVertex)
Deprecated.
Get the cost of the shortest path to a vertex.
|
List<E> |
getPathEdgeList(V endVertex)
Deprecated.
Get the shortest path to a vertex.
|
protected V startVertex
public BellmanFordShortestPath(Graph<V,E> graph, V startVertex)
graph - the graphstartVertex - the start vertexpublic BellmanFordShortestPath(Graph<V,E> graph, V startVertex, int nMaxHops)
graph - the graphstartVertex - the start vertexnMaxHops - maximum number of edges of the calculated pathspublic BellmanFordShortestPath(Graph<V,E> graph, V startVertex, int nMaxHops, double epsilon)
graph - the graphstartVertex - the start vertexnMaxHops - maximum number of edges of the calculated paths.epsilon - tolerance factor when comparing floating point valuespublic double getCost(V endVertex)
endVertex - the end vertexpublic List<E> getPathEdgeList(V endVertex)
endVertex - the end vertexpublic static <V,E> List<E> findPathBetween(Graph<V,E> graph, V startVertex, V endVertex)
V - the graph vertex typeE - the graph edge typegraph - the graph to be searchedstartVertex - the vertex at which the path should startendVertex - the vertex at which the path should endCopyright © 2017. All rights reserved.