diff options
author | David Robillard <d@drobilla.net> | 2012-04-26 15:59:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-26 15:59:18 +0000 |
commit | 209101b24ff99090a2b7f379767a50c4cf6b3e41 (patch) | |
tree | fa656c9343624ccb87e17449c09923ff4d955e42 /ganv | |
parent | 549647b61924ea8bcd55ad243ff9c6fce6d634cb (diff) | |
download | ganv-209101b24ff99090a2b7f379767a50c4cf6b3e41.tar.gz ganv-209101b24ff99090a2b7f379767a50c4cf6b3e41.tar.bz2 ganv-209101b24ff99090a2b7f379767a50c4cf6b3e41.zip |
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
Diffstat (limited to 'ganv')
-rw-r--r-- | ganv/canvas.h | 9 |
1 files changed, 9 insertions, 0 deletions
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); |