📄 main.cpp
字号:
#include <afxwin.h>
#include <iostream.h>
#include <time.h>
#include "SearchLib.h"
void main()
{
ALGRAPH graph;
// srand((unsigned int)time(NULL));
CreateRandomGraph(graph);
list<int> listShortestPath;
STUDYRESULT resultPath;
int a = GetTickCount();
Dual_ShortestPath_AStart(graph, 0, MAX_VERTEX_NUM-1, listShortestPath, resultPath);
int b = GetTickCount();
cout<<"耗时: "<<b-a<<endl;
cout<<"最短路径长度是: "<<resultPath.dCostSumOnASelectedPath<<endl;
cout<<"扩展的节点: "<<resultPath.nNumberOfExpandedNode<<endl;
cout<<"最短路径上的节点数: "<<resultPath.nNodeNumberOnASelectedPath<<endl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -