WIP: implement the splay-list algorithm #2
2 changed files with 929 additions and 924 deletions
|
@ -365,12 +365,12 @@ main()
|
||||||
api_skip_dot_ex(of, list, gen++, msg, sprintf_ex_node);
|
api_skip_dot_ex(of, list, gen++, msg, sprintf_ex_node);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("m = %ld\n", splay_list_m(list));
|
printf("m = %ld; ", splay_list_m(list));
|
||||||
printf("(⌊log2(m)⌋) = %d\n", floor_log2(splay_list_m(list)));
|
printf("(⌊log2(m)⌋) = %d\n", floor_log2(splay_list_m(list)));
|
||||||
|
|
||||||
if (!(rc = api_skip_contains_ex(list, 5)))
|
if (!(rc = api_skip_contains_ex(list, 5)))
|
||||||
perror("missing element 5");
|
perror("missing element 5");
|
||||||
CHECK;
|
|
||||||
#ifdef DOT
|
#ifdef DOT
|
||||||
sprintf(msg, "contains(5)");
|
sprintf(msg, "contains(5)");
|
||||||
api_skip_dot_ex(of, list, gen++, msg, sprintf_ex_node);
|
api_skip_dot_ex(of, list, gen++, msg, sprintf_ex_node);
|
||||||
|
|
1849
include/sl.h
1849
include/sl.h
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue