|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ls5.jlearn.oracles.CacheOracle
public class CacheOracle
Constructor Summary | |
---|---|
CacheOracle(Oracle oracle)
|
Method Summary | |
---|---|
void |
addEntry(Word word,
Word symbols)
Adds a query/answer pair to the cache |
void |
addStickySymbol(Symbol symbol)
Specify output symbols that once encountered by a prefix will stay the same despite any possible suffix |
Word |
getEntries(Word word)
|
boolean |
isCached(Word trace)
Checks if a given query is already included in the cache |
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. |
void |
setDFAModeEnabled(boolean dfaMode)
|
void |
setOracle(Oracle oracle)
Specifies Oracle to be called if a cache-miss is encountered |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheOracle(Oracle oracle)
Method Detail |
---|
public void setOracle(Oracle oracle)
Cache
Oracle
to be called if a cache-miss is encountered
setOracle
in interface Cache
oracle
- Oracle
to be consulted if a query is not included in the cachepublic Word processQuery(Word trace) throws LearningException
Oracle
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 void addEntry(Word word, Word symbols) throws ObservationConflictException
Cache
addEntry
in interface Cache
word
- query to be cachedsymbols
- response for the query to be cached
ObservationConflictException
- will be thrown if the query is already included in the cache, but with a different answerpublic Word getEntries(Word word)
public void addStickySymbol(Symbol symbol)
FilterStickyOutput
addStickySymbol
in interface FilterStickyOutput
public boolean isCached(Word trace)
Cache
isCached
in interface Cache
trace
- query to be checked
public void setDFAModeEnabled(boolean dfaMode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |