Package org.jgrapht.alg
Class AllDirectedPaths<V,E>
- java.lang.Object
-
- org.jgrapht.alg.AllDirectedPaths<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
@Deprecated public class AllDirectedPaths<V,E> extends java.lang.Object
Deprecated.In favor ofAllDirectedPaths
.A Dijkstra-like algorithm to find all paths between two sets of nodes in a directed graph, with options to search only simple paths and to limit the path length.- Since:
- Feb, 2016
-
-
Field Summary
Fields Modifier and Type Field Description private DirectedGraph<V,E>
graph
Deprecated.
-
Constructor Summary
Constructors Constructor Description AllDirectedPaths(DirectedGraph<V,E> graph)
Deprecated.Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private java.util.Map<E,java.lang.Integer>
edgeMinDistancesBackwards(java.util.Set<V> targetVertices, java.lang.Integer maxPathLength)
Deprecated.Compute the minimum number of edges in a path to the targets through each edge, so long as it is not greater than a bound.private java.util.List<GraphPath<V,E>>
generatePaths(java.util.Set<V> sourceVertices, java.util.Set<V> targetVertices, boolean simplePathsOnly, java.lang.Integer maxPathLength, java.util.Map<E,java.lang.Integer> edgeMinDistancesFromTargets)
Deprecated.Generate all paths from the sources to the targets, using pre-computed minimum distances.java.util.List<GraphPath<V,E>>
getAllPaths(java.util.Set<V> sourceVertices, java.util.Set<V> targetVertices, boolean simplePathsOnly, java.lang.Integer maxPathLength)
Deprecated.Calculate (and return) all paths from the source vertices to the target vertices.java.util.List<GraphPath<V,E>>
getAllPaths(V sourceVertex, V targetVertex, boolean simplePathsOnly, java.lang.Integer maxPathLength)
Deprecated.Calculate (and return) all paths from the source vertex to the target vertex.private GraphPath<V,E>
makePath(java.util.List<E> edges)
Deprecated.Transform an ordered list of edges into a GraphPath
-
-
-
Field Detail
-
graph
private final DirectedGraph<V,E> graph
Deprecated.
-
-
Constructor Detail
-
AllDirectedPaths
public AllDirectedPaths(DirectedGraph<V,E> graph)
Deprecated.Create a new instance- Parameters:
graph
- the input graph
-
-
Method Detail
-
getAllPaths
public java.util.List<GraphPath<V,E>> getAllPaths(V sourceVertex, V targetVertex, boolean simplePathsOnly, java.lang.Integer maxPathLength)
Deprecated.Calculate (and return) all paths from the source vertex to the target vertex.- Parameters:
sourceVertex
- the source vertextargetVertex
- the target vertexsimplePathsOnly
- if true, only search simple (non-self-intersecting) pathsmaxPathLength
- maximum number of edges to allow in a path (if null, all paths are considered, which may be very slow due to potentially huge output)- Returns:
- all paths from the source vertex to the target vertex
-
getAllPaths
public java.util.List<GraphPath<V,E>> getAllPaths(java.util.Set<V> sourceVertices, java.util.Set<V> targetVertices, boolean simplePathsOnly, java.lang.Integer maxPathLength)
Deprecated.Calculate (and return) all paths from the source vertices to the target vertices.- Parameters:
sourceVertices
- the source verticestargetVertices
- the target verticessimplePathsOnly
- if true, only search simple (non-self-intersecting) pathsmaxPathLength
- maximum number of edges to allow in a path (if null, all paths are considered, which may be very slow due to potentially huge output)- Returns:
- list of all paths from the sources to the targets containing no more than maxPathLength edges
-
edgeMinDistancesBackwards
private java.util.Map<E,java.lang.Integer> edgeMinDistancesBackwards(java.util.Set<V> targetVertices, java.lang.Integer maxPathLength)
Deprecated.Compute the minimum number of edges in a path to the targets through each edge, so long as it is not greater than a bound.- Parameters:
targetVertices
- the target verticesmaxPathLength
- maximum number of edges to allow in a path (if null, all edges will be considered, which may be expensive)- Returns:
- the minimum number of edges in a path from each edge to the targets, encoded in a Map
-
generatePaths
private java.util.List<GraphPath<V,E>> generatePaths(java.util.Set<V> sourceVertices, java.util.Set<V> targetVertices, boolean simplePathsOnly, java.lang.Integer maxPathLength, java.util.Map<E,java.lang.Integer> edgeMinDistancesFromTargets)
Deprecated.Generate all paths from the sources to the targets, using pre-computed minimum distances.- Parameters:
sourceVertices
- the source verticestargetVertices
- the target verticesmaxPathLength
- maximum number of edges to allow in a pathsimplePathsOnly
- if true, only search simple (non-self-intersecting) paths (if null, all edges will be considered, which may be expensive)edgeMinDistancesFromTargets
- the minimum number of edges in a path to a target through each edge, as computed byedgeMinDistancesBackwards
.- Returns:
- a List of all GraphPaths from the sources to the targets satisfying the given constraints
-
-