123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef MINMAXANALYSIS_H
- #define MINMAXANALYSIS_H
- #include <QVector>
- class MinMaxAnalysis
- {
- public:
- typedef QVector<qreal> EvaluateIndex; //评估指标
- typedef QVector<qreal> Relations; //联系度
- enum AnalysisType
- {
- Min_Analysis, // X / min
- Max_Analysis, // x / max
- Analysis_THD1, // (max + min -x) / max
- Analysis_THD2, // (max - x) / (max - min)
- Analysis_THD3, // (x - min ) / (max - min)
- Analysis_THD4, // (x - min ) * k / (max - min) + q
- };
- MinMaxAnalysis(const QVector<EvaluateIndex> &rMat, AnalysisType type, qreal _k = 0, qreal _q = 0);
- const QVector<EvaluateIndex> &normalization();
- /**
- * @brief 联系度值
- * @return
- */
- Relations getRelations() const;
- private:
- AnalysisType analysisType;
- QVector<EvaluateIndex> originMat;
- QVector<EvaluateIndex> normalMat;
- qreal k;
- qreal q;
- void calcNormalMat();
- };
- #endif // MINMAXANALYSIS_H
|