Subversion Repositories HelenOS

Rev

Rev 2421 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2421 Rev 2431
Line 29... Line 29...
29
#include <test.h>
29
#include <test.h>
30
#include <print.h>
30
#include <print.h>
31
#include <adt/avl.h>
31
#include <adt/avl.h>
32
#include <debug.h>
32
#include <debug.h>
33
 
33
 
34
#include <panic.h>
-
 
35
 
-
 
36
 
34
 
37
#define NODE_COUNT 100
35
#define NODE_COUNT 100
38
 
36
 
39
/*
37
/*
40
 * wrapper structure with a pointer to avl tree root
38
 * wrapper structure with a pointer to avl tree root
Line 160... Line 158...
160
    avltree_nodes[11].key = 70;
158
    avltree_nodes[11].key = 70;
161
    avltree_nodes[12].key = 80;
159
    avltree_nodes[12].key = 80;
162
    //RL rotation
160
    //RL rotation
163
    avltree_nodes[13].key = 90;
161
    avltree_nodes[13].key = 90;
164
    avltree_nodes[14].key = 85;
162
    avltree_nodes[14].key = 85;
-
 
163
    //Insert 0 key
165
    avltree_nodes[15].key = 100;
164
    avltree_nodes[15].key = 0;
166
    avltree_nodes[16].key = 200;
165
    avltree_nodes[16].key = 0;
-
 
166
    //Insert reverse
167
    avltree_nodes[17].key = 300;
167
    avltree_nodes[17].key = 600;
168
    avltree_nodes[18].key = 400;
168
    avltree_nodes[18].key = 500;
169
    avltree_nodes[19].key = 500;
169
    avltree_nodes[19].key = 400;
170
    avltree_nodes[20].key = 600;
170
    avltree_nodes[20].key = 300;
171
 
171
 
172
    for (i = 21; i < NODE_COUNT; i++)
172
    for (i = 21; i < NODE_COUNT; i++)
173
        avltree_nodes[i].key = i * 3;
173
        avltree_nodes[i].key = i * 3;
174
   
174
   
175
    avltree_nodes[i].par = NULL;
175
    avltree_nodes[i].par = NULL;