[solver] Make EquationStore inherits from StorageExpressionModelStore

This commit is contained in:
Émilie Feral
2019-02-22 10:05:22 +01:00
parent 53ee0607a1
commit 0f37ee25f7
5 changed files with 71 additions and 47 deletions

View File

@@ -16,12 +16,12 @@ Ion::Storage::Record::ErrorStatus StorageCartesianFunctionStore::addEmptyModel()
}
void StorageCartesianFunctionStore::setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const {
assert(cacheIndex >= 0 && cacheIndex < k_maxNumberOfMemoizedModels);
assert(cacheIndex >= 0 && cacheIndex < maxNumberOfMemoizedModels());
m_functions[cacheIndex] = StorageCartesianFunction(record);
}
ExpressionModelHandle * StorageCartesianFunctionStore::memoizedModelAtIndex(int cacheIndex) const {
assert(cacheIndex >= 0 && cacheIndex < k_maxNumberOfMemoizedModels);
assert(cacheIndex >= 0 && cacheIndex < maxNumberOfMemoizedModels());
return &m_functions[cacheIndex];
}