#ifndef MINDEVALUATION_H #define MINDEVALUATION_H #include #include "CMind.h" #include "dbService/ClassSet.h" struct MindNodeItem { QString parent; // 节点名 QString name; double value; double score; bool operator==(const MindNodeItem &rhs) { return parent == rhs.parent && name == rhs.name; } }; class MindEvaluation : public QObject { Q_OBJECT public: enum AggregationType { NoMerge, // 数据集结 Merge // 矩阵集结 }; /** * @brief MindEvaluation * @param mind 脑图管理类 * @param expertId 专家id * @param tableType 表属于哪种 * @param mindMatrix 是否专家打分 * @param parent */ MindEvaluation(CMind *mind, int expertId, const QString &tableType, int mindMatrix, QObject *parent = nullptr); MindEvaluation(CMind *mind, AggregationType atype, const QString &tableType, int mindMatrix, QObject *parent = nullptr); ~MindEvaluation(); void updateSeqNodes(); void computeWeights(); QList mindNodeWeights; private: void init(); void computeSingleWeights(); // 单专家 void computeNoMergeWeights(); // 数据集结 void computeMergeWeights(); // 矩阵集结 void computeOneEntry(const QList &nmInfos, QList &mindNodeItem); // 计算单个实例 private: CMind *m_mind; int m_expertId; QString m_tableType; int m_mindMatrix; QList> m_seqNodes; AggregationType m_aggregationType; bool m_isAggregationOp; // 是否做集结操作 }; #endif // MINDEVALUATION_H