資源簡介
吉林大學通信工程學院信息論作業-唯一可譯碼判斷,自己寫的測試程序,供大家下載。

代碼片段和文件信息
/*////////////////////////////////////////
****唯一可譯碼測試程序*******
*作者:通信工程學院:李天平*
*時間:2011年11月15日*
*版權所有,違版必究*
//////////////////////////////////////*/
#include“uniquelyDecoded.h“
int?main()
{
int?Cnt;
cout<<“請輸入碼字的個數:“< cin>>Cnt;
Cp=input(CpCnt);//讀取用戶輸入構造碼字集合C
if(!is_singal_code(Cp))//如果是奇異碼則一定不是唯一可譯碼
{
if(fc_can_construt(CpCp))//如果可以構成F集合
{
Fp=init_fset(Cp);//構造第一個初始集合F
for(;;)
{
if(fitem_is_setc(CpFp))//判斷F中是否有元素為C中碼字
{
result_output(false);//輸出結果,不是唯一可譯碼
}
else
{
if(fc_can_construt(CpFp)&&!is_repeated)//判斷C和F是否能夠繼續構造F集合
Fp=construct_fset(CpFp);//如果可以構造繼續構造集合F
else?
result_output(true);//輸出判決結果,是唯一可譯碼,并結束程序
}
}
}
else
{
result_output(true);//是唯一可譯碼,輸出結果結束程序
}
}
else
{
result_output(false);//不是唯一可譯碼,輸出結果并且結束程序。
}
return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????123904??2011-11-17?17:34??唯一可譯碼判斷.doc
?????文件?????190691??2011-11-17?17:27??uniDecodedJudge\Debug\main.obj
?????文件?????557134??2011-11-17?17:31??uniDecodedJudge\Debug\uniDecodedJudge.exe
?????文件?????811100??2011-11-17?17:31??uniDecodedJudge\Debug\uniDecodedJudge.ilk
?????文件?????186952??2011-11-17?17:25??uniDecodedJudge\Debug\uniDecodedJudge.pch
?????文件????1098752??2011-11-17?17:26??uniDecodedJudge\Debug\uniDecodedJudge.pdb
?????文件?????186730??2011-11-17?17:26??uniDecodedJudge\Debug\uniquelyDecoded.obj
?????文件??????74752??2011-11-17?17:31??uniDecodedJudge\Debug\vc60.idb
?????文件?????110592??2011-11-17?17:26??uniDecodedJudge\Debug\vc60.pdb
?????文件???????1119??2011-11-17?17:26??uniDecodedJudge\main.cpp
?????文件???????4523??2011-11-17?17:27??uniDecodedJudge\uniDecodedJudge.dsp
?????文件????????553??2011-11-17?17:24??uniDecodedJudge\uniDecodedJudge.dsw
?????文件??????50176??2011-11-17?17:31??uniDecodedJudge\uniDecodedJudge.ncb
?????文件??????53760??2011-11-17?17:31??uniDecodedJudge\uniDecodedJudge.opt
?????文件????????264??2011-11-17?17:31??uniDecodedJudge\uniDecodedJudge.plg
?????文件???????4927??2011-11-17?17:26??uniDecodedJudge\uniquelyDecoded.cpp
?????文件????????814??2011-11-17?17:26??uniDecodedJudge\uniquelyDecoded.h
?????目錄??????????0??2011-11-17?17:27??uniDecodedJudge\Debug
?????目錄??????????0??2011-11-17?17:31??uniDecodedJudge
-----------?---------??----------?-----??----
??????????????3456743????????????????????19
- 上一篇:二類電商網站模板
- 下一篇:數據挖掘綜述_王夢雪-副本.pdf
評論
共有 條評論