3 /* Copyright (c) 2006 Darina Dimitrova, Arnaud Legrand.
4 All rights reserved. */
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. */
9 #ifndef _XBT_GRAPH_PRIVATE_H
10 #define _XBT_GRAPH_PRIVATE_H
11 #include "xbt/dynar.h"
13 #define NOT_EXPLORED 0
14 #define CURRENTLY_EXPLORING 1
15 #define ALREADY_EXPLORED 2
18 /* typedef struct xbt_node *xbt_node_t; */
19 typedef struct xbt_node
22 xbt_dynar_t in; /* not used when the graph is directed */
23 double position_x; /* positive value: negative means undefined */
24 double position_y; /* positive value: negative means undefined */
25 void *data; /* user data */
26 void *xbtdata; /* private xbt data: should be reinitialized at the
27 beginning of your algorithm if you need to use it */
31 /* typedef struct xbt_edge *xbt_edge_t; */
32 typedef struct xbt_edge
36 void *data; /* user data */
37 void *xbtdata; /* private xbt data: should be reinitialized at the
38 beginning of your algorithm if you need to use it */
39 double length; /* positive value: negative means undefined */
43 /* typedef struct xbt_graph *xbt_graph_t; */
44 typedef struct xbt_graph
48 unsigned short int directed;
49 void *data; /* user data */
50 void *xbtdata; /* private xbt data: should be reinitialized at the
51 beginning of your algorithm if you need to use it */
53 void xbt_floyd_algorithm(xbt_graph_t g, double* adj,double* d, xbt_node_t* p);
54 void xbt_graph_depth_visit (xbt_graph_t g,xbt_node_t n,xbt_node_t* sorted,int* idx);
56 #endif /* _XBT_GRAPH_PRIVATE_H */