fptreemain.cpp

来自「FP-growth算法的改进C++程序,具有较好的扩展性和应用性,本程序改成用行」· C++ 代码 · 共 40 行

CPP
40
字号
// fptree.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "fptree.h"
#include <stdlib.h>
#include <iostream>
using namespace std;

void main(int argc, char *argv[])
{
/*
	LineBuf line;
	line.TimeTestEx();
	return;
*/
	Fptree	fptree;
	cout<<"\nFP-TREE: 根据指定支持度挖掘最大频繁项集"<<endl;
 if (argc < 2) {
	cout<<"参数列表:\n"
		<<"\t"<<"数据格式配置文件"<<"\t"<<"支持度组;性能指标统计输出文件;程序循环周期"<<endl;
	cout<<"\t例如:config.ini sup=20,15,10,8;sumfile=sum_big.txt;cycle=10"<<endl;
	cout<<"配置文件格式: \n"
		<<"\t"<<"Line 1: 挖掘最大频繁项集数\n"
		<<"\t"<<"Line 2: 支持度【0, 1】\n"
		<<"\t"<<"Line 3: DB中最大不同项数目\n"
		<<"\t"<<"Line 4: DB中最大事务数目\n"
		<<"\t"<<"Line 5: DB数据源名\n"
		<<"\t"<<"Line 6: 挖掘频繁项集输出文件名\n"
		<<"\t"<<"Line 7: DB源每行是否汇总项集数\n"
		<<endl;
    exit(1);
 }else if(argc >=3){
	fptree.Execute(argv[1], argv[2]);
 }else{
	 fptree.Execute(argv[1]);
 }
}

⌨️ 快捷键说明

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