Class AbstractGraphPathSearch.DefaultResult

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<V,​Weight> costs  
      protected int maxPaths  
      protected java.util.Map<V,​java.util.Set<E>> parents  
      protected java.util.Set<Path<V,​E>> paths  
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultResult​(V src, V dst)
      Creates the result of a single-path search.
      DefaultResult​(V src, V dst, int maxPaths)
      Creates the result of path search.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void buildPaths()
      Builds a set of paths for the specified src/dst vertex pair.
      java.util.Map<V,​Weight> costs()
      Return a bindings of each vertex to its cost in the path.
      V dst()
      Returns the search destination, if was was given.
      java.util.Map<V,​java.util.Set<E>> parents()
      Returns bindings of each vertex to its parent edges in the path.
      java.util.Set<Path<V,​E>> paths()
      Returns the set of paths produced as a result of the graph search.
      V src()
      Returns the search source.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • paths

        protected final java.util.Set<Path<V extends Vertex,​E extends Edge<V>>> paths
      • costs

        protected final java.util.Map<V extends Vertex,​Weight> costs
      • parents

        protected final java.util.Map<V extends Vertex,​java.util.Set<E extends Edge<V>>> parents
      • maxPaths

        protected final int maxPaths
    • Constructor Detail

      • DefaultResult

        public DefaultResult​(V src,
                             V dst)
        Creates the result of a single-path search.
        Parameters:
        src - path source
        dst - optional path destination
      • DefaultResult

        public DefaultResult​(V src,
                             V dst,
                             int maxPaths)
        Creates the result of path search.
        Parameters:
        src - path source
        dst - optional path destination
        maxPaths - optional limit of number of paths; GraphPathSearch.ALL_PATHS if no limit