⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rule.h

📁 用data miming技术进行false prediction
💻 H
字号:
#ifndef RULE_H
#define RULE_H

#include <iostream>
#include <string>
#include <vector>

#include "boost/algorithm/string.hpp"
#include <boost/tokenizer.hpp>

#include "AppException.h"

using namespace std;
using namespace boost;

class Rule {
    friend ostream& operator<<(ostream& os, const Rule& rule);

    public:
        Rule(string rule, float confidence);
        bool operator<(const Rule& anotherRule) const;

        virtual ~Rule() {};

        string getRule() const;
        float getConfidence() const;
        vector<string>& getIfVector();
        vector<string>& getThenVector();

    private:
        string mRule;
        float mConfidence;
        vector<string> ifVec;
        vector<string> thenVec;
        void populateVectors();

};

inline ostream& operator<<(ostream& os, const Rule& rule) {
    os << rule.getRule();
    os << ": " << rule.getConfidence();

    return os;
};

#endif /* RULE_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -