Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : try first to associate each block or fragment with the same positiion...
[simgrid.git] / src / xbt / graph_private.h
1 /* Copyright (c) 2006, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _XBT_GRAPH_PRIVATE_H
8 #define _XBT_GRAPH_PRIVATE_H
9 #include "xbt/dynar.h"
10
11 #define NOT_EXPLORED 0
12 #define CURRENTLY_EXPLORING 1
13 #define ALREADY_EXPLORED 2
14
15 /* Node structure */
16 /* typedef struct xbt_node *xbt_node_t; */
17 typedef struct xbt_node {
18   xbt_dynar_t out;
19   xbt_dynar_t in;               /* not used when the graph is directed */
20   double position_x;            /* positive value: negative means undefined */
21   double position_y;            /* positive value: negative means undefined */
22   void *data;                   /* user data */
23   void *xbtdata;                /* private xbt data: should be reinitialized at the
24                                    beginning of your algorithm if you need to use it */
25 } s_xbt_node_t;
26
27 /* edge structure */
28 /* typedef struct xbt_edge *xbt_edge_t; */
29 typedef struct xbt_edge {
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   xbt_dynar_t nodes;
42   xbt_dynar_t edges;
43   unsigned short int directed;
44   void *data;                   /* user data */
45   void *xbtdata;                /* private xbt data: should be reinitialized at the
46                                    beginning of your algorithm if you need to use it */
47 } s_xbt_graph_t;
48 void xbt_floyd_algorithm(xbt_graph_t g, double *adj, double *d,
49                          xbt_node_t * p);
50 void xbt_graph_depth_visit(xbt_graph_t g, xbt_node_t n,
51                            xbt_node_t * sorted, int *idx);
52
53 #endif                          /* _XBT_GRAPH_PRIVATE_H */