I - input symbol typeO - output symbol typepublic class SULCache<I,O> extends Object implements Resumable<SULCache.SULCacheState<I,O>>
SUL.
Because on a SUL, a query is executed step-by-step, it is impossible to determine in advance whether the
cached information is sufficient to answer the complete query. However, in general it is undesired to execute any
actions on the underlying SUL as long as the requested information can be provided from the cache.
This class therefore defers any real execution to the point where the cached information is definitely insufficient;
if such a point is not reached before a call to post() is made, the underlying SUL is not queried.
| Modifier and Type | Class and Description |
|---|---|
static class |
SULCache.SULCacheState<I,O> |
LearningCache.DFALearningCache<I>, LearningCache.MealyLearningCache<I,O>| Modifier and Type | Method and Description |
|---|---|
void |
addAlphabetSymbol(I symbol) |
boolean |
canFork() |
EquivalenceOracle.MealyEquivalenceOracle<I,O> |
createCacheConsistencyTest()
Creates a cache consistency test.
|
static <I,O> SULCache<I,O> |
createDAGCache(Alphabet<I> alphabet,
SUL<I,O> sul) |
static <I,O> SULCache<I,O> |
createTreeCache(Alphabet<I> alphabet,
SUL<I,O> sul) |
SUL<I,O> |
fork() |
void |
post() |
void |
pre() |
void |
resume(SULCache.SULCacheState<I,O> state) |
int |
size() |
O |
step(I in) |
SULCache.SULCacheState<I,O> |
suspend() |
public static <I,O> SULCache<I,O> createTreeCache(Alphabet<I> alphabet, SUL<I,O> sul)
public SULCache.SULCacheState<I,O> suspend()
suspend in interface Resumable<SULCache.SULCacheState<I,O>>public void resume(SULCache.SULCacheState<I,O> state)
resume in interface Resumable<SULCache.SULCacheState<I,O>>public EquivalenceOracle.MealyEquivalenceOracle<I,O> createCacheConsistencyTest()
LearningCacheThe created cache consistency test is backed by the cache contents. This method does not need to be invoked repeatedly when the cache contents change.
createCacheConsistencyTest in interface LearningCache<MealyMachine<?,I,?,O>,I,Word<O>>public void addAlphabetSymbol(I symbol)
addAlphabetSymbol in interface SupportsGrowingAlphabet<I>public int size()
Copyright © 2020. All rights reserved.