I
- input symbol typeO
- output symbol type@ParametersAreNonnullByDefault public class SULCache<I,O> extends Object implements SUL<I,O>, LearningCache.MealyLearningCache<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.
LearningCache.DFALearningCache<I>, LearningCache.MealyLearningCache<I,O>
Constructor and Description |
---|
SULCache(Alphabet<I> alphabet,
SUL<I,O> sul)
Deprecated.
since 2014-01-24. Use
Caches.createSULCache(Alphabet, SUL) |
SULCache(IncrementalMealyBuilder<I,O> incMealy,
Lock lock,
SUL<I,O> sul) |
SULCache(IncrementalMealyBuilder<I,O> incMealy,
SUL<I,O> sul) |
Modifier and Type | Method and Description |
---|---|
MealyCacheConsistencyTest<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) |
void |
post()
shut down SUL.
|
void |
pre()
setup SUL.
|
O |
step(I in)
make one step on the SUL.
|
@Deprecated public SULCache(Alphabet<I> alphabet, SUL<I,O> sul)
Caches.createSULCache(Alphabet, SUL)
alphabet
- the input alphabetsul
- the system under learningpublic static <I,O> SULCache<I,O> createTreeCache(Alphabet<I> alphabet, SUL<I,O> sul)
public void pre()
SUL
public MealyCacheConsistencyTest<I,O> createCacheConsistencyTest()
LearningCache
The 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>>
Copyright © 2015. All rights reserved.