mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 19:49:58 +02:00
[shared] Clean class names containing storage
This commit is contained in:
28
apps/graph/cartesian_function_store.cpp
Normal file
28
apps/graph/cartesian_function_store.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "cartesian_function_store.h"
|
||||
extern "C" {
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
}
|
||||
#include <ion.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
namespace Graph {
|
||||
|
||||
Ion::Storage::Record::ErrorStatus CartesianFunctionStore::addEmptyModel() {
|
||||
Ion::Storage::Record::ErrorStatus error;
|
||||
CartesianFunction newModel = CartesianFunction::NewModel(&error);
|
||||
return error;
|
||||
}
|
||||
|
||||
void CartesianFunctionStore::setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const {
|
||||
assert(cacheIndex >= 0 && cacheIndex < maxNumberOfMemoizedModels());
|
||||
m_functions[cacheIndex] = CartesianFunction(record);
|
||||
}
|
||||
|
||||
ExpressionModelHandle * CartesianFunctionStore::memoizedModelAtIndex(int cacheIndex) const {
|
||||
assert(cacheIndex >= 0 && cacheIndex < maxNumberOfMemoizedModels());
|
||||
return &m_functions[cacheIndex];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user