|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ls5.jlearn.oracles.PrefixClosureFilter
public class PrefixClosureFilter
A prefix closure filter answers known prefixes that ends up
with some specific output (contained in rejectedSymbols
)
with a special defines output. The special output futureError
should not be contained within the output alphabet.
Nested Class Summary | |
---|---|
static class |
PrefixClosureFilter.AppliedAction
For unit testing purposes. |
Constructor Summary | |
---|---|
PrefixClosureFilter(Oracle delegate,
Symbol futureOutput)
Default constructor. |
Method Summary | |
---|---|
void |
addRejectedSymbol(Symbol symbol)
Adds a rejecting symbol. |
Word |
addToFilter(Word trace,
Word result)
Adds the trace with the result to rejected prefixes if the trace contains a symbol that should be rejected. |
PrefixClosureFilter.AppliedAction |
getLastAppliedAction()
For unit testing. |
Word |
lookupWord(Word trace)
If there exists a prefix that already known and that ends up with some symbol in rejectedSymbols an answer is constructed. |
Word |
processQuery(Word trace)
Process an incoming sequence (word) of input symbols and return a sequence (word) of output symbols produced as reacion to the input symbols. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrefixClosureFilter(Oracle delegate, Symbol futureOutput)
delegate
- The Oracle
to delegate queries to, if this filter
can't answer received queries.futureOutput
- The symbol that act as a placeholder for suffix answers if
the corresponding prefix ends with an rejected symbol.addRejectedSymbol(Symbol)
Method Detail |
---|
public void addRejectedSymbol(Symbol symbol)
symbol
- public Word lookupWord(Word trace)
rejectedSymbols
an answer is constructed.
Otherwise this method returns null
trace
-
public Word addToFilter(Word trace, Word result)
trace
- result
- public Word processQuery(Word trace) throws LearningException
processQuery
in interface Oracle
trace
- Word
object respresenting the query the system is supposed to process
Word
object with the system's response to the provide query
LearningException
public PrefixClosureFilter.AppliedAction getLastAppliedAction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |