repo.or.cz
/
luagraph.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
added example for red-black tree presented as Lua table (from lua-rbtree.git)
[luagraph.git]
/
examples
/
tree.lua
blob
89d876e3e031a9a7048fab1e9d87016f60540d99
1
return
{
2
sentinel
= {
3
color
=
0
,
4
key
= {
5
param2
=
0
,
6
param3
=
0
,
7
param1
=
0
8
}
9
},
10
root
= {
11
left
= {
12
left
= {
13
left
= {
14
color
=
0
,
15
key
= {
16
param2
=
0
,
17
param3
=
0
,
18
param1
=
0
19
}
20
},
21
color
=
0
,
22
right
= {
23
left
= {
24
color
=
0
,
25
key
= {
26
param2
=
0
,
27
param3
=
0
,
28
param1
=
0
29
}
30
},
31
color
=
1
,
32
right
= {
33
color
=
0
,
34
key
= {
35
param2
=
0
,
36
param3
=
0
,
37
param1
=
0
38
}
39
},
40
key
= {
41
param1
=
0
,
42
param3
=
0
,
43
param2
=
447264220
44
}
45
},
46
key
= {
47
param1
=
0
,
48
param3
=
0
,
49
param2
=
162413155
50
}
51
},
52
color
=
1
,
53
right
= {
54
left
= {
55
left
= {
56
color
=
0
,
57
key
= {
58
param2
=
0
,
59
param3
=
0
,
60
param1
=
0
61
}
62
},
63
color
=
1
,
64
right
= {
65
color
=
0
,
66
key
= {
67
param2
=
0
,
68
param3
=
0
,
69
param1
=
0
70
}
71
},
72
key
= {
73
param1
=
0
,
74
param3
=
0
,
75
param2
=
527218706
76
}
77
},
78
color
=
0
,
79
right
= {
80
color
=
0
,
81
key
= {
82
param2
=
0
,
83
param3
=
0
,
84
param1
=
0
85
}
86
},
87
key
= {
88
param1
=
0
,
89
param3
=
0
,
90
param2
=
976981039
91
}
92
},
93
key
= {
94
param1
=
0
,
95
param3
=
0
,
96
param2
=
460374318
97
}
98
},
99
color
=
0
,
100
p
= {
101
color
=
0
,
102
key
= {
103
param2
=
0
,
104
param3
=
0
,
105
param1
=
0
106
}
107
},
108
right
= {
109
left
= {
110
left
= {
111
left
= {
112
color
=
0
,
113
key
= {
114
param2
=
0
,
115
param3
=
0
,
116
param1
=
0
117
}
118
},
119
color
=
1
,
120
right
= {
121
color
=
0
,
122
key
= {
123
param2
=
0
,
124
param3
=
0
,
125
param1
=
0
126
}
127
},
128
key
= {
129
param1
=
0
,
130
param3
=
0
,
131
param2
=
2275066130
132
}
133
},
134
color
=
0
,
135
right
= {
136
color
=
0
,
137
key
= {
138
param2
=
0
,
139
param3
=
0
,
140
param1
=
0
141
}
142
},
143
key
= {
144
param1
=
0
,
145
param3
=
0
,
146
param2
=
3237629334
147
}
148
},
149
color
=
1
,
150
right
= {
151
left
= {
152
color
=
0
,
153
key
= {
154
param2
=
0
,
155
param3
=
0
,
156
param1
=
0
157
}
158
},
159
color
=
0
,
160
right
= {
161
color
=
0
,
162
key
= {
163
param2
=
0
,
164
param3
=
0
,
165
param1
=
0
166
}
167
},
168
key
= {
169
param1
=
0
,
170
param3
=
0
,
171
param2
=
3618226464
172
}
173
},
174
key
= {
175
param1
=
0
,
176
param3
=
0
,
177
param2
=
3385231997
178
}
179
},
180
key
= {
181
param1
=
0
,
182
param3
=
0
,
183
param2
=
1895602466
184
}
185
}
186
}