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

📄 frequentitemset.cpp

📁 用data miming技术进行false prediction
💻 CPP
字号:
#include "FrequentItemset.h"

FrequentItemset::FrequentItemset(string name, int count) {
    trim(name);
    this->mName = name;
    this->mCount = count;
    this->mSize = getFICount(name);
}

string FrequentItemset::getName() const {
    return mName;
}

int FrequentItemset::getCount() const {
    return mCount;
}

int FrequentItemset::getSize() const {
    return mSize;
}

int FrequentItemset::getFICount(string str) const {
    bool found = true;
    int count = 1;
    int index = -1;
    while (found) {
        index = str.find(" ", index+1);
        if (index != string::npos) {
            count++;
        } else {
            break;
        }
    }
    return count;
}

⌨️ 快捷键说明

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