Package search

Class ExploredSets

java.lang.Object
search.ExploredSets

public class ExploredSets
extends Object
Three sample implementations of ways to track nodes which we have already either added to the frontier, or removed from the frontier for exploration.
  • Constructor Details

  • Method Details

    • doNotTrack

      public static <F,​ N> Function<F,​ExploredSet<N>> doNotTrack()
      Implementation which does not actually track anything.
      Type Parameters:
      F - The type of the frontier.
      N - The type of search nodes.
    • trackStateByHashSet

      public static <F,​ S,​ N extends SearchTreeNode<N,​ S>> Function<F,​ExploredSet<N>> trackStateByHashSet()
      Implementation which tracks nodes using a hash table of the underlying node states.
      Type Parameters:
      F - The type of the frontier.
      S - The type of the state underlying each search node.
      N - The type of search nodes.
    • trackGeneratedByArtifactHashSet

      public static <F,​ N,​ A> Function<F,​ExploredSet<N>> trackGeneratedByArtifactHashSet​(Function<N,​A> artifactBuilder)
      Implementation which tracks nodes using a hash table of some artifact constructed from the nodes.
      Type Parameters:
      F - The type of the frontier.
      N - The type of search nodes.
      A - The type of the artifact to be hashed by the frontier tracker.
      Parameters:
      artifactBuilder - Function taking a search node, and returning the hashable artifact.