123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef MINDEVALUATION_H
- #define MINDEVALUATION_H
- #include <QObject>
- #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<MindNodeItem> mindNodeWeights;
- private:
- void init();
- void computeSingleWeights(); // 单专家
- void computeNoMergeWeights(); // 数据集结
- void computeMergeWeights(); // 矩阵集结
- void computeOneEntry(const QList<NodeMatrixInfo *> &nmInfos, QList<MindNodeItem> &mindNodeItem); // 计算单个实例
- private:
- CMind *m_mind;
- int m_expertId;
- QString m_tableType;
- int m_mindMatrix;
- QList<QList<SeqNode>> m_seqNodes;
- AggregationType m_aggregationType;
- bool m_isAggregationOp; // 是否做集结操作
- };
- #endif // MINDEVALUATION_H
|