Description: 用C写的源程序功能分别是1.用DFS算法判断有向图中是否有环2.从文件中读图,用邻接链表保存信息,寻找两个结点vi,vj间的最短路径-written in C source is a function respectively. DFS algorithm used to determine whether there are plans Central 2. Interpret drawings from the file, use the adjacent Chain preservation of information to find two nodes vi, vj the shortest path Platform: |
Size: 3097 |
Author:光光 |
Hits:
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:
Description: 用C写的源程序功能分别是1.用DFS算法判断有向图中是否有环2.从文件中读图,用邻接链表保存信息,寻找两个结点vi,vj间的最短路径-written in C source is a function respectively. DFS algorithm used to determine whether there are plans Central 2. Interpret drawings from the file, use the adjacent Chain preservation of information to find two nodes vi, vj the shortest path Platform: |
Size: 3072 |
Author:光光 |
Hits:
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:
Description: 本文档容括了C(C++)所有算法,分为数值算法、图论算法、背包算法、排序算法、高精度算法、树的遍历、进制转换、全排列和组合生成、查找算法、贪心、回溯法框架、DFS框架、BFS框架、数据结构相关算法。并有实例源码-This document, including the capacity C (C ) for all algorithms, divided into numerical algorithms, graph theory, algorithm, knapsack algorithm, sorting algorithm, high-precision algorithms, tree traversal, binary conversion, the whole arrangement and combination of generation, search algorithm, greedy , backtracking framework, DFS framework, BFS framework, data structure-correlation algorithm. And examples of source Platform: |
Size: 15360 |
Author:海霞 |
Hits:
Description: 图的邻接表存储表示法 源码 这是进行计算机图论算法的基础 如最基本算法DFS BFS
图的邻接表存储表示法 源码 这是进行计算机图论算法的基础 如最基本算法DFS BFS-Adjacency list graph representation of source storage This is a computer algorithm based on graph theory such as the basic algorithm DFS BFS graph adjacency list representation storage source This is a computer algorithm based on graph theory such as the basic algorithm DFS BFS Platform: |
Size: 880640 |
Author:cuiyuzheng |
Hits:
Description: 包括了图的大部分基本算法,每一种算法都以邻接矩阵与邻接表两种形式给出,算法包括建图,图的遍历(如DFS和BFS),最小生成树,从某个源点到蓁各顶点的最短路径等-Includes most of the basic graph algorithms, each algorithm is to adjacency matrix and adjacency list is given in two forms, algorithms, including the construction of map, graph traversal (such as DFS and BFS), the minimum spanning tree, from a source point Zhen each vertex to the shortest path, etc. Platform: |
Size: 244736 |
Author:seckCoder |
Hits:
Description: Source Code OpenGL and Java (JOGL), for generate 3D maze (using DFS algorithm), and you can move a cursor in maze, using your mouse, to find a way out from maze. Platform: |
Size: 1704960 |
Author:sgt |
Hits:
Description: DFS CODE Depth-first search algorithm Matlab source this procedure site collected from abroad, is the standard depth-first search algorithm, can be achieved and the detection circuit node traversal functions, details see the original English Notes I added this procedure randomness, that is, bifurcation encountered when a randomly selected node, become a random depth-first search algorithm Platform: |
Size: 3072 |
Author:Nikos |
Hits:
Description: 1. 用DFS判断一个无向图是否是连通图;
2. 为有向图的边分类,将它们的边分为前向边、后向边和交叉边;
3. 用DFS和点消除求有向图的拓扑排序;
4. 判断有向图是不是强连通图,若不是,求强连通分量;
5. 判断有向图是不是半连同图;
6. 判断有向图是不是单连通图;
7. 判断无向图是不是双连通图。
通过以上编程对DFS的应用,进一步了解DFS的算法及它所代表的算法思想。
-1. Using DFS to test if a given undirected graph is connected or not.
2. Classify the edges of a directed graph into tree edges, back edges, forward edges or cross edges by a depth-first traversal of the graph. If the given graph is undirected, classify the edges into tree edges and back edges. And verify if a directed or undirected graph has a cycle.
3. Compute the topological order of a directed graph using both DFS algorithm and source removal algorithm.
4. A strongly connected graph is a directed graph with every pair of vertices reachable from each other. A strongly connected component C of a directed graph G is a subset of maximal vertices such that every pair of vertices in the subset are reachable from each other. A strongly connected component graph GSCC of a graph G is a directed graph that each component C of G is considered as a single vertex in GSCC and there is an edge between components C1 and C2 if there exist an edge (u, v) in the graph G with u belongs to C1 and v Platform: |
Size: 10240 |
Author:卢竹江 |
Hits:
Description: 深度优先搜索(DFS),此代码为自己写的POJ1979题的源代码。使用dfs算法简单水过。-Depth-first search (DFS), this code is to write their own POJ1979 title of the source code. Dfs algorithm is simple to use water too. Platform: |
Size: 1024 |
Author:胤明枫 |
Hits:
Description: DFS算法源码,有需要的下载,够20个字了没,应该不够,这下够了-DFS algorithm source code, there is a need to download, 20 words enough yet, it should be enough, which is enough under Platform: |
Size: 1024 |
Author:zms |
Hits: