mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/probability] Implement reset of snapshot
Change-Id: I180915a255f45930b407743b9c43e55c2723e1a1
This commit is contained in:
@@ -42,6 +42,14 @@ App::Descriptor * App::Snapshot::descriptor() {
|
||||
return &descriptor;
|
||||
}
|
||||
|
||||
void App::Snapshot::reset() {
|
||||
law()->~Law();
|
||||
new(m_law) BinomialLaw();
|
||||
calculation()->~Calculation();
|
||||
new(m_calculation) LeftIntegralCalculation();
|
||||
m_activePage = Page::Law;
|
||||
}
|
||||
|
||||
Law * App::Snapshot::law() {
|
||||
return (Law *)m_law;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
~Snapshot();
|
||||
App * unpack(Container * container) override;
|
||||
Descriptor * descriptor() override;
|
||||
void reset() override;
|
||||
Law * law();
|
||||
Calculation * calculation();
|
||||
Page activePage();
|
||||
|
||||
Reference in New Issue
Block a user