mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
We memoize the checksum of the x first models, and we check that one of these models is still present when the graph view appears. If so, we do not reload the range, other wise we reload it. Scenario: f(t) = [t^2 t+1] in parametric Display the graph f(x) = 1 on ]-inf;0] g(x) = 2 on [0;inf[ Display the graph -> the range did not change
17 lines
310 B
C++
17 lines
310 B
C++
#include "function_store.h"
|
|
|
|
namespace Shared {
|
|
|
|
uint32_t FunctionStore::storeChecksum() {
|
|
return Ion::Storage::sharedStorage()->checksum();
|
|
}
|
|
|
|
uint32_t FunctionStore::storeChecksumAtIndex(size_t i) {
|
|
if (numberOfActiveFunctions() <= i) {
|
|
return 0;
|
|
}
|
|
return activeRecordAtIndex(i).checksum();
|
|
}
|
|
|
|
}
|