V - the graph vertex typeE - the graph edge typepublic class AllDirectedPaths<V,E> extends Object
| Constructor and Description | 
|---|
| AllDirectedPaths(Graph<V,E> graph)Create a new instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<GraphPath<V,E>> | getAllPaths(Set<V> sourceVertices,
           Set<V> targetVertices,
           boolean simplePathsOnly,
           Integer maxPathLength)Calculate (and return) all paths from the source vertices to the target vertices. | 
| List<GraphPath<V,E>> | getAllPaths(V sourceVertex,
           V targetVertex,
           boolean simplePathsOnly,
           Integer maxPathLength)Calculate (and return) all paths from the source vertex to the target vertex. | 
public AllDirectedPaths(Graph<V,E> graph)
graph - the input graphIllegalArgumentException - if the graph is not directedpublic List<GraphPath<V,E>> getAllPaths(V sourceVertex, V targetVertex, boolean simplePathsOnly, 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 List<GraphPath<V,E>> getAllPaths(Set<V> sourceVertices, Set<V> targetVertices, boolean simplePathsOnly, 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 © 2018. All rights reserved.