上一页 1 2 3 4 5 6 7 8 ··· 14 下一页
摘要: // func7-2.cpp 算法7.16,algo7-7.cpp和algo7-9.cpp用到void ShortestPath_FLOYD(MGraph G,PathMatrix P,DistancMatrix D){ // 用Floyd算法求有向网G中各对顶点v和w之间的最短路径P[v][w]及... 阅读全文
posted @ 2014-09-14 09:04 meiyouor 阅读(454) 评论(0) 推荐(0) 编辑
摘要: // algo7-6.cpp 实现算法7.15的程序。迪杰斯特拉算法的实现#include"c1.h"#define MAX_NAME 5 // 顶点字符串的最大长度+1#define MAX_INFO 20 // 相关信息字符串的最大长度+1typedef int VRType;typedef c... 阅读全文
posted @ 2014-09-14 08:55 meiyouor 阅读(832) 评论(0) 推荐(0) 编辑
摘要: // algo7-5.cpp 求关键路径。实现算法7.13、7.14的程序#include"c1.h"#define MAX_NAME 5 // 顶点字符串的最大长度+1typedef int InfoType;typedef char VertexType[MAX_NAME]; // 字符串类型#... 阅读全文
posted @ 2014-09-14 08:49 meiyouor 阅读(307) 评论(0) 推荐(0) 编辑
摘要: // func7-1.cpp algo7-4.cpp和algo7-5.cpp要调用void FindInDegree(ALGraph G,int indegree[]){ // 求顶点的入度,算法7.12、7.13调用 int i; ArcNode *p; for(i=0;idata.adjvex]... 阅读全文
posted @ 2014-09-14 08:42 meiyouor 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 创建一个Windows application项目,然后可以调用里面的工具来生成代码。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Dr... 阅读全文
posted @ 2014-09-10 21:15 meiyouor 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 先创建一个工程文件->选择的是console application。然后开始写代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplic... 阅读全文
posted @ 2014-09-10 20:04 meiyouor 阅读(260) 评论(0) 推荐(0) 编辑
摘要: // algo7-3.cpp 实现算法7.10、7.11的程序#include"c1.h"#define MAX_NAME 2 // 顶点字符串的最大长度+1typedef int InfoType;typedef char VertexType[MAX_NAME]; // 字符串类型#includ... 阅读全文
posted @ 2014-09-09 12:40 meiyouor 阅读(675) 评论(0) 推荐(0) 编辑
摘要: // algo7-2.cpp 实现算法7.9的程序#include"c1.h"typedef int VRType;typedef char InfoType;#define MAX_NAME 3 // 顶点字符串的最大长度+1#define MAX_INFO 20 // 相关信息字符串的最大长度+... 阅读全文
posted @ 2014-09-09 12:31 meiyouor 阅读(643) 评论(0) 推荐(0) 编辑
摘要: 具有n 个顶点的无向连通图至少有n-1 条边,如果只有n-1 条边,则不会形成环,这样的图称为“生成树”。连通图可通过遍历构造生成树,非连通图的每个连通分量可构造一棵生成树,整个非连通图构造为生成森林。algo7-1.cpp 调用算法7.7、7.8,将无向图构造为生成森林,并以孩子—兄弟二叉链表存储... 阅读全文
posted @ 2014-08-29 21:35 meiyouor 阅读(628) 评论(0) 推荐(0) 编辑
摘要: 图有2 个基本操作:FirstAdjVex(G,v)和NextAdjVex(G,v,w)。FirstAdjVex(G,v)返回图G 中顶点v 的第1 个邻接顶点(在图中的位置)。在邻接矩阵存储结构中,返回邻接矩阵G.arcs.adj 中v 所对应的行的第1 个值为1(图)或权值(网)的顶点(在图中的... 阅读全文
posted @ 2014-08-29 21:24 meiyouor 阅读(470) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页