freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

人工智能實驗報告-資料下載頁

2025-08-03 08:40本頁面
  

【正文】 streamusing namespace std。//顯示信息void Expert::ShowInfo(){ cout************************************************endl。 cout 疾病診斷專家系統(tǒng) endl。 cout by 1040501211 陳嘉生 endl。 cout************************************************endl。}//初始化疾病列表,返回是否初始化成功bool Expert::initDiseaseList(){ __try { return readFile()。 } __except(true) { cout知識庫文件()解析錯誤!endl。 return false。 }}//,獲取疾病信息bool Expert::readFile(){ fstream ioFile。 (, fstream::in)。 if (!()) { cout無法打開知識庫文件()!endl。 return false。 } Disease *pDisease = NULL。 while (!()) { string strInput。 ioFilestrInput。 if (() == 0) continue。 if (() == 39。[39。 amp。amp。 () == 39。]39。) { //有[]包裹的是疾病名稱 strInput = (1,() 2)。 pDisease = addDisease(strInput)。 } else { //其余的是癥狀名稱 addSymptom(pDisease, strInput)。 } } ()。 return true。}//添加一個疾病,返回此疾病信息的指針Disease* Expert::addDisease(const string amp。name){ Disease disease。 = name。 (disease)。 return amp。()。}//添加疾病的癥狀void Expert::addSymptom(Disease *disease,const string amp。symptom){ disease(symptom)。}//診斷函數(shù)void Expert::diagnosis(){ //用戶輸入的第一個癥狀 string symptomInput。 //用戶有的癥狀和沒有的癥狀 vectorstring symptomHave, symptomNotHave。 //搜索的結(jié)果列表 vectorDisease* findList。 cout【癥狀詢問】endl。 coutendl請輸入癥狀: (或\不確定\以開始模糊搜索)endl。 cinsymptomInput。 if (symptomInput == 不確定) { //添加所有疾病到findList列表中 for (unsigned int i = 0。 i ()。 ++i) { (amp。m_DiseaseList[i])。 } } else { //添加有此癥狀的疾病到findList列表中 for (unsigned int i = 0。 i ()。 ++i) { Disease *pDisease = amp。m_DiseaseList[i]。 for (unsigned int j = 0。 j pDisease()。 ++j) { if (symptomInput == pDiseasesymptomList[j]) { (pDisease)。 } } } //添加輸入的癥狀到symptomHave列表中 (symptomInput)。 } for (vectorDisease*::iterator ite = ()。 ite != ()。) { bool remove = false。//是否從findList列表中排除本疾病 for (unsigned int j = 0。 j (*ite)()。 ++j) { Disease *pDisease = *ite。 if (find((), (), pDiseasesymptomList[j]) != ()) { //在symptomNotHave列表中找到此癥狀,直接排除 remove = true。 break。 } else if (find((), (), pDiseasesymptomList[j]) == ()) { //在symptomHave,symptomNotHave列表中不存在這個癥狀,則詢問 if (optionSelect(是否有癥狀\ + pDiseasesymptomList[j] + \?\n(y/n): )) { //詢問得知有此癥狀,添加癥狀到symptomHave列表中 (pDiseasesymptomList[j])。 } else { //詢問得知沒有此癥狀,添加癥狀到symptomNotHave列表中,并排除此疾病 (pDiseasesymptomList[j])。 remove = true。 break。 } } } if (remove) { //需要排除此疾病 ite = (ite)。 } else { //迭代器后移 ++ite。 } } coutendl【疾病診斷】endl。 if (() == 0) { coutendl知識庫中未找到匹配的記錄!endl。 } else { coutendl根據(jù)已有的知識庫,可能的疾病為:endl。 //輸出結(jié)果列表 for (unsigned int i = 0。 i ()。 ++i) { coutfindList[i]name。 if (i != () 1) cout, 。 if ((i+1) % 5 == 0) coutendl。//5個換行 } coutendl。 } coutendl【診斷結(jié)束】endlendl。}//提示用戶選擇Y或Nbool Expert::optionSelect(const string amp。question){ coutendlquestion。 char option。 cinoption。 switch (option) { case 39。Y39。: case 39。y39。: return true。 case 39。N39。: case 39。n39。: return false。 } return false。}[疾病1] 癥狀A(yù) 癥狀B 癥狀C 癥狀D[疾病2] 癥狀A(yù) 癥狀B 癥狀C[疾病3] 癥狀A(yù) 癥狀B 癥狀D 癥狀E[疾病4] 癥狀A(yù) 癥狀C 癥狀D[疾病5] 癥狀B 癥狀C 癥狀D 癥狀E[疾病6] 癥狀A(yù) 癥狀B[疾病7] 癥狀A(yù) 癥狀C 癥狀E[疾病8] 癥狀A(yù) 癥狀D[疾病9] 癥狀B 癥狀C 癥狀E[疾病10] 癥狀B 癥狀D[疾病11] 癥狀C 癥狀D 癥狀E六、實驗結(jié)果
點擊復(fù)制文檔內(nèi)容
化學(xué)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1