org.jgrapht.alg

## Class AllDirectedPaths<V,E>

- java.lang.Object
- - org.jgrapht.alg.AllDirectedPaths<V,E>

-     public class AllDirectedPaths<V,E>
      extends Object

  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
  Author:
    Andrew Gainer-Dewar

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AllDirectedPaths(DirectedGraph<V,E> graph)`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AllDirectedPaths

          public AllDirectedPaths(DirectedGraph<V,E> graph)

  - ### Method Detail

    - #### getAllPaths

          public 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.
      Parameters:
        `sourceVertex` - the source vertex
        `targetVertex` - the target vertex
        `simplePathsOnly` - if true, only search simple (non-self-intersecting) paths
        `maxPathLength` - 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)

    - #### getAllPaths

          public 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.
      Parameters:
        `sourceVertices` - the source vertices
        `targetVertices` - the target vertices
        `simplePathsOnly` - if true, only search simple (non-self-intersecting) paths
        `maxPathLength` - 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

Copyright © 2016. All rights reserved.