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

📄 main.cpp

📁 This is a little tool to generate dependency and it is aimed to achieve BCD-normal form in relationa
💻 CPP
字号:
#include "Rules.h"
#include "set.h"

int main()
{
	int number;
	Rules R;
	R.readFile("qar.txt");
	R.display();
	
	
	number=R.findKey();
	for (int i=0; i<number; i++)
	{
		R.display(R.candidateKey[i]);
		cout<<"\n";
	}

	R.canonical();
	cout<<"\nbefore decomposition\n";
	R.displayRules();
	R.decomposition();
	R.checkLossless();
	cout<<"\nfinal display\n";
	R.displayRules();
	
/*
	//int temp[19];
	Set S;
	S.setSize(39);
	for (int i=0; i<19; i++)
	{
		int temp;
		do 
		{
			temp=rand()%39;
			if (!S.test(temp))
			{
				S.set(temp);
				break;
			}
		}while (true);
	}
	Set dummy;
	long count=0;
	cout<<S<<endl;
	S.forEachSubSet(dummy);
	while (S.eachSub(dummy))
	{
		//cout<<dummy<<endl;
		count++;
		if (count%1000==0)
		{
			cout<<dummy<<endl;
		}
		
	}
	cout<<count<<endl;
	cout<<dummy<<endl;
	*/
	return 0;
}

⌨️ 快捷键说明

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