rule.h
来自「用data miming技术进行false prediction」· C头文件 代码 · 共 47 行
H
47 行
#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 + =
减小字号Ctrl + -
显示快捷键?