SetPairAnalysis.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // Created by lenovo on 2023/10/18.
  3. //
  4. #ifndef ALGORITHM_SETPAIRANALYSIS_H
  5. #define ALGORITHM_SETPAIRANALYSIS_H
  6. #include "QString"
  7. #include "QVector"
  8. /**
  9. * @brief 集对分析法,SPA,又称同异反综合分析法
  10. * 集成析是从系统的角度去认识确定性和不确定性的关系,并确定研究对象是一个确定不确定系统,
  11. * 其不确定性和确定性共同处于一个统一体之中。因此别从确定的角度和不确足的角度来研究不确定性的规律,并用联系度表示。
  12. * a:S/N 相同属性联系度(同一度)
  13. * b:F/N 相异属性联系度(差异度)
  14. * c:P/N 相反属性联系度(对立度)
  15. * 集对联系度公式:u = a + b*i + c*j
  16. */
  17. typedef QVector<qreal> EvaluateIndex; //评估指标
  18. typedef QVector<qreal> Relations; //联系度
  19. typedef QStringList EvaluateNames;
  20. class SetPairAnalysis {
  21. public:
  22. //评估对象
  23. /**
  24. * @brief 集对分析法构造函数
  25. * @param rMat 同异反评估矩阵
  26. * @param wMat 权重系数矩阵
  27. * @param eMat 同异反系数矩阵
  28. * @param optiDir false:最小值,true:最大值
  29. */
  30. SetPairAnalysis(const QVector<EvaluateIndex> &rMat, const QVector<qreal> &wMat,
  31. const QVector<qreal> &eMat = QVector<qreal>(), const QVector<bool> &optiDir = QVector<bool>());
  32. void setEvaluateNames(const EvaluateNames &names) { m_evalNames = names; }
  33. EvaluateNames getEvaluateNames() const { return m_evalNames; }
  34. /**
  35. * @brief 联系度值
  36. * @return
  37. */
  38. Relations getRelations() const;
  39. private:
  40. QVector<EvaluateIndex> m_rMat;
  41. QVector<qreal> m_wMat;
  42. QVector<qreal> m_eMat;
  43. EvaluateNames m_evalNames;
  44. };
  45. #endif //ALGORITHM_SETPAIRANALYSIS_H