Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a xbtdata field to nodes and edges. This field can be used by our algorithms...
[simgrid.git] / src / xbt / graph_private.h
1 /*      $Id$     */
2
3 /* Copyright (c) 2006 Darina Dimitrova, Arnaud Legrand. 
4    All rights reserved.                  */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef _XBT_GRAPH_PRIVATE_H
10 #define _XBT_GRAPH_PRIVATE_H
11 #include "xbt/dynar.h"
12
13 /* Node structure */
14 /* typedef struct xbt_node *xbt_node_t; */
15 typedef struct xbt_node 
16 {
17   xbt_dynar_t out;
18   xbt_dynar_t in;  /* not used when the graph is directed */
19   void *data;      /* used data */
20   void *xbtdata;   /* private xbt data */  
21 } s_xbt_node_t;
22
23 /* edge structure */
24 /* typedef struct xbt_edge *xbt_edge_t; */
25 typedef struct xbt_edge 
26 {
27   xbt_node_t src;
28   xbt_node_t dst;
29   void *data;      /* used data */
30   void *xbtdata;   /* private xbt data */
31   double length;
32 } s_xbt_edge_t;
33
34 /* Graph structure */
35 /* typedef struct xbt_graph *xbt_graph_t; */
36 typedef struct xbt_graph 
37 {
38   xbt_dynar_t nodes;
39   xbt_dynar_t edges;
40   unsigned short int directed;
41   void *data;      /* used data */
42   void *xbtdata;   /* private xbt data */  
43 } s_xbt_graph_t;
44 void xbt_floyd_algorithm(xbt_graph_t g, double* adj,double* d,  xbt_node_t* p);
45
46
47 #endif                          /* _XBT_GRAPH_PRIVATE_H */