V - the graph vertex typeE - the graph edge typepublic class AllDirectedPaths<V,E>
extends java.lang.Object
| Constructor and Description |
|---|
AllDirectedPaths(Graph<V,E> graph)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<GraphPath<V,E>> |
getAllPaths(java.util.Set<V> sourceVertices,
java.util.Set<V> targetVertices,
boolean simplePathsOnly,
java.lang.Integer maxPathLength)
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)
Calculate (and return) all paths from the source vertex to the target vertex.
|
public java.util.List<GraphPath<V,E>> getAllPaths(V sourceVertex, V targetVertex, boolean simplePathsOnly, java.lang.Integer maxPathLength)
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)public java.util.List<GraphPath<V,E>> getAllPaths(java.util.Set<V> sourceVertices, java.util.Set<V> targetVertices, boolean simplePathsOnly, java.lang.Integer maxPathLength)
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)Copyright © 2019. All Rights Reserved.