Logo AND Algorithmique Numérique Distribuée

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