From 209101b24ff99090a2b7f379767a50c4cf6b3e41 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Apr 2012 15:59:18 +0000 Subject: Fix O(n_edges) Canvas::get_edge() to be O(lg(n_nodes)). git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@4275 a436a847-0d15-0410-975c-d299462d15a1 --- ganv/canvas.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ganv') diff --git a/ganv/canvas.h b/ganv/canvas.h index b7e4dd3..a6053ff 100644 --- a/ganv/canvas.h +++ b/ganv/canvas.h @@ -81,6 +81,15 @@ void ganv_canvas_add_node(GanvCanvas* canvas, GanvNode* node); +/** + * ganv_canvas_get_edge: + * Get the edge between two nodes, or NULL if none exists. + */ +GanvEdge* +ganv_canvas_get_edge(GanvCanvas* canvas, + GanvNode* tail, + GanvNode* head); + void ganv_canvas_disconnect_edge(GanvCanvas* canvas, GanvEdge* edge); -- cgit v1.2.1