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
- };
-
- 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
|