Implemented BFS, DFS and A* To compile this project, use the following command: g++ -o search main.cpp Then you can run it: ./search The input is loaded from a input file in.txt Here is the format of the input file: The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm. The second line of input file shoud be an integer m indicate the number of connections for the map. Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist. The following input are for A* The following line contains two chars indicate the source and destination city for A* algorithm. Then there is an integer h indicate the number of heuristic. The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
资源简介:Joseph Ring 算法
上传时间: 2024-09-20
上传用户:xtoqm
资源简介:windows系统下用java开发的网络入侵检测程序
上传时间: 2024-09-20
上传用户:menglin330
资源简介:vc编程规范,比较详细的
上传时间: 2024-09-20
上传用户:sxmayd
资源简介:无线解码程序,是用于多种无线报警主机的解码
上传时间: 2024-09-20
上传用户:gordon_two
资源简介:16进制数转换成十进制
上传时间: 2024-09-20
上传用户:gupingdn
资源简介:数据结构课程设计 数据结构课程设计C语言版本
上传时间: 2024-09-20
上传用户:hehe6688
资源简介:学籍管理系统 系统是在VC++6.0和SQL Server 2000下开发的. 数据库在Database目录下,在SQLSERVER的查询分析器中执行即可生成数据库. 源程序在Src目录中. 因为程序极为经典,所以本人在此转载~ 一、编程环境: windows2000 +visual stdio c++ .net,Ado + SQ...
上传时间: 2024-09-20
上传用户:selenia123456
资源简介:发布java应用程序的同时发布jdk,然后可以通过这个小程序直接引导java应用程序,比用*.bat的批处理文件好看多了,没有那个讨厌的控制台窗口。【源代码,C++/C】
上传时间: 2024-09-20
上传用户:zhys