Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a05b65fc9d8e7cb1d279bf9dc02192c8b0eb7c78
[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;
19 /*   int index; */
20   void *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;
30   double length;
31 } s_xbt_edge_t;
32
33 /* Graph structure */
34 /* typedef struct xbt_graph *xbt_graph_t; */
35 typedef struct xbt_graph 
36 {
37   xbt_dynar_t nodes;
38   xbt_dynar_t edges;
39   unsigned short int directed;
40   void *data;
41 } s_xbt_graph_t;
42 void xbt_floyd_algorithm(xbt_graph_t g, double* adj,double* d,  xbt_node_t* p);
43
44
45 #endif                          /* _XBT_GRAPH_PRIVATE_H */