摘要:
#include <cassert> #include <vector> template<typename Graph> class ShortestPath { private: Graph &G; int s; //某一个点 bool* visited; int* from;//路径 int 阅读全文
posted @ 2020-04-02 22:05
Erick-LONG
阅读(377)
评论(0)
推荐(0)
摘要:
#include <cassert> #include <vector> template<typename Graph> class Path { private: Graph &G; int s; //某一个点 bool* visited; int* from;//路径 void dfs(int 阅读全文
posted @ 2020-04-02 21:48
Erick-LONG
阅读(426)
评论(0)
推荐(0)
摘要:
#ifndef COMPONENT_H #define COMPONENT_H #include <iostream> #include <cassert> using namespace std; //图的深度优先遍历 template<typename Graph> class Componen 阅读全文
posted @ 2020-04-02 21:27
Erick-LONG
阅读(341)
评论(0)
推荐(0)
摘要:
稀疏图 #ifndef SPARSEGRAPH_H #define SPARSEGRAPH_H #include <iostream> #include <vector> #include <cassert> using namespace std; //稀疏图图 -- 邻接表 class Spar 阅读全文
posted @ 2020-04-02 13:09
Erick-LONG
阅读(152)
评论(0)
推荐(0)

浙公网安备 33010602011771号