Welcome![Sign In][Sign Up]
Location:
Search - depth first search in cpp

Search list

[Other resourceBFS_DFS_Astar

Description: 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.
Platform: | Size: 2984 | Author: bo | Hits:

[Mathimatics-Numerical algorithmsdfs

Description: 深度优先搜索算法解决八码难题-depth-first search algorithm to solve eight problems yards
Platform: | Size: 2048 | Author: 高兵 | Hits:

[Data structsdfs

Description: 数据结构里的dfs算法,包括递归与非递归。用vc6.0编写-data structure, the dfs algorithms, including recursive and non- recursive. Prepared with vc6.0
Platform: | Size: 1024 | Author: 叶芦芦 | Hits:

[AI-NN-PRBFS_DFS_Astar

Description: 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. -Implemented BFS, DFS and A* To compile this project, use the following command: g++-O search main.cppThen you can run it:./SearchThe input is loaded from a input file in.txtHere 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.
Platform: | Size: 3072 | Author: bo | Hits:

[Mathimatics-Numerical algorithmsDFS.cpp

Description: This code do depth first search algorithm. Adjacency matrix symbolize every edge in the graph, for example adj[i][j]=1 is an edge from i to j, i and j are vertices.
Platform: | Size: 1024 | Author: Dennis | Hits:

[Data structsGragh

Description: 图的数据结构,打包cpp,1.创建图 创建图 G(任选邻接矩阵或表) 2. 显示图 3. 深度优先搜索遍历图 4. 广度优先搜索遍历图 5. 在图中插入顶点 6. 在图中插入边- Graph data structure, packaging cpp, 1. Create a map creation graph G (optional adjacency matrix or table) 2. Display Figure 3. depth-first search traversal diagram The breadth-first search traversal diagram 5. Insert vertex in the graph 6. Insert the edge in the figure
Platform: | Size: 3072 | Author: guyuqian | Hits:

CodeBus www.codebus.net