Class DepthFirstSearchResult<Vertex>

java.lang.Object
dsa.lab11.base.DepthFirstSearchResult<Vertex>
Type Parameters:
Vertex - the vertex type

public class DepthFirstSearchResult<Vertex> extends Object
The result of performing (normal or full) depth-first search.
  • Constructor Details

    • DepthFirstSearchResult

      public DepthFirstSearchResult(Map<Vertex,Vertex> paths, DynamicSequence<Vertex> visited)
      Construct a depth-first search result.
      Parameters:
      paths - the paths found to connected vertices
      visited - the order vertices were finished visiting in
  • Method Details

    • paths

      public Map<Vertex,Vertex> paths()
      Get the paths found to connected vertices.
      Returns:
      the paths
    • visited

      public DynamicSequence<Vertex> visited()
      Get the order vertices were finished being visited in.
      Returns:
      the order of vertices visited