Class AbstractDiscriminationTree<DSCR,I,O,D,N extends AbstractDTNode<DSCR,O,D,N>>
- java.lang.Object
-
- de.learnlib.datastructure.discriminationtree.model.AbstractDiscriminationTree<DSCR,I,O,D,N>
-
- Type Parameters:
DSCR- type of discriminatorI- input symbol typeO- output symbol typeD- data symbol typeN- node type
- All Implemented Interfaces:
Iterable<N>,FiniteRepresentation,Graph<N,Map.Entry<O,N>>,IndefiniteGraph<N,Map.Entry<O,N>>,IndefiniteSimpleGraph<N>,SimpleGraph<N>
- Direct Known Subclasses:
AbstractWordBasedDiscriminationTree
public abstract class AbstractDiscriminationTree<DSCR,I,O,D,N extends AbstractDTNode<DSCR,O,D,N>> extends Object implements Graph<N,Map.Entry<O,N>>
An abstract super class for aggregating some information/functionality for discrimination trees.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.automatalib.graph.Graph
Graph.IntAbstraction<E extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected MembershipOracle<I,O>oracle
-
Constructor Summary
Constructors Constructor Description AbstractDiscriminationTree(N root, MembershipOracle<I,O> oracle)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract DefaultQuery<I,O>buildQuery(N node, Word<I> prefix)Collection<N>getNodes()Collection<Map.Entry<O,N>>getOutgoingEdges(N node)NgetRoot()NgetTarget(Map.Entry<O,N> edge)VisualizationHelper<N,Map.Entry<O,N>>getVisualizationHelper()LCAInfo<O,N>lcaInfo(N node1, N node2)Fetches for two nodes information about their lowest common ancestor inthisdiscrimination tree.NleastCommonAncestor(N a, N b)voidsetOracle(MembershipOracle<I,O> oracle)List<N>sift(List<N> starts, List<Word<I>> prefixes)protected List<N>sift(List<N> starts, List<Word<I>> prefixes, Predicate<N> continueExploring)Nsift(Word<I> prefix)Nsift(N start, Word<I> prefix)protected Nsift(N start, Word<I> prefix, Predicate<N> continueExploring)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.graph.Graph
getAdjacentNodes, getOutgoingEdgesIterator
-
Methods inherited from interface net.automatalib.graph.IndefiniteGraph
getAdjacentNodesIterator, getEdgesBetween
-
Methods inherited from interface net.automatalib.graph.IndefiniteSimpleGraph
createDynamicNodeMapping, createStaticNodeMapping, isConnected
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.graph.SimpleGraph
iterator, nodeIDs, size
-
-
-
-
Field Detail
-
oracle
protected transient MembershipOracle<I,O> oracle
-
-
Constructor Detail
-
AbstractDiscriminationTree
public AbstractDiscriminationTree(N root, MembershipOracle<I,O> oracle)
-
-
Method Detail
-
sift
protected List<N> sift(List<N> starts, List<Word<I>> prefixes, Predicate<N> continueExploring)
-
getRoot
public N getRoot()
-
lcaInfo
public LCAInfo<O,N> lcaInfo(N node1, N node2)
Fetches for two nodes information about their lowest common ancestor inthisdiscrimination tree.LCAInfo.subtree1Labelwill reference the label of the outgoing child transition for the node closer to the LCA,LCAInfo.subtree2Labelthe label of the outgoing child transition for the node farther away from the LCA. If both nodes have equal depth,LCAInfo.subtree1Labelcontainsnode1's label andLCAInfo.subtree2Labelnode2's label.Either
LCAInfo.subtree1LabelorLCAInfo.subtree2Labelisnull, ifnode1(node2respectively) already is the LCA.- Parameters:
node1- first nodenode2- second node- Returns:
- the corresponding
LCAInfo.
-
getNodes
public Collection<N> getNodes()
- Specified by:
getNodesin interfaceSimpleGraph<DSCR>
-
getOutgoingEdges
public Collection<Map.Entry<O,N>> getOutgoingEdges(N node)
- Specified by:
getOutgoingEdgesin interfaceGraph<DSCR,I>
-
getTarget
public N getTarget(Map.Entry<O,N> edge)
- Specified by:
getTargetin interfaceIndefiniteGraph<DSCR,I>
-
getVisualizationHelper
public VisualizationHelper<N,Map.Entry<O,N>> getVisualizationHelper()
- Specified by:
getVisualizationHelperin interfaceGraph<DSCR,I>- Specified by:
getVisualizationHelperin interfaceSimpleGraph<DSCR>
-
setOracle
public void setOracle(MembershipOracle<I,O> oracle)
-
-