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

正文內(nèi)容

tsp問題的遺傳算法求解方案--源程序清單(旅行商問題,包含算法介紹,源程序,測試結(jié)果)(參考版)

2025-05-15 23:09本頁面
  

【正文】 Map *MapObje。 RoundMap RoundMapObject。//城市數(shù)目 bool power。//種群大小 int maxgen。//交叉率 float pmutation。 } private: UINT MapStyle。 } void SetPower(bool n) //設(shè)置世代進化類型 { power=n。 } int Getmaxgen( ) //獲得世代數(shù) { return maxgen。 } float Getpmutation( ) //獲得變異概率 { return pmutation。//畫線的準備 void DrawLine(HWND hwnd )。 point)。 point)。//畫出所有的點 void DrawMap(HWND hwnd,HDC hdc)。 point,bool bdrawline)。 void CleanAllUpDate( )。//獲得 當前地圖類型 void SetMapStyle(HWND hwnd,WPARAM wParam)。//顯示歡迎窗口 (開始 ) //void help(HWND hwnd)。//交叉類型 class Control { public: Control( )。 extern UINT DrawMutationStyle。 extern WORD aftersecondtime。 //算法結(jié)束時的時間 extern WORD afterhourtime。 extern WORD beforesecondtime。 } ///////////////////////////////////////////////////////////////////////////// 六 . 控制 類 /////////////pragma once include include include include include include include //算法啟動前時間 extern WORD beforehourtime。 } (Iter)。 } Iter=remove_if((),(),equal_point( Drawpoint))。 Drawpoint=FindAroundPoint(point)。 =1。 point) { POINT temppoint,Drawpoint。 } //保證點不重復 (Drawpoint)。 if(==)//表示未找到點 { return。 =1。 point)//保存 POINT(參數(shù)為實際位置 )到向量 { POINT temppoint,Drawpoint。 } // 1 return。n()。 if(n==()) //在其他地區(qū) (60 個之外 )點擊右鍵則向量大 小不變 { return。 point) { int n=()。 ReleaseDC (hwnd, hdc)。 Ellipse (hdc, (Drawpoint).x5, (Drawpoint).y5, (Drawpoint).x+5, (Drawpoint).y+5) 。 HBRUSH hbrush=CreateSolidBrush( RGB(255,0,0) )。} AddPoint( point )。amp。 Drawpoint=FindAroundPoint(point)。 =1。 point) { //在地圖上畫點 (參數(shù)為實際位置 )// HDC hdc。 } return (*Iter)。 =1。 //獲得該點附近的點 } Iter=find_first_of((),(),(), (),equal_point())。 =+m。 (temppoint)。m) { =+m。n++) for(int m=3。 for(int n=3。 POINT temppoint。 } ///////////////////////////////////////////////////////////////////////////// ////////////////找到該點是否有所在區(qū)域的值 /////////////////////////////////// POINT RoundMap::FindAroundPoint( const POINTamp。 } ()。 } return。 outFile39。 outFile 。n()。\n39。\n39。 } if(()=0) { return。 if ( !outFile ) { cerr unable to open input file: bailing out!\n。n++) { Ellipse (hdc, mappoint[n].x5, mappoint[n].y5, mappoint[n].x+5, mappoint[n].y+5)。 for(int n=0。 rect, hbrush )。 //擦除背景區(qū)域 hbrush=CreateSolidBrush( RGB(255,255,255) )。 =0。///// 無效區(qū)域 (背景區(qū)域) =100。 } ///////////////////////////////////////////////////////////////////////////// //////////////////////畫地圖 ///////////////////////////////////////////////// void RoundMap::DrawMap(HWND hwnd,HDC hdc ) ////n 表示線的條數(shù) { RECT rect。 point60[n].y=point60[n].y+81。n60。 point60[n].y=iallpoint[2*n+1]。n60。 int iallpoint[120]= { 305,21,324,23,344 , 23 ,365 ,19,384, 13, 402, 6,421, 4,437, 16 ,454 ,28,468 ,41, 482, 57, 493, 74,503, 93,509, 113, 515, 132, 518, 152,520,173,518, 193,514, 214,510,233, 501, 254,493, 271,481, 287,468,304, 456, 318, 439,329,422, 342,284, 16,263 ,12,246, 4, 225, 3, 210, 17,194, 28,178, 42, 166, 56, 156, 74,145, 93,137, 112,133,131,129, 153, 127, 173,128,195,132, 213,137, 233,146 ,255, 155 ,272,165, 290,180, 307,194,318,208, 331, 227 ,343,244,352,265, 360,282 ,365,303 ,366, 326, 369,343, 368,368, 365,385, 360,404, 353 }。 }。// 刪除 POINT(參數(shù)為實際位置 )到向量 vectorPOINT GetAllClickPoint( )。// 保存 POINT(參數(shù)為實際位置 )到向量 void SubPoint(const POINTamp。 void AddPoint(const POINTamp。 //將地圖上已存在的點 (參數(shù)為實際位置 )刪除 void SmearPonit(HWND hwnd ,const POINTamp。//清除 vecpoin 所有點 //在地圖上畫點 (參數(shù)為實際位置 ) void DrawPonit(HWND hwnd ,const POINTamp。 // void SaveClickPoint( )。//畫地圖 POINT FindAroundPoint(const POINTamp。//點在有效區(qū)域 } ///////////////////////////////////////////////////////////////////////////// 五 .圓形坐標地圖類 //////////////////pragma once include class RoundMap:public Map { public: RoundMap()。 return temppoint。 if( 0||0||700||420 ) { =1。 =6。 } ///////////////////////////////////////////////////////////////////////////// /////地圖位置轉(zhuǎn)換為實際位置 ////////////////////////////////////////////////// POINT DefaultMap::GetMapPoint(const POINTamp。 +=51。 return temppoint。// 判斷點是否在有效區(qū)域 if(0||0||700||420) { =1。 = 。 } ///////////////////////////////////////////////////////////////////////////// ///////////////////將地圖與實際位置之間轉(zhuǎn)換 ////////////////////////////////// POINT DefaultMap::GetRealPoint(const POINTamp。 } return。n()。 ReleaseDC (hwnd, hdc)。 if(n==()) //沒找到則向量大小不變 { return。 int n=()。 point) { HDC hdc。 } (Iter1)。 } Iter1=find_first_of( (),(),(), (),equal_point() )。 vecroundpoint=FindAroundPoint(point,2)。 } vector POINT vecroundpoint。 } ///////////////////////////////////////////////////////////////////////////// //////////////清除一個指定的點 /////////////////////////////////////////////// void DefaultMap::SubPoint(const POINTamp。 find_if( (),(), equal_point(tempoint) )!=() ) { return。 if( ()!=0 amp。 } ///////////////////////////////////////////////////////////////////////////// ///////添加和減少點 (在地圖位置 )到向量 /////保存 POINT(參數(shù)為實際位置 )到向量 //// void DefaultMap::AddPoint(const POINTa
點擊復制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1