摘要:
/* * description: 图的欧拉路径搜索 * writeby: Nick * date: 2012-10-25 23:32 * */#include <iostream>#include <vector>#include <stack>using namespace std;struct Edge{ int v, w; Edge(int v=-1, int w=-1) : v(v), w(w) {}};class Graph{ private: int vcount, ecount; ... 阅读全文
posted @ 2012-10-26 15:42
wouldguan
阅读(825)
评论(0)
推荐(0)
摘要:
/* * description: 图的哈密顿路径搜索 * writeby: Nick * date: 2012-10-25 23:32 * */#include <iostream>#include <vector>using namespace std;struct Edge{ int v, w; Edge(int v=-1, int w=-1) : v(v), w(w) {}};class Graph{ private: int vcount, ecount; //记录顶点总数,边总数... 阅读全文
posted @ 2012-10-26 10:14
wouldguan
阅读(2895)
评论(0)
推荐(0)
摘要:
一个有V个顶点的图G是一棵树,条件是当且仅当她满足一下4个条件中的任意一个:1. G有V-1条边,且无环。2. G的V-1条边,且是连通的。3. G中仅有一条简单路径使每一对顶点相连接。4. G是连通的,从中去除任意一条边都不会使其不连通。 阅读全文
posted @ 2012-10-26 10:14
wouldguan
阅读(277)
评论(0)
推荐(0)
摘要:
/* * description: 图的一条简单路径搜索,不是最短的 * writeby: Nick * date: 2012-10-25 23:32 * */#include <iostream>#include <vector>using namespace std;struct Edge{ int v, w; Edge(int v=-1, int w=-1) : v(v), w(w) {}};class Graph{ private: int vcount, ecount; //记录顶... 阅读全文
posted @ 2012-10-26 10:13
wouldguan
阅读(1354)
评论(0)
推荐(0)
浙公网安备 33010602011771号