所有顶点间最短路径FloydWarshall算法头文件C++
2011-09-17 12:19
639 查看
你看,禁止了合成复制构造函数和合成赋值操作符,这些都是新学的.
其他的,就比较直观了.
其他的,就比较直观了.
// graphRepresentAsAdjacentMatrix.h -- graph header file. // Purpose: // A graph represent as a adjacent matrix, this graph can't storage // weight value instead of true or false means m_matrix[i][j] is on or off. #include <iostream> #include <vector> class Graph { private: static const int Infinity = 1 << 30 ; static const int Nil = -1 ; typedef int Weight ; Weight * * m_matrix ; Weight * * m_distance ; int * * m_parent ; int m_rows ; int m_currentRows ; int m_min (int a, int partAOfB, int partBOfB) ; Graph (const Graph & graph) ; Graph & operator = (const Graph & graph) ; public: explicit Graph (unsigned int rows) ; bool importARowOfGraph (const std ::vector<int> & indexOfCurrentVertexAdjoinTo, const std ::vector<int> & weightOfCurrentVertexAdjoinTo) ; void floydWarshall (void) ; void printPathBetweenTwoVertexes (int startVertex, int endVertex) ; ~Graph (void) ; } ;
相关文章推荐
- 所有顶点间最短路径FloydWarshall算法实现文件C++
- 所有顶点间最短路径FloydWarshall算法主例程C++
- Floyd算法-所有顶点之间的最短路径(C++模板)
- _DataStructure_C_Impl:在图G中求距离顶点v0最短路径为k的所有顶点
- 求无向图顶点之间的所有最短路径
- 每对顶点间的最短路径C++实现
- 每对顶点间的最短路径算法时间复杂度改进C++实现
- 每对顶点间的最短路径算法时间复杂度改进C++实现
- Floyd All Shortest Path 所有最短路径的查找 C++程序
- 图的所有节点对之间的最短路径—Floyd算法(C++)
- 所有点对的最短路径-FloydWarshall算法
- 所有顶点对之间的最短路径
- hnu12519 Travelling Tom 求所有顶点的最短路径(floyd)
- 所有顶点对之间的最短路径之Floyd-Warshall算法
- Geeks面试题:Floyd Warshall Algorithm 所有顶点之间的最短路径问题
- 每对顶点间的最短路径C++实现
- Floyd算法求解所有顶点间的最短路径
- hnu12519 Travelling Tom 求所有顶点的最短路径(floyd)
- hnu12519 Travelling Tom 求所有顶点的最短路径(floyd)
- 所有顶点对最短路径问题(图的应用)