摘要:
#include <cassert> #include <vector> template<typename Graph> class ShortestPath { private: Graph &G; int s; //某一个点 bool* visited; int* from;//路径 int 阅读全文
摘要:
#include <cassert> #include <vector> template<typename Graph> class Path { private: Graph &G; int s; //某一个点 bool* visited; int* from;//路径 void dfs(int 阅读全文
摘要:
#ifndef COMPONENT_H #define COMPONENT_H #include <iostream> #include <cassert> using namespace std; //图的深度优先遍历 template<typename Graph> class Componen 阅读全文
摘要:
稀疏图 #ifndef SPARSEGRAPH_H #define SPARSEGRAPH_H #include <iostream> #include <vector> #include <cassert> using namespace std; //稀疏图图 -- 邻接表 class Spar 阅读全文