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 Summary
Constructors Constructor Description ExploredSets()
-
Method Summary
Modifier and Type Method Description static <F, N> Function<F,ExploredSet<N>>
doNotTrack()
Implementation which does not actually track anything.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.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.
-
Constructor Details
-
ExploredSets
public ExploredSets()
-
-
Method Details
-
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.
-