ICode9

精准搜索请尝试: 精确搜索
  • 图 练习题2021-09-12 10:35:00

    1. #include<stdio.h> #include<malloc.h> #define MAX_VERTEX_NUM 100 typedef int VertexType; //表结点 typedef struct ArcNode{ int adjVex;//邻接域 struct ArcNode *nextArc; }ArcNode; //头结点 typedef struct VNode{ VertexType data; ArcNode

  • 图的邻接表表示法及深度优先、广度优先遍历算法2020-11-24 21:33:50

    知识点: 1、图的邻接表表示法; 2、图的深度优先算法; 3、图的广度优先算法。 //图的邻接表表示法 //基于邻接表表示法的图的遍历 #include "string.h" #include<stdlib.h> #include<queue> #include<iostream> using namespace std; typedef struct ArcNode { int adjvex;//邻

  • 双层网络的创建(层的加入,以及度中心性算出)2020-03-16 17:56:35

    思路:在之前的单层网络上,再创建一个网络。两个网络的节点一一对应,这样方便了两个网络的连接。区别两个网络的就是它们属于不同的层。   用到的数据:     完整代码: #include<stdio.h> #include<stdlib.h> #include<string.h> #include<malloc.h> #include<math.h> #include<tim

  • 封装 有向图 遍历,删除,插入等2019-12-16 15:01:57

      初始化四个弧: 0 1 0 2 3 1 3 2   1 2 #include <iostream> 3 #include <queue> 4 using namespace std; 5 6 const int MAXSIZE = 10; //最多的顶点数 7 8 struct ArcNode 9 { 10 int adjvex; /

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有