S - (hypothesis) state typeI - input alphabet typeO - output alphabet type@ParametersAreNonnullByDefault public class ADT<S,I,O> extends Object implements Serializable
ADTNode and offers some
utility methods used throughout the learning process.| Modifier and Type | Class and Description |
|---|---|
static class |
ADT.LCAInfo<S,I,O> |
| Constructor and Description |
|---|
ADT(LeafSplitter leafSplitter) |
| Modifier and Type | Method and Description |
|---|---|
ADTNode<S,I,O> |
extendLeaf(ADTNode<S,I,O> nodeToSplit,
net.automatalib.words.Word<I> distinguishingSuffix,
net.automatalib.words.Word<O> oldOutput,
net.automatalib.words.Word<O> newOutput)
Splitting a leaf node by extending the trace leading into the node to split.
|
ADT.LCAInfo<S,I,O> |
findLCA(ADTNode<S,I,O> s1,
ADTNode<S,I,O> s2)
Return the lowest common ancestor for the given two nodes.
|
ADTNode<S,I,O> |
getRoot()
Returns the root node of this ADT.
|
void |
initialize(S state)
Initializes the ADT with a single leaf node.
|
void |
replaceNode(ADTNode<S,I,O> oldNode,
ADTNode<S,I,O> newNode)
Replaces an existing node in the tree with a new one and updates the references of parent/child nodes
accordingly.
|
void |
setLeafSplitter(LeafSplitter leafSplitter) |
ADTNode<S,I,O> |
sift(SymbolQueryOracle<I,O> oracle,
net.automatalib.words.Word<I> word,
ADTNode<S,I,O> subtree)
Successively sifts a word through the ADT induced by the given node.
|
ADTNode<S,I,O> |
splitLeaf(ADTNode<S,I,O> nodeToSplit,
net.automatalib.words.Word<I> distinguishingSuffix,
net.automatalib.words.Word<O> oldOutput,
net.automatalib.words.Word<O> newOutput)
Splits a leaf node using the local
LeafSplitter. |
public ADT(LeafSplitter leafSplitter)
public void initialize(S state)
state - the referenced state of the leafpublic void replaceNode(ADTNode<S,I,O> oldNode, ADTNode<S,I,O> newNode)
oldNode - the node to replacenewNode - the replacementpublic ADTNode<S,I,O> sift(SymbolQueryOracle<I,O> oracle, net.automatalib.words.Word<I> word, ADTNode<S,I,O> subtree)
word - the word to siftsubtree - the node whose subtree is consideredADTNode.sift(SymbolQueryOracle, Word))public ADTNode<S,I,O> extendLeaf(ADTNode<S,I,O> nodeToSplit, net.automatalib.words.Word<I> distinguishingSuffix, net.automatalib.words.Word<O> oldOutput, net.automatalib.words.Word<O> newOutput)
nodeToSplit - the leaf node to extendsdistinguishingSuffix - the input sequence that splits the hypothesis state of the leaf to split and the new node. The current
trace leading into the node to split must be a prefix of this word.oldOutput - the hypothesis output of the node to split given the distinguishing suffixnewOutput - the hypothesis output of the new leaf given the distinguishing suffixpublic ADTNode<S,I,O> splitLeaf(ADTNode<S,I,O> nodeToSplit, net.automatalib.words.Word<I> distinguishingSuffix, net.automatalib.words.Word<O> oldOutput, net.automatalib.words.Word<O> newOutput)
LeafSplitter.nodeToSplit - the leaf node to splitdistinguishingSuffix - the input sequence that splits the hypothesis state of the leaf to split and the new nodeoldOutput - the hypothesis output of the node to split given the distinguishing suffixnewOutput - the hypothesis output of the new leaf given the distinguishing suffixpublic ADT.LCAInfo<S,I,O> findLCA(ADTNode<S,I,O> s1, ADTNode<S,I,O> s2)
s1 - first nodes2 - second nodeADT.LCAInfo containing the lowest common ADTNode, the output determining the subtree of the
first node and the output determining the subtree of the second nodepublic void setLeafSplitter(LeafSplitter leafSplitter)
Copyright © 2018. All rights reserved.