Mercurial > hg > Gears > GearsAgda
diff src/llrb/compare.c @ 69:368306e1bfed
llrb deletion(not work).
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 20 Oct 2015 16:22:42 +0900 (2015-10-20) |
parents | |
children | dc6f665bb753 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/llrb/compare.c Tue Oct 20 16:22:42 2015 +0900 @@ -0,0 +1,11 @@ +#include "llrbContext.h" + +void compare(struct Context* context, struct Tree* tree, int key1, int key2) { + if (key1 == key2) { + tree->result = 0; + } else if (key1 < key2) { + tree->result = 1; + } else { + tree->result = -1; + } +}