(#829) Use std::vector instead of std::set for categories. Added categoryNames to RimLegendConfig

This commit is contained in:
Magne Sjaastad
2016-09-07 10:28:57 +02:00
parent 3e40db6ef0
commit f1c214c1d7
9 changed files with 65 additions and 95 deletions

View File

@@ -55,15 +55,13 @@ public:
const std::vector<size_t>& cellScalarValuesHistogram();
const std::vector<size_t>& cellScalarValuesHistogram(size_t timeStepIndex);
const std::set<int>& uniqueCellScalarValues();
const std::set<int>& uniqueCellScalarValues(size_t timeStepIndex);
const std::vector<int>& uniqueCellScalarValues();
private:
void computeHistogramStatisticsIfNeeded();
void computeHistogramStatisticsIfNeeded(size_t timeStepIndex);
void computeUniqueValuesIfNeeded();
void computeUniqueValuesIfNeeded(size_t timeStepIndex);
private:
struct StatisticsValues
@@ -102,11 +100,11 @@ private:
bool m_isValueSumCalculated;
std::vector<size_t> m_histogram;
std::set<int> m_uniqueValues;
};
StatisticsValues m_statsAllTimesteps;
std::vector<StatisticsValues> m_statsPrTs;
StatisticsValues m_statsAllTimesteps;
std::vector<StatisticsValues> m_statsPrTs;
std::vector<int> m_uniqueValues;
cvf::ref<RigStatisticsCalculator> m_statisticsCalculator;
};