From 0586e9122b6aba588f9ddd6cfa2d2be433188545 Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 23 Jan 2025 14:34:23 +0100 Subject: [PATCH 01/11] Remove manual allocations from setofareas.h and setofareas.hxx --- .../antares/solver/variable/setofareas.h | 2 +- .../antares/solver/variable/setofareas.hxx | 59 ++++++++----------- 2 files changed, 26 insertions(+), 35 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.h b/src/solver/variable/include/antares/solver/variable/setofareas.h index 74c68528ba..cd27e162ef 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.h +++ b/src/solver/variable/include/antares/solver/variable/setofareas.h @@ -198,7 +198,7 @@ class SetsOfAreas public: //! Area list - typedef std::vector SetOfAreasVector; + typedef std::vector SetOfAreasVector; //! Area list SetOfAreasVector pSetsOfAreas; //! Reference to the origina set diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index 19e60f2997..b776291c5b 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -34,14 +34,7 @@ inline SetsOfAreas::SetsOfAreas() } template -inline SetsOfAreas::~SetsOfAreas() -{ - // Releasing the memory occupied by the areas - for (typename SetOfAreasVector::iterator i = pBegin; i != pEnd; ++i) - { - delete *i; - } -} +inline SetsOfAreas::~SetsOfAreas() = default; template void SetsOfAreas::initializeFromStudy(Data::Study& study) @@ -53,7 +46,7 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) // alias to the set of sets of areas auto& sets = study.setsOfAreas; // Reserving the memory - pSetsOfAreas.reserve(sets.size()); + pSetsOfAreas.resize(sets.size()); pOriginalSets.reserve(sets.size()); // For each set... @@ -75,23 +68,21 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) } // Instancing a new set of variables of the area - NextType* n = new NextType(); + auto& n = pSetsOfAreas[setIndex]; // Initialize the variables // From the study - n->initializeFromStudy(study); + n.initializeFromStudy(study); // Making specific variables non applicable in following output reports : // - annual district reports // - over all years district statistics reports - n->broadcastNonApplicability(true); + n.broadcastNonApplicability(true); // For each current set's variable, getting the print status, that is : // is variable's column(s) printed in output (set of areas) reports ? - n->getPrintStatusFromStudy(study); + n.getPrintStatusFromStudy(study); - // Adding the variables for the area in the list - pSetsOfAreas.push_back(n); auto* originalSet = &sets[setIndex]; assert(originalSet != NULL); assert(!originalSet->empty()); @@ -216,10 +207,10 @@ inline void SetsOfAreas::buildSurveyReport(SurveyResults& results, bool setOfAreasDataLevel = dataLevel & Category::DataLevel::setOfAreas; if (count_int && setOfAreasDataLevel) { - pSetsOfAreas[results.data.setOfAreasIndex]->buildSurveyReport(results, - dataLevel, - fileLevel, - precision); + pSetsOfAreas[results.data.setOfAreasIndex].buildSurveyReport(results, + dataLevel, + fileLevel, + precision); } } @@ -234,11 +225,11 @@ inline void SetsOfAreas::buildAnnualSurveyReport(SurveyResults& results, bool setOfAreasDataLevel = dataLevel & Category::DataLevel::setOfAreas; if (count_int && setOfAreasDataLevel) { - pSetsOfAreas[results.data.setOfAreasIndex]->buildAnnualSurveyReport(results, - dataLevel, - fileLevel, - precision, - numSpace); + pSetsOfAreas[results.data.setOfAreasIndex].buildAnnualSurveyReport(results, + dataLevel, + fileLevel, + precision, + numSpace); } } @@ -260,7 +251,7 @@ void SetsOfAreas::buildDigest(SurveyResults& results, int digestLevel, in results.data.columnIndex = 0; results.data.rowCaptions[results.data.rowIndex].clear() << "@ " << pNames[results.data.rowIndex]; - (*i)->buildDigest(results, digestLevel, dataLevel); + i->buildDigest(results, digestLevel, dataLevel); ++results.data.rowIndex; } } @@ -295,10 +286,10 @@ void SetsOfAreas::yearEndSpatialAggregates(V& allVars, uint year, uint nu for (uint setindex = 0; setindex != pSetsOfAreas.size(); ++setindex) { assert(setindex < pOriginalSets.size()); - pSetsOfAreas[setindex]->yearEndSpatialAggregates(allVars, - year, - *(pOriginalSets[setindex]), - numSpace); + pSetsOfAreas[setindex].yearEndSpatialAggregates(allVars, + year, + *(pOriginalSets[setindex]), + numSpace); } } @@ -312,9 +303,9 @@ void SetsOfAreas::computeSpatialAggregatesSummary( for (uint setindex = 0; setindex != pSetsOfAreas.size(); ++setindex) { assert(setindex < pOriginalSets.size()); - pSetsOfAreas[setindex]->computeSpatialAggregatesSummary(allVars, - numSpaceToYear, - nbYearsForCurrentSummary); + pSetsOfAreas[setindex].computeSpatialAggregatesSummary(allVars, + numSpaceToYear, + nbYearsForCurrentSummary); } } @@ -324,7 +315,7 @@ void SetsOfAreas::simulationEndSpatialAggregates(V& allVars) { for (uint i = 0; i != pSetsOfAreas.size(); ++i) { - pSetsOfAreas[i]->simulationEndSpatialAggregates(allVars, *(pOriginalSets[i])); + pSetsOfAreas[i].simulationEndSpatialAggregates(allVars, *(pOriginalSets[i])); } } @@ -333,7 +324,7 @@ void SetsOfAreas::beforeYearByYearExport(uint year, uint numSpace) { for (uint i = 0; i != pSetsOfAreas.size(); ++i) { - pSetsOfAreas[i]->beforeYearByYearExport(year, numSpace); + pSetsOfAreas[i].beforeYearByYearExport(year, numSpace); } } From 7d3573d9972bc0dae80f2f629d483d3830c76c8f Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 23 Jan 2025 14:34:52 +0100 Subject: [PATCH 02/11] remove comment --- .../variable/include/antares/solver/variable/setofareas.hxx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index b776291c5b..25d71b145a 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -67,7 +67,6 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) continue; } - // Instancing a new set of variables of the area auto& n = pSetsOfAreas[setIndex]; // Initialize the variables From 6635740e7e40070e3ee8cd563bbe316029a8bb7c Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 23 Jan 2025 14:35:15 +0100 Subject: [PATCH 03/11] use = default --- .../variable/include/antares/solver/variable/setofareas.hxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index 25d71b145a..caae044744 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -28,10 +28,7 @@ namespace Solver namespace Variable { template -inline SetsOfAreas::SetsOfAreas() -{ - // Do nothing -} +inline SetsOfAreas::SetsOfAreas() = default; template inline SetsOfAreas::~SetsOfAreas() = default; From 00289cf16a39c8e9102fb808ad6416778d22e719 Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 23 Jan 2025 14:38:02 +0100 Subject: [PATCH 04/11] Remove pBegin, pEnd --- .../variable/include/antares/solver/variable/setofareas.h | 4 ---- .../variable/include/antares/solver/variable/setofareas.hxx | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.h b/src/solver/variable/include/antares/solver/variable/setofareas.h index cd27e162ef..25bc3216ee 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.h +++ b/src/solver/variable/include/antares/solver/variable/setofareas.h @@ -203,10 +203,6 @@ class SetsOfAreas SetOfAreasVector pSetsOfAreas; //! Reference to the origina set std::vector pOriginalSets; - //! An iterator for the begining of the list - typename SetOfAreasVector::iterator pBegin; - //! An iterator to the end of the list - typename SetOfAreasVector::iterator pEnd; //! The study const Data::Study* pStudy; diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index caae044744..a3ffc632fd 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -86,10 +86,6 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) pNames.push_back(setname); } - - // Initializing iterators - pBegin = pSetsOfAreas.begin(); - pEnd = pSetsOfAreas.end(); } template @@ -242,7 +238,7 @@ void SetsOfAreas::buildDigest(SurveyResults& results, int digestLevel, in results.data.area = nullptr; results.data.rowIndex = 0; - for (auto i = pBegin; i != pEnd; ++i) + for (auto i = pSetsOfAreas.begin(); i != pSetsOfAreas.end(); ++i) { results.data.columnIndex = 0; results.data.rowCaptions[results.data.rowIndex].clear() From db11d4a6388ec4028bf9c6f88488bf9bfca6b527 Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 23 Jan 2025 14:39:46 +0100 Subject: [PATCH 05/11] auto& --- .../variable/include/antares/solver/variable/setofareas.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index a3ffc632fd..b84deb3c93 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -238,12 +238,12 @@ void SetsOfAreas::buildDigest(SurveyResults& results, int digestLevel, in results.data.area = nullptr; results.data.rowIndex = 0; - for (auto i = pSetsOfAreas.begin(); i != pSetsOfAreas.end(); ++i) + for (auto& i: pSetsOfAreas) { results.data.columnIndex = 0; results.data.rowCaptions[results.data.rowIndex].clear() << "@ " << pNames[results.data.rowIndex]; - i->buildDigest(results, digestLevel, dataLevel); + i.buildDigest(results, digestLevel, dataLevel); ++results.data.rowIndex; } } From ebb4536e95f70a3868da43fd21f6709c4a0878ea Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 23 Jan 2025 15:30:41 +0100 Subject: [PATCH 06/11] i -> set --- .../variable/include/antares/solver/variable/setofareas.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index b84deb3c93..ba53123333 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -238,12 +238,12 @@ void SetsOfAreas::buildDigest(SurveyResults& results, int digestLevel, in results.data.area = nullptr; results.data.rowIndex = 0; - for (auto& i: pSetsOfAreas) + for (auto& set: pSetsOfAreas) { results.data.columnIndex = 0; results.data.rowCaptions[results.data.rowIndex].clear() << "@ " << pNames[results.data.rowIndex]; - i.buildDigest(results, digestLevel, dataLevel); + set.buildDigest(results, digestLevel, dataLevel); ++results.data.rowIndex; } } From 83e659711b423e949132c1c36a09c121c04a9b2d Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 23 Jan 2025 15:44:10 +0100 Subject: [PATCH 07/11] Fix size for pSetsOfAreas --- .../variable/include/antares/solver/variable/setofareas.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index ba53123333..588f528a79 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -43,7 +43,6 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) // alias to the set of sets of areas auto& sets = study.setsOfAreas; // Reserving the memory - pSetsOfAreas.resize(sets.size()); pOriginalSets.reserve(sets.size()); // For each set... @@ -64,7 +63,8 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) continue; } - auto& n = pSetsOfAreas[setIndex]; + pSetsOfAreas.push_back({}); + auto& n = pSetsOfAreas.back(); // Initialize the variables // From the study From 37cb34eebd89080346d943579ae3ef08bb56082b Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Fri, 24 Jan 2025 11:49:35 +0100 Subject: [PATCH 08/11] fix --- .../include/antares/solver/variable/setofareas.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index 588f528a79..4b2ed53fa3 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -44,8 +44,10 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) auto& sets = study.setsOfAreas; // Reserving the memory pOriginalSets.reserve(sets.size()); + pSetsOfAreas.resize(sets.size()); // For each set... + uint idx = 0; for (uint setIndex = 0; setIndex != sets.size(); ++setIndex) { if (!sets.hasOutput(setIndex)) @@ -63,8 +65,7 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) continue; } - pSetsOfAreas.push_back({}); - auto& n = pSetsOfAreas.back(); + auto& n = pSetsOfAreas[idx]; // Initialize the variables // From the study @@ -85,7 +86,9 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) pOriginalSets.push_back(originalSet); pNames.push_back(setname); + idx++; } + pSetsOfAreas.resize(idx); } template From 1e6677b24fd621c824d96719382414fd18d48c65 Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Fri, 24 Jan 2025 13:55:38 +0100 Subject: [PATCH 09/11] Use std::unique_ptr --- .../antares/solver/variable/setofareas.h | 2 +- .../antares/solver/variable/setofareas.hxx | 52 +++++++++---------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.h b/src/solver/variable/include/antares/solver/variable/setofareas.h index 25bc3216ee..5da4f314ec 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.h +++ b/src/solver/variable/include/antares/solver/variable/setofareas.h @@ -198,7 +198,7 @@ class SetsOfAreas public: //! Area list - typedef std::vector SetOfAreasVector; + typedef std::vector> SetOfAreasVector; //! Area list SetOfAreasVector pSetsOfAreas; //! Reference to the origina set diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index 4b2ed53fa3..67ff3db1fd 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -44,10 +44,8 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) auto& sets = study.setsOfAreas; // Reserving the memory pOriginalSets.reserve(sets.size()); - pSetsOfAreas.resize(sets.size()); // For each set... - uint idx = 0; for (uint setIndex = 0; setIndex != sets.size(); ++setIndex) { if (!sets.hasOutput(setIndex)) @@ -65,20 +63,22 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) continue; } - auto& n = pSetsOfAreas[idx]; + auto n = std::make_unique(); // Initialize the variables // From the study - n.initializeFromStudy(study); + n->initializeFromStudy(study); // Making specific variables non applicable in following output reports : // - annual district reports // - over all years district statistics reports - n.broadcastNonApplicability(true); + n->broadcastNonApplicability(true); // For each current set's variable, getting the print status, that is : // is variable's column(s) printed in output (set of areas) reports ? - n.getPrintStatusFromStudy(study); + n->getPrintStatusFromStudy(study); + + pSetsOfAreas.push_back(std::move(n)); auto* originalSet = &sets[setIndex]; assert(originalSet != NULL); @@ -86,9 +86,7 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) pOriginalSets.push_back(originalSet); pNames.push_back(setname); - idx++; } - pSetsOfAreas.resize(idx); } template @@ -202,10 +200,10 @@ inline void SetsOfAreas::buildSurveyReport(SurveyResults& results, bool setOfAreasDataLevel = dataLevel & Category::DataLevel::setOfAreas; if (count_int && setOfAreasDataLevel) { - pSetsOfAreas[results.data.setOfAreasIndex].buildSurveyReport(results, - dataLevel, - fileLevel, - precision); + pSetsOfAreas[results.data.setOfAreasIndex]->buildSurveyReport(results, + dataLevel, + fileLevel, + precision); } } @@ -220,11 +218,11 @@ inline void SetsOfAreas::buildAnnualSurveyReport(SurveyResults& results, bool setOfAreasDataLevel = dataLevel & Category::DataLevel::setOfAreas; if (count_int && setOfAreasDataLevel) { - pSetsOfAreas[results.data.setOfAreasIndex].buildAnnualSurveyReport(results, - dataLevel, - fileLevel, - precision, - numSpace); + pSetsOfAreas[results.data.setOfAreasIndex]->buildAnnualSurveyReport(results, + dataLevel, + fileLevel, + precision, + numSpace); } } @@ -246,7 +244,7 @@ void SetsOfAreas::buildDigest(SurveyResults& results, int digestLevel, in results.data.columnIndex = 0; results.data.rowCaptions[results.data.rowIndex].clear() << "@ " << pNames[results.data.rowIndex]; - set.buildDigest(results, digestLevel, dataLevel); + set->buildDigest(results, digestLevel, dataLevel); ++results.data.rowIndex; } } @@ -281,10 +279,10 @@ void SetsOfAreas::yearEndSpatialAggregates(V& allVars, uint year, uint nu for (uint setindex = 0; setindex != pSetsOfAreas.size(); ++setindex) { assert(setindex < pOriginalSets.size()); - pSetsOfAreas[setindex].yearEndSpatialAggregates(allVars, - year, - *(pOriginalSets[setindex]), - numSpace); + pSetsOfAreas[setindex]->yearEndSpatialAggregates(allVars, + year, + *(pOriginalSets[setindex]), + numSpace); } } @@ -298,9 +296,9 @@ void SetsOfAreas::computeSpatialAggregatesSummary( for (uint setindex = 0; setindex != pSetsOfAreas.size(); ++setindex) { assert(setindex < pOriginalSets.size()); - pSetsOfAreas[setindex].computeSpatialAggregatesSummary(allVars, - numSpaceToYear, - nbYearsForCurrentSummary); + pSetsOfAreas[setindex]->computeSpatialAggregatesSummary(allVars, + numSpaceToYear, + nbYearsForCurrentSummary); } } @@ -310,7 +308,7 @@ void SetsOfAreas::simulationEndSpatialAggregates(V& allVars) { for (uint i = 0; i != pSetsOfAreas.size(); ++i) { - pSetsOfAreas[i].simulationEndSpatialAggregates(allVars, *(pOriginalSets[i])); + pSetsOfAreas[i]->simulationEndSpatialAggregates(allVars, *(pOriginalSets[i])); } } @@ -319,7 +317,7 @@ void SetsOfAreas::beforeYearByYearExport(uint year, uint numSpace) { for (uint i = 0; i != pSetsOfAreas.size(); ++i) { - pSetsOfAreas[i].beforeYearByYearExport(year, numSpace); + pSetsOfAreas[i]->beforeYearByYearExport(year, numSpace); } } From 8e6c4eec100f1eccddaa88e9f2485f8655862cde Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Fri, 24 Jan 2025 13:56:22 +0100 Subject: [PATCH 10/11] Reserve --- .../variable/include/antares/solver/variable/setofareas.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index 67ff3db1fd..33a79b7ce0 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -43,6 +43,7 @@ void SetsOfAreas::initializeFromStudy(Data::Study& study) // alias to the set of sets of areas auto& sets = study.setsOfAreas; // Reserving the memory + pSetsOfAreas.reserve(sets.size()); pOriginalSets.reserve(sets.size()); // For each set... From e6383e649d2a9b780b1050d5ab053258e260b6d5 Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Fri, 24 Jan 2025 13:59:10 +0100 Subject: [PATCH 11/11] Move default --- .../variable/include/antares/solver/variable/setofareas.h | 4 ++-- .../variable/include/antares/solver/variable/setofareas.hxx | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.h b/src/solver/variable/include/antares/solver/variable/setofareas.h index 5da4f314ec..e6fb86ae5a 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.h +++ b/src/solver/variable/include/antares/solver/variable/setofareas.h @@ -115,9 +115,9 @@ class SetsOfAreas /*! ** \brief Default Constructor */ - SetsOfAreas(); + SetsOfAreas() = default; //! Destructor - ~SetsOfAreas(); + ~SetsOfAreas() = default; //@} void initializeFromStudy(Data::Study& study); diff --git a/src/solver/variable/include/antares/solver/variable/setofareas.hxx b/src/solver/variable/include/antares/solver/variable/setofareas.hxx index 33a79b7ce0..e133b06a55 100644 --- a/src/solver/variable/include/antares/solver/variable/setofareas.hxx +++ b/src/solver/variable/include/antares/solver/variable/setofareas.hxx @@ -27,12 +27,6 @@ namespace Solver { namespace Variable { -template -inline SetsOfAreas::SetsOfAreas() = default; - -template -inline SetsOfAreas::~SetsOfAreas() = default; - template void SetsOfAreas::initializeFromStudy(Data::Study& study) {