[apps/sequence] Fix SequenceStore: sequences are not memoized but all

kept in the store (because we need all of them to evaluate one
sequence). setMemoizedModelAtIndex now store u, v and w sequences in
this order to avoid requiring expiring pointers.
This commit is contained in:
Émilie Feral
2019-08-12 17:30:26 +02:00
parent cbe6d312d4
commit 503e07fe5a
8 changed files with 25 additions and 12 deletions

View File

@@ -15,9 +15,10 @@ Ion::Storage::Record::ErrorStatus CartesianFunctionStore::addEmptyModel() {
return error;
}
void CartesianFunctionStore::setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const {
ExpressionModelHandle * CartesianFunctionStore::setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const {
assert(cacheIndex >= 0 && cacheIndex < maxNumberOfMemoizedModels());
m_functions[cacheIndex] = CartesianFunction(record);
return &m_functions[cacheIndex];
}
ExpressionModelHandle * CartesianFunctionStore::memoizedModelAtIndex(int cacheIndex) const {