S
- (hypothesis) state typeI
- input alphabet typeO
- output alphabet type@ParametersAreNonnullByDefault public class ObservationTree<S,I,O> extends Object
Constructor and Description |
---|
ObservationTree(net.automatalib.words.Alphabet<I> alphabet) |
Modifier and Type | Method and Description |
---|---|
void |
addState(S newState,
net.automatalib.words.Word<I> accessSequence,
O output)
Registers a new hypothesis state at the observation tree.
|
void |
addTrace(S state,
ADTNode<S,I,O> adtNode)
|
void |
addTrace(S state,
net.automatalib.words.Word<I> input,
net.automatalib.words.Word<O> output)
Store input/output information about a hypothesis state in the internal data structure.
|
net.automatalib.words.Word<I> |
findSeparatingWord(S s1,
S s2)
Find a separating word for two hypothesis states.
|
Optional<net.automatalib.words.Word<I>> |
findSeparatingWord(S s1,
S s2,
net.automatalib.words.Word<I> prefix)
Find a separating word for two hypothesis states, after applying given input sequence first.
|
net.automatalib.automata.transout.impl.FastMealy<I,O> |
getObservationTree() |
void |
initialize(Collection<S> states,
Function<S,net.automatalib.words.Word<I>> asFunction,
Function<net.automatalib.words.Word<I>,net.automatalib.words.Word<O>> outputFunction)
Extended initialization method, that allows to initialize the observation tree with several hypothesis states.
|
void |
initialize(S state)
Initialize the observation tree with initial hypothesis state.
|
net.automatalib.words.Word<O> |
trace(S s,
net.automatalib.words.Word<I> input)
Computes the output of the system under learning when applying the given input sequence in the given hypothesis
state.
|
public ObservationTree(net.automatalib.words.Alphabet<I> alphabet)
public net.automatalib.automata.transout.impl.FastMealy<I,O> getObservationTree()
public void initialize(S state)
LearningAlgorithm.startLearning()
state
- the initial state of the hypothesispublic void initialize(Collection<S> states, Function<S,net.automatalib.words.Word<I>> asFunction, Function<net.automatalib.words.Word<I>,net.automatalib.words.Word<O>> outputFunction)
states
- The hypothesis states to initialize the observation tree withasFunction
- Function to compute the access sequence of a nodeoutputFunction
- Function to compute the output of the access sequencespublic void addTrace(S state, net.automatalib.words.Word<I> input, net.automatalib.words.Word<O> output)
state
- the hypothesis state for which information should be storedinput
- the input sequence applied when in the given stateoutput
- the observed output sequencepublic void addTrace(S state, ADTNode<S,I,O> adtNode)
addState(Object, Word, Object)
. Convenience method that stores all information that the traces of
the given ADTNode
holds.state
- the hypothesis state for which information should be storedadtNode
- the ADTNode
whose traces should be storedpublic void addState(S newState, net.automatalib.words.Word<I> accessSequence, O output)
newState
- the hypothesis state in questionaccessSequence
- the access sequence of the hypothesis state in the system under learningoutput
- the output of the last symbol of the access sequence.public Optional<net.automatalib.words.Word<I>> findSeparatingWord(S s1, S s2, net.automatalib.words.Word<I> prefix)
s1
- first states2
- second stateprefix
- input sequenceWord
separating the two states reached after applying the prefix to s1 and s2. Optional.empty()
if not separating word exists.public net.automatalib.words.Word<I> findSeparatingWord(S s1, S s2)
s1
- first states2
- second stateWord
separating the two words. null
if no such word is found.public net.automatalib.words.Word<O> trace(S s, net.automatalib.words.Word<I> input)
s
- the hypothesis stateinput
- the input sequence of interestCopyright © 2018. All rights reserved.