- 博客(19)
- 资源 (4)
- 收藏
- 关注
转载 组合,聚合,关联,依赖 的区别
原文地址组合,聚合,关联,依赖 的区别 依赖与关联依赖(Dependency ) :含义:是类与类之间的连接,表示一个类依赖于另外一个类的定义;依赖关系仅仅描述了类与类之间的一种使用与被使用的关系;体现:在Java和C++中体现为局部变量、方法/函数的参数或者是对静态方法的调用;举例:人依赖于水和空气;汽车依赖汽油;
2014-05-26 20:24:07 546
原创 求关键路径
#include#include#include#include#define Max 30typedef struct p1{ int data; int w; int a; struct p1*next;}bian;typedef struct{ int in; char elem; bian *first;}dian;typedef struct{ d
2014-05-08 17:15:39 518
原创 二叉平衡树的基本操作
#include#include#include#includetypedef struct s{ char xh[20]; char xm[20]; char bj[15];}STD,*STP;typedef struct t{ STD data; struct t*lchild,*rchild;}node,*Tree;int search(Tree T,char
2014-05-08 17:14:51 444
原创 拓扑排序(图)
#include#include#include#includetypedef struct p{ int w; int data; struct p*next;}bian;typedef struct{ char data; int in; bian *first;}dian;typedef struct{ dian data[30]; int d,b;
2014-05-08 17:13:50 537
原创 图的创建与显示
#include#include#include#include#define Max 30typedef struct{ char dian[Max]; int bian[Max][Max]; int d,b;}ljt;typedef struct{ int elem; char p[30];}data;typedef struct{ char dian[Ma
2014-05-08 17:13:07 490
原创 prim算法
#include#include#include#includetypedef struct t{ char dian[30]; int bian[30][30]; int b,d;}ljt; void creat(ljt &G); void disp(ljt G); void prim(ljt G); void creat(ljt &G){ int i,j,k
2014-05-08 17:12:00 432
原创 floyd算法
#include#include#include#include#define Max 30typedef char str[30];typedef struct{ char dian[Max]; int bian[Max][Max]; int d,b;}ljt;void creat(ljt &G);//有向网有注释void disp(ljt G);void flo
2014-05-08 17:11:07 396
原创 dijstla算法
#include#include#include#include#define Max 30typedef char str[30];typedef struct{ char dian[Max]; int bian[Max][Max]; int d,b;}ljt;void creat(ljt &G);//有向网有注释void disp(ljt G);void dij
2014-05-08 17:10:02 1570
原创 树的基本操作
#include#include#include#includetypedef char str[30];typedef struct t{ str data; struct t*child,*bro;}tree,*cstree;typedef struct q{ cstree *data; int f,r; int size;}queue;void init(q
2014-05-08 17:05:36 466
原创 二叉树的基本操作
#include#include#include#includetypedef char str[30];typedef struct Node{ str data; struct Node *lchild,*rchild;}BiNode,*BiTree;typedef struct queue{ BiTree data; struct queue * next;
2014-05-08 17:02:50 479
原创 循环队列
typedef int * Pint;typedef struct{ Pint *base; int front; int rear; int queuesize;}SqQueue;1.初始化void initqueue(SqQueue &Q,int max){ Q.base=new Pint[max]; Q.front=Q.rear=0; Q.qu
2014-05-08 17:01:36 512
原创 运动会安排(链队列)
#include #include #include #define status int#define ok 1#define error 0#define selemtype int/*链队列类型的定义*/typedef struct qlink{ selemtype data; struct qlink *next;}Node,*linkqueue;typedef
2014-05-08 11:20:21 1334
原创 链式队列
// bank.cpp : Defines the entry point for the console application.//#include "stdio.h"#include "conio.h"/****************************************** 定义数据结构************************************
2014-05-08 11:18:02 359
原创 顺序栈
#include#include#include#includetypedef struct { char *top; char *base; int stacksize;}charstack;typedef struct{ int *top; int *base; int stacksize;}intstack;void initchar(charstack &
2014-05-08 11:12:24 501
原创 任意实数后缀表达式求值(链栈)
#include#include#include#includetypedef struct charstack{ char data; struct charstack *next;}Node1,*stack1;typedef struct intstack{ double data; struct intstack *next;}Node2,*stack2;voi
2014-05-08 11:07:31 938
原创 多项式求和求积(链表)
#include#include#include#includetypedef struct OrderList{ float coef; // 系数 int expn; // 指数 struct OrderList *next;} ElemType, *polynomial;int initorder
2014-05-08 10:58:43 1003
原创 顺序表
#include#include#include#includetypedef struct student{ char xh[15]; char xm[10]; int cj[3];}STU,*STUP;typedef struct linklist{ STUP elem; int length; int listsize;}List;int in
2014-05-08 10:54:13 429
原创 链表
#include#include#include#includetypedef struct stu{char xh[10];char xm[10];int cj[3];}STU,*STUP;typedef struct stunode{STU data;struct stunode *next;}Node,*LinkList
2014-05-08 10:39:00 421
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人