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
,BaseTTTDiscriminationTree
,DTree
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)
N
getRoot()
N
getTarget(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 inthis
discrimination tree.N
leastCommonAncestor(N a, N b)
void
setOracle(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)
N
sift(Word<I> prefix)
N
sift(N start, Word<I> prefix)
protected N
sift(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 inthis
discrimination tree.LCAInfo.subtree1Label
will reference the label of the outgoing child transition for the node closer to the LCA,LCAInfo.subtree2Label
the label of the outgoing child transition for the node farther away from the LCA. If both nodes have equal depth,LCAInfo.subtree1Label
containsnode1
's label andLCAInfo.subtree2Label
node2
's label.Either
LCAInfo.subtree1Label
orLCAInfo.subtree2Label
isnull
, ifnode1
(node2
respectively) already is the LCA.- Parameters:
node1
- first nodenode2
- second node- Returns:
- the corresponding
LCAInfo
.
-
getNodes
public Collection<N> getNodes()
- Specified by:
getNodes
in interfaceSimpleGraph<DSCR>
-
getOutgoingEdges
public Collection<Map.Entry<O,N>> getOutgoingEdges(N node)
- Specified by:
getOutgoingEdges
in interfaceGraph<DSCR,I>
-
getTarget
public N getTarget(Map.Entry<O,N> edge)
- Specified by:
getTarget
in interfaceIndefiniteGraph<DSCR,I>
-
getVisualizationHelper
public VisualizationHelper<N,Map.Entry<O,N>> getVisualizationHelper()
- Specified by:
getVisualizationHelper
in interfaceGraph<DSCR,I>
- Specified by:
getVisualizationHelper
in interfaceSimpleGraph<DSCR>
-
setOracle
public void setOracle(MembershipOracle<I,O> oracle)
-
-