Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new tracing mask TRACE_VOLUME to trace the msg tasks communication size and group...
[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 #define NOT_EXPLORED 0
14 #define CURRENTLY_EXPLORING 1
15 #define ALREADY_EXPLORED 2
16
17 /* Node structure */
18 /* typedef struct xbt_node *xbt_node_t; */
19 typedef struct xbt_node {
20   xbt_dynar_t out;
21   xbt_dynar_t in;               /* not used when the graph is directed */
22   double position_x;            /* positive value: negative means undefined */
23   double position_y;            /* positive value: negative means undefined */
24   void *data;                   /* user data */
25   void *xbtdata;                /* private xbt data: should be reinitialized at the
26                                    beginning of your algorithm if you need to use it */
27 } s_xbt_node_t;
28
29 /* edge structure */
30 /* typedef struct xbt_edge *xbt_edge_t; */
31 typedef struct xbt_edge {
32   xbt_node_t src;
33   xbt_node_t dst;
34   void *data;                   /* user data */
35   void *xbtdata;                /* private xbt data: should be reinitialized at the
36                                    beginning of your algorithm if you need to use it */
37   double length;                /* positive value: negative means undefined */
38 } s_xbt_edge_t;
39
40 /* Graph structure */
41 /* typedef struct xbt_graph *xbt_graph_t; */
42 typedef struct xbt_graph {
43   xbt_dynar_t nodes;
44   xbt_dynar_t edges;
45   unsigned short int directed;
46   void *data;                   /* user data */
47   void *xbtdata;                /* private xbt data: should be reinitialized at the
48                                    beginning of your algorithm if you need to use it */
49 } s_xbt_graph_t;
50 void xbt_floyd_algorithm(xbt_graph_t g, double *adj, double *d,
51                          xbt_node_t * p);
52 void xbt_graph_depth_visit(xbt_graph_t g, xbt_node_t n, xbt_node_t * sorted,
53                            int *idx);
54
55 #endif /* _XBT_GRAPH_PRIVATE_H */