Class ListSingleSourcePathsImpl<V,E>

java.lang.Object
org.jgrapht.alg.shortestpath.ListSingleSourcePathsImpl<V,E>
Type Parameters:
V - the graph vertex type
E - the graph edge type
All Implemented Interfaces:
Serializable, ShortestPathAlgorithm.SingleSourcePaths<V,E>

public class ListSingleSourcePathsImpl<V,E> extends Object implements ShortestPathAlgorithm.SingleSourcePaths<V,E>, Serializable
An implementation of ShortestPathAlgorithm.SingleSourcePaths which stores one path per vertex.

This is an explicit representation which stores all paths. For a more compact representation see TreeSingleSourcePathsImpl.

Author:
Dimitrios Michail
See Also:
  • Field Details

    • graph

      protected Graph<V,E> graph
      The graph
    • source

      protected V source
      The source vertex of all paths
    • paths

      protected Map<V,GraphPath<V,E>> paths
      One path per vertex
  • Constructor Details

    • ListSingleSourcePathsImpl

      public ListSingleSourcePathsImpl(Graph<V,E> graph, V source, Map<V,GraphPath<V,E>> paths)
      Construct a new instance.
      Parameters:
      graph - the graph
      source - the source vertex
      paths - one path per target vertex
  • Method Details