summaryrefslogtreecommitdiffstats
path: root/src/lib/eina_graph_private.h
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-01-04 13:44:00 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-01-04 13:44:00 +0100
commit35598bc2d9a41ddaabded5f21e0ec92f001c5a1b (patch)
tree048fbf770e2b1818fa9b45ca59cd370085ff8c53 /src/lib/eina_graph_private.h
parent2ae9612e7a248d57938adde5722ba552c027521e (diff)
downloadeina_graph-35598bc2d9a41ddaabded5f21e0ec92f001c5a1b.zip
eina_graph-35598bc2d9a41ddaabded5f21e0ec92f001c5a1b.tar.gz
DFS and BFS use 1 data array to improve spatial locality
Diffstat (limited to 'src/lib/eina_graph_private.h')
-rw-r--r--src/lib/eina_graph_private.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/lib/eina_graph_private.h b/src/lib/eina_graph_private.h
index ccbff01..526e4e4 100644
--- a/src/lib/eina_graph_private.h
+++ b/src/lib/eina_graph_private.h
@@ -103,21 +103,31 @@ typedef struct _Eina_Graph
_Eina_Graph_Adjacents *adjs;
} _Eina_Graph;
+typedef struct _Eina_Graph_DFS_Data
+{
+ Eina_Bool m;
+ unsigned int e;
+} _Eina_Graph_DFS_Data;
+
typedef struct _Eina_Graph_DFS
{
unsigned int s;
unsigned int vertices;
- Eina_Bool *marked;
- unsigned int *edge_to;
+ _Eina_Graph_DFS_Data *data;
} _Eina_Graph_DFS;
+typedef struct _Eina_Graph_BFS_Data
+{
+ Eina_Bool m;
+ unsigned int e;
+ unsigned int d;
+} _Eina_Graph_BFS_Data;
+
typedef struct _Eina_Graph_BFS
{
unsigned int s;
unsigned int vertices;
- Eina_Bool *marked;
- unsigned int *edge_to;
- unsigned int *dist_to;
+ _Eina_Graph_BFS_Data *data;
} _Eina_Graph_BFS;
#endif /* _EINA_GRAPH_PRIVATE_H */