-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.53..v0.2.54 changeset CalculateStatsOp.h
Garret Voltz edited this page Mar 31, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/ops/CalculateStatsOp.h b/hoot-core/src/main/cpp/hoot/core/ops/CalculateStatsOp.h
index d64343f..b41f404 100644
--- a/hoot-core/src/main/cpp/hoot/core/ops/CalculateStatsOp.h
+++ b/hoot-core/src/main/cpp/hoot/core/ops/CalculateStatsOp.h
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#ifndef CALCULATESTATSOP_H
#define CALCULATESTATSOP_H
@@ -90,6 +90,8 @@ public:
// Configurable
virtual void setConfiguration(const Settings& conf);
+ virtual std::string getClassName() const { return className(); }
+
private:
// Enum defining what stat value of the SingleStatistic or NumericStatistic
@@ -133,7 +135,23 @@ private:
QList<StatData> _quickStatData;
QList<StatData> _slowStatData;
-
+ // the index of the stat calculation we are currently doing
+ int _currentStatCalcIndex;
+ // total number of stat calculations made with a visitor; basically any time _applyVisitor is
+ // called; any time a stat is added that results in another manual call to _applyVisitor (done
+ // outside of _interpretStatData), this total needs to be incremented.
+ int _totalStatCalcs;
+ QStringList _featureTypesToSkip;
+
+ // These are here for debugging purposes only.
+ int _numInterpresetStatDataCalls;
+ int _numInterpretStatVisCacheHits;
+ int _numGenerateFeatureStatCalls;
+
+ QMap<CreatorDescription::BaseFeatureType, double> _conflatableFeatureCounts;
+
+ void _initStatCalc();
+ void _initConflatableFeatureCounts();
void _readGenericStatsData();
void _addStat(const QString& name, double value);
void _addStat(const char* name, double value);
@@ -149,12 +167,15 @@ private:
*/
std::shared_ptr<MatchCreator> getMatchCreator(
const std::vector<std::shared_ptr<MatchCreator>>& matchCreators,
- const QString &matchCreatorName, CreatorDescription::BaseFeatureType &featureType);
-
- double _applyVisitor(const hoot::FilteredVisitor &v, StatCall call = Stat);
- double _applyVisitor(const hoot::FilteredVisitor &v, boost::any& visitorData, StatCall call = Stat);
- double _applyVisitor(ElementCriterion* pCrit, ConstElementVisitor* pVis, StatCall call = Stat);
- void _applyVisitor(ConstElementVisitor *v);
+ const QString &matchCreatorName, CreatorDescription::BaseFeatureType& featureType);
+
+ double _applyVisitor(const hoot::FilteredVisitor& v, const QString& statName,
+ StatCall call = Stat);
+ double _applyVisitor(const hoot::FilteredVisitor& v, boost::any& visitorData, const
+ QString& statName, StatCall call = Stat);
+ double _applyVisitor(ElementCriterion* pCrit, ConstElementVisitor* pVis,
+ const QString& statName, StatCall call = Stat);
+ void _applyVisitor(ConstElementVisitor* v, const QString& statName);
static bool _matchDescriptorCompare(const CreatorDescription& m1,
const CreatorDescription& m2);