1,矢量数据的存储结构是什么由哪几个表组成

常见的矢量数据结构,主要有下面5种:面条数据结构(spaghetti)、索引式数据结构、DIME数据结构、链状双重独立式、POLYVRT结构
我不会~~~但还是要微笑~~~:)

矢量数据的存储结构是什么由哪几个表组成

2,图的存储结构

索引结构和hash结构
数据结构的逻辑结构独立于其存储结构 数据结构的存储结构是和相应的数据在内存中的物理地址之间的关系有关。而逻辑结构只是描述数据之间的关系(三大逻辑结构的一种)。举例说,线性表(元素之间的逻辑关系是线性的)可以是顺序存储的方式,即所有元素相邻存放,在物理地址上是连续的(存储结构);而对于链式存储的线性表,他的所有元素之间不一定是线性相连的,可能是第一个结点(元素)的地址为0x123,而第二个元素又出现在物理地址0x100上。也就是说逻辑结构是线性的但是存储结构不一定就是线性的了。

图的存储结构

3,图的两种存储结构是什么

二楼说错了,方向有误。这两个分别叫剖面符号和断面符号,他们剖段的方向都是纵向的,观察的方向是指向数字的方向,从网页上来看,就是L1是从左往右,而1┃则表示从右往左看。这两种符号的区别是断面图与剖面图的区别在于:断面图只画形体被剖开后断面的投影,而剖面图要画出形体被剖开后整个余下部分的投影如图。 1)剖面图是形体剖切之后剩下部分的投影,是体的投影。断面图是形体剖切之后断面的投影,是面的投影。 剖面图中包含断面图。 2)剖面图用剖切位置线、投射方向线和编号来表示。断面图则只画剖切位置线与编号,用编号的注写位置来代表投射方向。 3)剖面图可用两个或两个以上的剖切平面进行剖切,断面图的剖切平面通常只能是单一的。
图的存储结构分为(邻接矩阵)和(邻接表)

图的两种存储结构是什么

4,在线急求熟悉图的两种常用的存储结构邻接矩阵和邻接表

#include<stdio.h>#include<malloc.h>#define NULL 0#define maxvernum 100typedef struct node int adjvex; struct node *next;}nodetype;typedef struct frontnode int data; struct node *next;}frontnodetype;frontnodetype adjlist[maxvernum];/*********************************************/void main() void bfs(frontnodetype g[],int v,int c[]); void travelgraph(frontnodetype g[],int n); frontnodetype adjlist[6]; int i,j,m; for(i=1;i<=5;i++) adjlist[i].data=i; adjlist[i].next=NULL; } for(j=1;j<=5;j++) printf("进入第%d次循环\n",j); printf("开始输入前请输入一个不为0的m值以便输入\n"); scanf("%d",&m); while(m!=0) int x; printf("请输入结点序号(x=0表示后面没有结点):\n"); if(x!=0) scanf("%d",&x); nodetype *p; p=(nodetype *)malloc(sizeof(nodetype)); p->adjvex=x;p->next=NULL; p->next=adjlist[j].next; adjlist[j].next=p; } else break; printf("是否停止?(m为0时停止输入,m为1时继续输入。)\n"); scanf("%d",&m); } } printf("广度优先搜索序列为:\n"); travelgraph(adjlist,5);} /************************************************/void bfs(frontnodetype g[],int v,int c[])int q[6],r=0,f=0;nodetype *p;c[v]=1;printf("%d\n",v);q[0]=v;whille(f<=r)v=q[f++];p=g[v].next;while(p!=NNLL)v=p->adjvex;if(c[v]==0)c[v]=1;printf("%d\n",v);}p=p->next;}}}/************************************************/void travelgraph(frontnodetype g[],int n) int v; int c[6]; for(v=1;v<=n;v++) c[v]=0; for(v=1;v<=n;v++) if(c[v]==0) dfs(g,v,c);}
package com.graphic;public class dfs_graph /** * @param args */ public static void main(string[] args) int matrix[][] = dfs_graph graph = new dfs_graph(); graph.init(matrix); } int time = 0; gnode array[]; public void init(int matrix[][]) array = new gnode[matrix.length]; for (int i = 0; i < array.length; i++)// 初始化 array[i] = new gnode(i); } for (int i = 0; i < array.length; i++) if (array[i].color.equals("w")) dfs(array[i], matrix, array); for (int j = 0; j < array.length; j++) if(j>0) system.out.println(array[j].id + " color=" + array[j].color + " d_time=" + array[j].d_time + " f_time=" + array[j].f_time+" par= "+array[j].par.id); } else system.out.println(array[j].id + " color=" + array[j].color + " d_time=" + array[j].d_time + " f_time=" + array[j].f_time); } } system.out.println(); system.out.println(); } } // dfs(array[0], matrix, array); } public void dfs(gnode u, int matrix[][], gnode array[]) u.color = "g"; time++; u.d_time = time; for (int i = 0; i < matrix.length; i++) if (matrix[u.id][i] == 1 && array[i].color.equals("w")) array[i].par = u; dfs(array[i], matrix, array); } } u.color = "b"; time++; u.f_time = time; }}class gnode string color;// color=black 没有访问,//color=gray 正在访问//color=black已经访问结束了 int id; int d_time; int f_time; gnode par; public gnode() } public gnode(int id) this.color = "w"; this.d_time = 0; this.f_time = 0; this.par = null; this.id = id; }}别人写的代码你可能不容易理解的。给你个参考吧:算法导论第二版22章,图的基本算法,里面有关于图的dfs和bfs算法。代码是用伪代码写的,但是讲解很详细,慢慢看,就当做学习的过程吧。

文章TAG:图数据库  存储结构有哪些  矢量数据的存储结构是什么由哪几个表组成  
下一篇