Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
6adc68a1c15362dd6b6d76fdbfa138232dc426d5
[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;      /* user data */
20   void *xbtdata;   /* private xbt data: should be reinitialized at the
21                       beginning of your algorithm if you need to use it */  
22 } s_xbt_node_t;
23
24 /* edge structure */
25 /* typedef struct xbt_edge *xbt_edge_t; */
26 typedef struct xbt_edge 
27 {
28   xbt_node_t src;
29   xbt_node_t dst;
30   void *data;      /* user data */
31   void *xbtdata;   /* private xbt data: should be reinitialized at the
32                       beginning of your algorithm if you need to use it */  
33   double length;
34 } s_xbt_edge_t;
35
36 /* Graph structure */
37 /* typedef struct xbt_graph *xbt_graph_t; */
38 typedef struct xbt_graph 
39 {
40   xbt_dynar_t nodes;
41   xbt_dynar_t edges;
42   unsigned short int directed;
43   void *data;      /* user data */
44   void *xbtdata;   /* private xbt data: should be reinitialized at the
45                       beginning of your algorithm if you need to use it */  
46 } s_xbt_graph_t;
47 void xbt_floyd_algorithm(xbt_graph_t g, double* adj,double* d,  xbt_node_t* p);
48
49
50 #endif                          /* _XBT_GRAPH_PRIVATE_H */