Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
complete reorganisation of examples/smpi/NAS
[simgrid.git] / examples / smpi / NAS / DGraph.h
1 #ifndef _DGRAPH
2 #define _DGRAPH
3
4 #define BLOCK_SIZE  128
5 #define SMALL_BLOCK_SIZE 32
6
7 typedef struct{
8   int id;
9   void *tail,*head;
10   int length,width,attribute,maxWidth;
11 }DGArc;
12
13 typedef struct{
14   int maxInDegree,maxOutDegree;
15   int inDegree,outDegree;
16   int id;
17   char *name;
18   DGArc **inArc,**outArc;
19   int depth,height,width;
20   int color,attribute,address,verified;
21   void *feat;
22 }DGNode;
23
24 typedef struct{
25   int maxNodes,maxArcs;
26   int id;
27   char *name;
28   int numNodes,numArcs;
29   DGNode **node;
30   DGArc **arc;
31 } DGraph;
32
33 DGArc *newArc(DGNode *tl,DGNode *hd);
34 void arcShow(DGArc *ar);
35 DGNode *newNode(char *nm);
36 void nodeShow(DGNode* nd);
37
38 DGraph* newDGraph(char *nm);
39 int AttachNode(DGraph *dg,DGNode *nd);
40 int AttachArc(DGraph *dg,DGArc* nar);
41 void graphShow(DGraph *dg,int DetailsLevel);
42
43 #endif