btree.doc | os4-btree.doc |
⋮ | ⋮ |
1 | TABLE·OF·CONTENTS | 1 | TABLE·OF·CONTENTS |
2 | | 2 | |
3 | btree.library/--background-- | 3 | btree.library/--background-- |
4 | btree.library/CreateTree | 4 | btree.library/CreateTree |
5 | btree.library/DeleteTree | 5 | btree.library/DeleteTree |
6 | btree.library/DeleteTreeNode | 6 | btree.library/DeleteTreeNode |
7 | btree.library/EnumTreeNodes | 7 | btree.library/EnumTreeNodes |
8 | btree.library/FindTreeNodeByData | 8 | btree.library/FindTreeNodeByData |
9 | btree.library/FindTreeNodeByKey | 9 | btree.library/FindTreeNodeByKey |
10 | btree.library/FlushTree | 10 | btree.library/FlushTree |
11 | btree.library/ForTreeNodes | 11 | btree.library/ForTreeNodes |
12 | btree.library/GetTreeHeight | 12 | btree.library/GetTreeHeight |
13 | btree.library/GetTreeNodeData | 13 | btree.library/GetTreeNodeData |
14 | btree.library/GetTreeNodeKey | 14 | btree.library/GetTreeNodeKey |
15 | btree.library/GetTreeSize | 15 | btree.library/GetTreeSize |
16 | btree.library/InsertTreeNode | 16 | btree.library/InsertTreeNode |
17 | btree.library/MaxTreeNode | 17 | btree.library/MaxTreeNode |
18 | btree.library/MinTreeNode | 18 | btree.library/MinTreeNode |
19 | btree.library/PredTreeNode | 19 | btree.library/PredTreeNode |
20 | btree.library/SetTreeNodeData | 20 | btree.library/SetTreeNodeData |
21 | btree.library/SuccTreeNode | 21 | btree.library/SuccTreeNode |
22 | btree.library/--background-- | 22 | btree.library/--background--·····················btree.library/--background-- |
23 | | 23 | |
24 | ···PURPOSE | 24 | ···PURPOSE |
25 | ····The·btree.library·provides·transparent·binary·tree·datatype | 25 | ····The·btree.library·provides·transparent·binary·tree·datatype |
26 | ····handling·to·applications. | 26 | ····handling·to·applications. |
27 | | 27 | |
28 | ···OVERVIEW | 28 | ···OVERVIEW |
29 | ····Binary·trees·are·method·to·keep·nodes·sorted·in·a·way·that·it·is | 29 | ····Binary·trees·are·method·to·keep·nodes·sorted·in·a·way·that·it·is |
30 | ····very·fast·to·add·nodes·and·search·for·specific·node. | 30 | ····very·fast·to·add·nodes·and·search·for·specific·node. |
31 | | 31 | |
32 | ····btree.library·provides·generic·binary·tree·API,·without·limiting | 32 | ····btree.library·provides·generic·binary·tree·API,·without·limiting |
33 | ····the·actual·internal·implementation.·The·caller·may·ask·for·"default" | 33 | ····the·actual·internal·implementation.·The·caller·may·ask·for·"default" |
34 | ····or·specific·tree·type·when·creating·the·tree. | 34 | ····or·specific·tree·type·when·creating·the·tree. |
35 | | 35 | |
36 | ···IMPLEMENTATION | 36 | ···IMPLEMENTATION |
37 | ····Current·btree.library·implements·AVL·and·Red-Black·balanced | 37 | ····Current·btree.library·implements·AVL·and·Red-Black·balanced |
38 | ····binary·tree·routines.·The·speed·is·in·O(lg·n)·category. | 38 | ····binary·tree·routines.·The·speed·is·in·O(lg·n)·category. |
39 | | 39 | |
40 | ····All·functions·and·callbacks·are·sysv·(PPC)·routines. | 40 | ····All·functions·and·callbacks·are·sysv·(PPC)·routines. |
41 | | 41 | |
42 | btree.library/CreateTree | 42 | btree.library/CreateTree·····························btree.library/CreateTree |
43 | | 43 | |
44 | ···NAME | 44 | ···NAME |
45 | ····CreateTree·--·allocate·and·initialize·a·binary·tree | 45 | ····CreateTree·--·allocate·and·initialize·a·binary·tree |
46 | | 46 | |
47 | ···SYNOPSIS | 47 | ···SYNOPSIS |
48 | ····Tree·=·CreateTree(Type,·argArray) | 48 | ····Tree·=·CreateTree(Type,·argArray) |
49 | ····(sysv) | 49 | ····(sysv) |
50 | | 50 | |
51 | ····APTR·CreateTree(ULONG,·const·struct·BTArgArray·*); | 51 | ····APTR·CreateTree(ULONG,·const·struct·BTArgArray·*); |
52 | | 52 | |
53 | ···FUNCTION | 53 | ···FUNCTION |
54 | ····Create·a·binary·tree.·This·function·must·be·called·before·other | 54 | ····Create·a·binary·tree.·This·function·must·be·called·before·other |
55 | ····functions,·and·the·returned·Tree·must·be·passed·to·the·other | 55 | ····functions,·and·the·returned·Tree·must·be·passed·to·the·other |
56 | ····functions. | 56 | ····functions. |
57 | | 57 | |
58 | ···INPUTS | 58 | ···INPUTS |
59 | ····Type·····-·Type·of·the·binary·tree·to·create.·One·of: | 59 | ····Type·····-·Type·of·the·binary·tree·to·create.·One·of: |
60 | | 60 | |
61 | ···············BT_DEFAULT | 61 | ···············BT_DEFAULT |
62 | ·················The·best·overall·generic·tree·algorithm.·This | 62 | ·················The·best·overall·generic·tree·algorithm.·This |
63 | ·················should·be·used·most·of·the·time. | 63 | ·················should·be·used·most·of·the·time. |
64 | | 64 | |
65 | ···············BT_AVL_TREE | 65 | ···············BT_AVL_TREE |
66 | ·················AVL·balanced·binary·tree.·The·average·and | 66 | ·················AVL·balanced·binary·tree.·The·average·and |
67 | ·················worst-case·insert/search·time·is·O(lg·n). | 67 | ·················worst-case·insert/search·time·is·O(lg·n). |
68 | | 68 | |
69 | ···············BT_RED_BLACK_TREE | 69 | ···············BT_RED_BLACK_TREE |
70 | ·················Red-Black·balanced·binary·tree.·The·average·and | 70 | ·················Red-Black·balanced·binary·tree.·The·average·and |
71 | ·················worst-case·insert/search·time·is·O(lg·n).·Insert | 71 | ·················worst-case·insert/search·time·is·O(lg·n).·Insert |
72 | ·················is·slightly·faster·than·AVL·tree,·but·searching | 72 | ·················is·slightly·faster·than·AVL·tree,·but·searching |
73 | ·················is·slower. | 73 | ·················is·slower. |
74 | | 74 | |
75 | ····argArray·-·struct·BTArgArray·initialized.·The·structure·has | 75 | ····argArray·-·struct·BTArgArray·initialized.·The·structure·has |
76 | ···············following·fields: | 76 | ···············following·fields: |
77 | | 77 | |
78 | ·········Alloc·······-·routine·to·call·to·allocate·memory. | 78 | ·········Alloc·······-·routine·to·call·to·allocate·memory. |
79 | ·········Free········-·routine·to·call·to·free·memory·allocated·by·Alloc. | 79 | ·········Free········-·routine·to·call·to·free·memory·allocated·by·Alloc. |
80 | ·········Compare·····-·node·compare·routine,·like·qsort. | 80 | ·········Compare·····-·node·compare·routine,·like·qsort. |
81 | ·········DestroyKey··-·routine·to·call·to·destroy·node's·Key.·Optional. | 81 | ·········DestroyKey··-·routine·to·call·to·destroy·node's·Key.·Optional. |
82 | ·········DestroyData·-·routine·to·call·to·destroy·node's·Data.·Optional. | 82 | ·········DestroyData·-·routine·to·call·to·destroy·node's·Data.·Optional. |
83 | ·········UserData····-·userdata·passed·to·functions·above.·Optional. | 83 | ·········UserData····-·userdata·passed·to·functions·above.·Optional. |
84 | | 84 | |
85 | ···RESULT | 85 | ···RESULT |
86 | ····Tree·-·a·pointer·to·the·newly·created·empty·Tree·or·NULL. | 86 | ····Tree·-·a·pointer·to·the·newly·created·empty·Tree·or·NULL. |
87 | | 87 | |
88 | ···EXAMPLES | 88 | ···EXAMPLES |
89 | | 89 | |
90 | ····APTR·MyPool;·/*·Assumed·initialized·*/ | 90 | ····APTR·MyPool;·//·Assumed·initialized |
91 | ····APTR·MyTree; | 91 | ····APTR·MyTree; |
92 | | 92 | |
93 | ····APTR·MyAlloc(APTR·userdata,·ULONG·size) | 93 | ····APTR·MyAlloc(APTR·userdata,·ULONG·size) |
94 | ····{ | 94 | ····{ |
95 | ········return·AllocPooled(MyPool,·size); | 95 | ········return·AllocPooled(MyPool,·size); |
96 | ····} | 96 | ····} |
97 | | 97 | |
98 | ····void·MyFree(APTR·userdata,·APTR·ptr,·ULONG·size) | 98 | ····void·MyFree(APTR·userdata,·APTR·ptr,·ULONG·size) |
99 | ····{ | 99 | ····{ |
100 | ········FreePooled(MyPool,·ptr,·size); | 100 | ········FreePooled(MyPool,·ptr,·size); |
101 | ····} | 101 | ····} |
102 | | 102 | |
103 | ····LONG·MyCompare(APTR·userdata,·const·APTR·keya,·const·APTR·keyb) | 103 | ····LONG·MyCompare(APTR·userdata,·const·APTR·keya,·const·APTR·keyb) |
104 | ····{ | 104 | ····{ |
105 | ········if·(*(LONG*)·keya·>·*(LONG·*)·keyb)·return·1; | 105 | ········if·(*(LONG*)·keya·>·*(LONG·*)·keyb)·return·1; |
106 | ········else·if·(*(LONG*)·keya·<·*(LONG*)·keyb)·return·-1; | 106 | ········else·if·(*(LONG*)·keya·<·*(LONG*)·keyb)·return·-1; |
107 | ········return·0; | 107 | ········return·0; |
108 | ····} | 108 | ····} |
109 | | 109 | |
110 | ····void·MyDestroyKey(APTR·userdata,·APTR·key) | 110 | ····void·MyDestroyKey(APTR·userdata,·APTR·key) |
111 | ····{ | 111 | ····{ |
112 | ····} | 112 | ····} |
113 | | 113 | |
114 | ····void·MyDestroyData(APTR·userdata,·APTR·data) | 114 | ····void·MyDestroyData(APTR·userdata,·APTR·data) |
115 | ····{ | 115 | ····{ |
116 | ····} | 116 | ····} |
117 | | 117 | |
118 | ····/*·...·*/ | 118 | ····[·...·] |
119 | | 119 | |
120 | ····const·struct·BTArgArray·array·= | 120 | ····const·struct·BTArgArray·array·= |
121 | ····{ | 121 | ····{ |
122 | ········MyAlloc, | 122 | ········MyAlloc, |
123 | ········MyFree, | 123 | ········MyFree, |
124 | ········MyCompare, | 124 | ········MyCompare, |
125 | ········MyDestroyKey, | 125 | ········MyDestroyKey, |
126 | ········MyDestroyData, | 126 | ········MyDestroyData, |
127 | ········NULL | 127 | ········NULL |
128 | ····}; | 128 | ····}; |
129 | | 129 | |
130 | ····MyTree·=·CreateTree(BT_DEFAULT,·&array); | 130 | ····MyTree·=·CreateTree(BT_DEFAULT,·&array); |
131 | ····if·(MyTree) | 131 | ····if·(MyTree) |
132 | ····{ | 132 | ····{ |
133 | ········/*·...·*/ | 133 | ········[·...·] |
134 | | 134 | |
135 | ········DeleteTree(MyTree); | 135 | ········DeleteTree(MyTree); |
136 | ····} | 136 | ····} |
137 | | 137 | |
138 | ···NOTE | 138 | ···NOTE |
139 | ····The·argArray·is·copied·into·the·created·Tree,·so·it·doesn't·need | 139 | ····The·argArray·is·copied·into·the·created·Tree,·so·it·doesn't·need |
140 | ····to·stay·available·while·the·Tree·is·in·use. | 140 | ····to·stay·available·while·the·Tree·is·in·use. |
141 | | 141 | |
142 | ···BUGS | |
143 | ····DestroyKey·and·DestroyData·can't·be·NULL·prior·btree.library·50.5. | |
144 | | |
145 | ···SEE·ALSO | 142 | ···SEE·ALSO |
146 | ····DeleteTree,·libraries/btree.h | 143 | ····DeleteTree,·libraries/btree.h |
147 | | 144 | |
148 | btree.library/DeleteTree | 145 | btree.library/DeleteTree·····························btree.library/DeleteTree |
149 | | 146 | |
150 | ···NAME | 147 | ···NAME |
151 | ····DeleteTree·--·delete·a·binary·tree | 148 | ····DeleteTree·--·delete·a·binary·tree |
152 | | 149 | |
153 | ···SYNOPSIS | 150 | ···SYNOPSIS |
154 | ····DeleteTree(Tree) | 151 | ····DeleteTree(Tree) |
155 | ····(sysv) | 152 | ····(sysv) |
156 | | 153 | |
157 | ····void·DeleteTree(APTR); | 154 | ····void·DeleteTree(APTR); |
158 | | 155 | |
159 | ···FUNCTION | 156 | ···FUNCTION |
160 | ····Deallocate·a·binary·tree,·deallocating·all·the·nodes. | 157 | ····Deallocate·a·binary·tree,·deallocating·all·the·nodes. |
161 | | 158 | |
162 | ···INPUTS | 159 | ···INPUTS |
163 | ····Tree·-·tree·to·delete. | 160 | ····Tree·-·tree·to·delete. |
164 | | 161 | |
165 | ···RESULT | 162 | ···RESULT |
166 | | 163 | |
167 | ···NOTE | 164 | ···NOTE |
168 | ····argArray·DestroyKey·and·DestroyData·callbacks·are·called·for | 165 | ····argArray·DestroyKey·and·DestroyData·callbacks·are·called·for |
169 | ····the·deleted·nodes. | 166 | ····the·deleted·nodes. |
170 | | 167 | |
171 | ···SEE·ALSO | 168 | ···SEE·ALSO |
172 | ····CreateTree,·libraries/btree.h | 169 | ····CreateTree,·libraries/btree.h |
173 | | 170 | |
174 | btree.library/DeleteTreeNode | 171 | btree.library/DeleteTreeNode·····················btree.library/DeleteTreeNode |
175 | | 172 | |
176 | ···NAME | 173 | ···NAME |
177 | ····DeleteTreeNode·--·delete·node·from·binary·tree | 174 | ····DeleteTreeNode·--·delete·node·from·binary·tree |
178 | | 175 | |
179 | ···SYNOPSIS | 176 | ···SYNOPSIS |
180 | ····DeleteTreeNode(Tree,·Node) | 177 | ····DeleteTreeNode(Tree,·Node) |
181 | ····(sysv) | 178 | ····(sysv) |
182 | | 179 | |
183 | ····void·DeleteTreeNode(APTR,·APTR); | 180 | ····void·DeleteTreeNode(APTR,·APTR); |
184 | | 181 | |
185 | ···FUNCTION | 182 | ···FUNCTION |
186 | ····Remove·and·free·a·node·from·the·binary·tree. | 183 | ····Remove·and·free·a·node·from·the·binary·tree. |
187 | | 184 | |
188 | ···INPUTS | 185 | ···INPUTS |
189 | ····Tree·-·tree·to·remove·the·node·from. | 186 | ····Tree·-·tree·to·remove·the·node·from. |
190 | | 187 | |
191 | ····Node·-·pointer·to·node·to·remove. | 188 | ····Node·-·pointer·to·node·to·remove. |
192 | | 189 | |
193 | ···RESULT | 190 | ···RESULT |
194 | | 191 | |
195 | ···NOTE | 192 | ···NOTE |
196 | ····argArray·DestroyKey·and·DestroyData·callbacks·are·called·for | 193 | ····argArray·DestroyKey·and·DestroyData·callbacks·are·called·for |
197 | ····the·deleted·node. | 194 | ····the·deleted·node. |
198 | | 195 | |
199 | ···SEE·ALSO | 196 | ···SEE·ALSO |
200 | ····InsertTreeNode,·libraries/btree.h | 197 | ····InsertTreeNode,·libraries/btree.h |
201 | | 198 | |
202 | btree.library/EnumTreeNodes | 199 | btree.library/EnumTreeNodes·······················btree.library/EnumTreeNodes |
203 | | 200 | |
204 | ···NAME | 201 | ···NAME |
205 | ····EnumTreeNodes·--·call·a·function·for·nodes·between·lowKey·and·highKey | 202 | ····EnumTreeNodes·--·call·a·function·for·nodes·between·lowKey·and·highKey |
206 | | 203 | |
207 | ···SYNOPSIS | 204 | ···SYNOPSIS |
208 | ····NumNodes·=·EnumTreeNodes(Tree,·lowKey,·highKey,·nodeFunc,·userData) | 205 | ····NumNodes·=·EnumTreeNodes(Tree,·lowKey,·highKey,·nodeFunc,·userData) |
209 | ····(sysv) | 206 | ····(sysv) |
210 | | 207 | |
211 | ····ULONG·EnumTreeNodes(const·APTR,·const·APTR,·const·APTR, | 208 | ····ULONG·EnumTreeNodes(const·APTR,·const·APTR,·const·APTR, |
212 | ························LONG·(*)(APTR,·const·APTR),·const·APTR); | 209 | ························LONG·(*)(APTR,·const·APTR),·const·APTR); |
213 | | 210 | |
214 | ···FUNCTION | 211 | ···FUNCTION |
215 | ····Call·nodeFunc·for·all·nodes·between·keys·lowKey·and·highKey·or·until | 212 | ····Call·nodeFunc·for·all·nodes·between·keys·lowKey·and·highKey·or·until |
216 | ····nodeFunc·return·FALSE. | 213 | ····nodeFunc·return·FALSE. |
217 | | 214 | |
218 | ···INPUTS | 215 | ···INPUTS |
219 | ····Tree·-·tree·to·call·nodeFunc·for. | 216 | ····Tree·-·tree·to·call·nodeFunc·for. |
220 | | 217 | |
221 | ····nodeFunc·-·function·to·call·for·matching·nodes. | 218 | ····nodeFunc·-·function·to·call·for·matching·nodes. |
222 | ···············nodeFunc·is·called·as: | 219 | ···············nodeFunc·is·called·as: |
223 | ···············LONG·nodeFunc(APTR·userData,·const·APTR·Node); | 220 | ···············LONG·nodeFunc(APTR·userData,·const·APTR·Node); |
224 | ···············If·nodeFunc·return·FALSE,·no·further·nodes | 221 | ···············If·nodeFunc·returns·FALSE,·no·further·nodes |
225 | ···············are·enumerated. | 222 | ···············are·enumerated. |
226 | | 223 | |
227 | ····userData·-·data·pointer·passed·to·nodeFunc. | 224 | ····userData·-·data·pointer·passed·to·nodeFunc. |
228 | | 225 | |
229 | ···RESULT | 226 | ···RESULT |
230 | ····NumNodes·-·number·of·nodes·the·nodeFunc·got·called·for. | 227 | ····NumNodes·-·number·of·nodes·the·nodeFunc·got·called·for. |
231 | | 228 | |
232 | ···NOTE | 229 | ···NOTE |
233 | ····The·nodes·are·called·in·ascending·order. | 230 | ····The·nodes·are·called·in·ascending·order. |
234 | | 231 | |
235 | ···SEE·ALSO | 232 | ···SEE·ALSO |
236 | ····ForTreeNodes,·libraries/btree.h | 233 | ····ForTreeNodes,·libraries/btree.h |
237 | | 234 | |
238 | btree.library/FindTreeNodeByData | 235 | btree.library/FindTreeNodeByData·············btree.library/FindTreeNodeByData |
239 | | 236 | |
240 | ···NAME | 237 | ···NAME |
241 | ····FindTreeNodeByData·--·find·a·node·by·data. | 238 | ····FindTreeNodeByData·--·find·a·node·by·data. |
242 | | 239 | |
243 | ···SYNOPSIS | 240 | ···SYNOPSIS |
244 | ····Node·=·FindTreeNodeByData(Tree,·Data) | 241 | ····Node·=·FindTreeNodeByData(Tree,·Data) |
245 | ····(sysv) | 242 | ····(sysv) |
246 | | 243 | |
247 | ····APTR·FindTreeNodeByData(const·APTR,·const·APTR); | 244 | ····APTR·FindTreeNodeByData(const·APTR,·const·APTR); |
248 | | 245 | |
249 | ···FUNCTION | 246 | ···FUNCTION |
250 | ····Return·pointer·to·the·node·with·the·given·data.·This·routine·is | 247 | ····Return·pointer·to·the·node·with·the·given·data.·This·routine·is |
251 | ····very·slow,·typically·O(n^2).·Don't·call·this·function·without | 248 | ····very·slow,·typically·O(n^2).·Don't·call·this·function·without |
252 | ····a·good·justification. | 249 | ····a·good·justification. |
253 | | 250 | |
254 | ···INPUTS | 251 | ···INPUTS |
255 | ····Tree·-·tree·to·search·a·node·from. | 252 | ····Tree·-·tree·to·search·a·node·from. |
256 | | 253 | |
257 | ····Data·-·data·of·the·node·to·find. | 254 | ····Data·-·data·of·the·node·to·find. |
258 | | 255 | |
259 | ···RESULT | 256 | ···RESULT |
260 | ····Node·-·the·node·with·the·data,·or·NULL·if·no·node·with·such·data | 257 | ····Node·-·the·node·with·the·data,·or·NULL·if·no·node·with·such·data |
261 | ···········was·found. | 258 | ···········was·found. |
262 | | 259 | |
263 | ···NOTE | 260 | ···NOTE |
264 | ····If·multiple·nodes·have·the·same·data·there·is·no·guarantee·which | 261 | ····If·multiple·nodes·have·the·same·data·there·is·no·guarantee·which |
265 | ····of·these·nodes·is·actually·returned. | 262 | ····of·these·nodes·is·actually·returned. |
266 | | 263 | |
267 | ···SEE·ALSO | 264 | ···SEE·ALSO |
268 | ····FindTreeNodeByKey,·libraries/btree.h | 265 | ····FindTreeNodeByKey,·libraries/btree.h |
269 | | 266 | |
270 | btree.library/FindTreeNodeByKey | 267 | btree.library/FindTreeNodeByKey···············btree.library/FindTreeNodeByKey |
271 | | 268 | |
272 | ···NAME | 269 | ···NAME |
273 | ····FindTreeNodeByKey·--·find·a·node·by·key. | 270 | ····FindTreeNodeByKey·--·find·a·node·by·key. |
274 | | 271 | |
275 | ···SYNOPSIS | 272 | ···SYNOPSIS |
276 | ····Node·=·FindTreeNodeByKey(Tree,·Key) | 273 | ····Node·=·FindTreeNodeByKey(Tree,·Key) |
277 | ····(sysv) | 274 | ····(sysv) |
278 | | 275 | |
279 | ····APTR·FindTreeNodeByKey(const·APTR,·const·APTR); | 276 | ····APTR·FindTreeNodeByKey(const·APTR,·const·APTR); |
280 | | 277 | |
281 | ···FUNCTION | 278 | ···FUNCTION |
282 | ····Return·pointer·to·the·node·with·the·given·key.·This·routine·is | 279 | ····Return·pointer·to·the·node·with·the·given·key.·This·routine·is |
283 | ····very·fast,·typically·O(lg·n). | 280 | ····very·fast,·typically·O(lg·n). |
284 | | 281 | |
285 | ···INPUTS | 282 | ···INPUTS |
286 | ····Tree·-·tree·to·search·a·node·from. | 283 | ····Tree·-·tree·to·search·a·node·from. |
287 | | 284 | |
288 | ····Key·-·key·of·the·node·to·find. | 285 | ····Key·-·key·of·the·node·to·find. |
289 | | 286 | |
290 | ···RESULT | 287 | ···RESULT |
291 | ····Node·-·the·node·with·the·key,·or·NULL·if·no·node·with·such·key | 288 | ····Node·-·the·node·with·the·key,·or·NULL·if·no·node·with·such·key |
292 | ···········was·found. | 289 | ···········was·found. |
293 | | 290 | |
294 | ···NOTE | 291 | ···NOTE |
295 | ····If·multiple·nodes·have·the·same·key·there·is·no·guarantee·which | 292 | ····If·multiple·nodes·have·the·same·key·there·is·no·guarantee·which |
296 | ····of·these·nodes·is·actually·returned. | 293 | ····of·these·nodes·is·actually·returned. |
297 | | 294 | |
298 | ···SEE·ALSO | 295 | ···SEE·ALSO |
299 | ····FindTreeNodeByData,·libraries/btree.h | 296 | ····FindTreeNodeByData,·libraries/btree.h |
300 | | 297 | |
301 | btree.library/FlushTree | 298 | btree.library/FlushTree·······························btree.library/FlushTree |
302 | | 299 | |
303 | ···NAME | 300 | ···NAME |
304 | ····FlushTree·--·delete·all·nodes·in·a·binary·tree | 301 | ····FlushTree·--·delete·all·nodes·in·a·binary·tree |
305 | | 302 | |
306 | ···SYNOPSIS | 303 | ···SYNOPSIS |
307 | ····FlushTree(Tree) | 304 | ····FlushTree(Tree) |
308 | ····(sysv) | 305 | ····(sysv) |
309 | | 306 | |
310 | ····void·FlushTree(APTR); | 307 | ····void·FlushTree(APTR); |
311 | | 308 | |
312 | ···FUNCTION | 309 | ···FUNCTION |
313 | ····Deallocate·all·nodes·in·a·binary·tree.·The·tree·is·in·the | 310 | ····Deallocate·all·nodes·in·a·binary·tree.·The·tree·is·in·the |
314 | ····empty·state·like·after·CreateTree. | 311 | ····empty·state·like·after·CreateTree. |
315 | | 312 | |
316 | ···INPUTS | 313 | ···INPUTS |
317 | ····Tree·-·tree·to·delete·nodes·from. | 314 | ····Tree·-·tree·to·delete·nodes·from. |
318 | | 315 | |
319 | ···RESULT | 316 | ···RESULT |
320 | | 317 | |
321 | ···NOTE | 318 | ···NOTE |
322 | ····argArray·DestroyKey·and·DestroyData·callbacks·are·called·for | 319 | ····argArray·DestroyKey·and·DestroyData·callbacks·are·called·for |
323 | ····the·deleted·nodes. | 320 | ····the·deleted·nodes. |
324 | | 321 | |
325 | ···BUGS | |
326 | ····BT_RED_BLACK_TREE·FlushTree·was·broken·before·V50.7. | |
327 | | |
328 | ···SEE·ALSO | 322 | ···SEE·ALSO |
329 | ····DeleteTree,·libraries/btree.h | 323 | ····DeleteTree,·libraries/btree.h |
330 | | 324 | |
331 | btree.library/ForTreeNodes | 325 | btree.library/ForTreeNodes·························btree.library/ForTreeNodes |
332 | | 326 | |
333 | ···NAME | 327 | ···NAME |
334 | ····ForTreeNodes·--·call·a·function·for·all·nodes·in·a·tree. | 328 | ····ForTreeNodes·--·call·a·function·for·all·nodes·in·a·tree. |
335 | | 329 | |
336 | ···SYNOPSIS | 330 | ···SYNOPSIS |
337 | ····NumNodes·=·ForTreeNodes(Tree,·nodeFunc,·userData) | 331 | ····NumNodes·=·ForTreeNodes(Tree,·nodeFunc,·userData) |
338 | ····(sysv) | 332 | ····(sysv) |
339 | | 333 | |
340 | ····ULONG·ForTreeNodes(const·APTR,·void·(*)(APTR,·const·APTR),·APTR); | 334 | ····ULONG·ForTreeNodes(const·APTR,·void·(*)(APTR,·const·APTR),·APTR); |
341 | | 335 | |
342 | ···FUNCTION | 336 | ···FUNCTION |
343 | ····Call·nodeFunc·for·all·nodes·in·the·tree. | 337 | ····Call·nodeFunc·for·all·nodes·in·the·tree. |
344 | | 338 | |
345 | ···INPUTS | 339 | ···INPUTS |
346 | ····Tree·-·tree·to·call·nodeFunc·for. | 340 | ····Tree·-·tree·to·call·nodeFunc·for. |
347 | | 341 | |
348 | ····nodeFunc·-·function·to·call·for·each·node. | 342 | ····nodeFunc·-·function·to·call·for·each·node. |
349 | ···············nodeFunc·is·called·as: | 343 | ···············nodeFunc·is·called·as: |
350 | ···············void·nodeFunc(APTR·userData,·const·APTR·Node); | 344 | ···············void·nodeFunc(APTR·userData,·const·APTR·Node); |
351 | | 345 | |
352 | ····userData·-·data·pointer·passed·to·nodeFunc. | 346 | ····userData·-·data·pointer·passed·to·nodeFunc. |
353 | | 347 | |
354 | ···RESULT | 348 | ···RESULT |
355 | ····NumNodes·-·number·of·nodes·the·nodeFunc·got·called·for. | 349 | ····NumNodes·-·number·of·nodes·the·nodeFunc·got·called·for. |
356 | | 350 | |
357 | ···NOTE | 351 | ···NOTE |
358 | ····The·nodes·are·not·called·in·any·partifular·order,·typically | 352 | ····The·nodes·are·not·called·in·any·partifular·order,·typically |
359 | ····in·the·fastest·possible·order·for·the·internal·implementation. | 353 | ····in·the·fastest·possible·order·for·the·internal·implementation. |
360 | | 354 | |
361 | ···SEE·ALSO | 355 | ···SEE·ALSO |
362 | ····EnumTreeNodes,·libraries/btree.h | 356 | ····EnumTreeNodes,·libraries/btree.h |
363 | | 357 | |
364 | btree.library/GetTreeHeight | 358 | btree.library/GetTreeHeight·······················btree.library/GetTreeHeight |
365 | | 359 | |
366 | ···NAME | 360 | ···NAME |
367 | ····GetTreeHeight·--·get·height·of·the·tree | 361 | ····GetTreeHeight·--·get·height·of·the·tree |
368 | | 362 | |
369 | ···SYNOPSIS | 363 | ···SYNOPSIS |
370 | ····Height·=·GetTreeHeight(Tree) | 364 | ····Height·=·GetTreeHeight(Tree) |
371 | ····(sysv) | 365 | ····(sysv) |
372 | | 366 | |
373 | ····ULONG·GetTreeHeight(const·APTR); | 367 | ····ULONG·GetTreeHeight(const·APTR); |
374 | | 368 | |
375 | ···FUNCTION | 369 | ···FUNCTION |
376 | ····Return·height·of·the·tree.·For·example·for·a·tree: | 370 | ····Return·height·of·the·tree.·For·example·for·a·tree: |
377 | | 371 | |
378 | ··········a | 372 | ··········a |
379 | ········/···\ | 373 | ········/···\ |
380 | ·······b·····c | 374 | ·······b·····c |
381 | ·····/···\ | 375 | ·····/···\ |
382 | ····d·····e | 376 | ····d·····e |
383 | | 377 | |
384 | ····...this·function·would·return·3. | 378 | ····...this·function·would·return·3. |
385 | | 379 | |
386 | ···INPUTS | 380 | ···INPUTS |
387 | ····Tree·-·tree·to·count·the·height·for. | 381 | ····Tree·-·tree·to·count·the·height·for. |
388 | | 382 | |
389 | ···RESULT | 383 | ···RESULT |
390 | ····Height·-·height·of·the·tree. | 384 | ····Height·-·height·of·the·tree. |
391 | | 385 | |
392 | ···NOTE | 386 | ···NOTE |
393 | | 387 | |
394 | ···SEE·ALSO | 388 | ···SEE·ALSO |
395 | ····GetTreeSize,·libraries/btree.h | 389 | ····GetTreeSize,·libraries/btree.h |
396 | | 390 | |
397 | btree.library/GetTreeNodeData | 391 | btree.library/GetTreeNodeData···················btree.library/GetTreeNodeData |
398 | | 392 | |
399 | ···NAME | 393 | ···NAME |
400 | ····GetTreeNodeData·--·get·data·of·the·node | 394 | ····GetTreeNodeData·--·get·data·of·the·node |
401 | | 395 | |
402 | ···SYNOPSIS | 396 | ···SYNOPSIS |
403 | ····Data·=·GetTreeNodeData(Tree,·Node) | 397 | ····Data·=·GetTreeNodeData(Tree,·Node) |
404 | ····(sysv) | 398 | ····(sysv) |
405 | | 399 | |
406 | ····APTR·GetTreeNodeData(const·APTR,·const·APTR); | 400 | ····APTR·GetTreeNodeData(const·APTR,·const·APTR); |
407 | | 401 | |
408 | ···FUNCTION | 402 | ···FUNCTION |
409 | ····Return·data·of·the·node. | 403 | ····Return·data·of·the·node. |
410 | | 404 | |
411 | ···INPUTS | 405 | ···INPUTS |
412 | ····Tree·-·tree·the·node·belongs·to. | 406 | ····Tree·-·tree·the·node·belongs·to. |
413 | | 407 | |
414 | ····Node·-·node·to·get·data·of. | 408 | ····Node·-·node·to·get·data·of. |
415 | | 409 | |
416 | ···RESULT | 410 | ···RESULT |
417 | ····Data·-·data·of·the·given·node. | 411 | ····Data·-·data·of·the·given·node. |
418 | | 412 | |
419 | ···NOTE | 413 | ···NOTE |
420 | | 414 | |
421 | ···SEE·ALSO | 415 | ···SEE·ALSO |
422 | ····GetTreeNodeKey,·libraries/btree.h | 416 | ····GetTreeNodeKey,·libraries/btree.h |
423 | | 417 | |
424 | btree.library/GetTreeNodeKey | 418 | btree.library/GetTreeNodeKey·····················btree.library/GetTreeNodeKey |
425 | | 419 | |
426 | ···NAME | 420 | ···NAME |
427 | ····GetTreeNodeKey·--·get·key·of·the·node | 421 | ····GetTreeNodeKey·--·get·key·of·the·node |
428 | | 422 | |
429 | ···SYNOPSIS | 423 | ···SYNOPSIS |
430 | ····Key·=·GetTreeNodeKey(Tree,·Node) | 424 | ····Key·=·GetTreeNodeKey(Tree,·Node) |
431 | ····(sysv) | 425 | ····(sysv) |
432 | | 426 | |
433 | ····APTR·GetTreeNodeKey(const·APTR,·const·APTR); | 427 | ····APTR·GetTreeNodeKey(const·APTR,·const·APTR); |
434 | | 428 | |
435 | ···FUNCTION | 429 | ···FUNCTION |
436 | ····Return·key·of·the·node. | 430 | ····Return·key·of·the·node. |
437 | | 431 | |
438 | ···INPUTS | 432 | ···INPUTS |
439 | ····Tree·-·tree·the·node·belongs·to. | 433 | ····Tree·-·tree·the·node·belongs·to. |
440 | | 434 | |
441 | ····Node·-·node·to·get·key·of. | 435 | ····Node·-·node·to·get·key·of. |
442 | | 436 | |
443 | ···RESULT | 437 | ···RESULT |
444 | ····Key·-·key·of·the·given·node. | 438 | ····Key·-·key·of·the·given·node. |
445 | | 439 | |
446 | ···NOTE | 440 | ···NOTE |
447 | | 441 | |
448 | ···SEE·ALSO | 442 | ···SEE·ALSO |
449 | ····GetTreeNodeData,·libraries/btree.h | 443 | ····GetTreeNodeData,·libraries/btree.h |
450 | | 444 | |
451 | btree.library/GetTreeSize | 445 | btree.library/GetTreeSize···························btree.library/GetTreeSize |
452 | | 446 | |
453 | ···NAME | 447 | ···NAME |
454 | ····GetTreeSize·--·get·total·number·of·nodes·in·a·tree | 448 | ····GetTreeSize·--·get·total·number·of·nodes·in·a·tree |
455 | | 449 | |
456 | ···SYNOPSIS | 450 | ···SYNOPSIS |
457 | ····NumNodes·=·GetTreeSize(Tree) | 451 | ····NumNodes·=·GetTreeSize(Tree) |
458 | ····(sysv) | 452 | ····(sysv) |
459 | | 453 | |
460 | ····ULONG·GetTreeSize(const·APTR); | 454 | ····ULONG·GetTreeSize(const·APTR); |
461 | | 455 | |
462 | ···FUNCTION | 456 | ···FUNCTION |
463 | ····Return·total·number·of·nodes·in·the·tree. | 457 | ····Return·total·number·of·nodes·in·the·tree. |
464 | | 458 | |
465 | ···INPUTS | 459 | ···INPUTS |
466 | ····Tree·-·tree·to·count·the·nodes·from. | 460 | ····Tree·-·tree·to·count·the·nodes·from. |
467 | | 461 | |
468 | ···RESULT | 462 | ···RESULT |
469 | ····NumNodes·-·total·number·of·nodes. | 463 | ····NumNodes·-·total·number·of·nodes. |
470 | | 464 | |
471 | ···NOTE | 465 | ···NOTE |
472 | | 466 | |
473 | ···SEE·ALSO | 467 | ···SEE·ALSO |
474 | ····GetTreeHeight,·libraries/btree.h | 468 | ····GetTreeHeight,·libraries/btree.h |
475 | | 469 | |
476 | btree.library/InsertTreeNode | 470 | btree.library/InsertTreeNode·····················btree.library/InsertTreeNode |
477 | | 471 | |
478 | ···NAME | 472 | ···NAME |
479 | ····InsertTreeNode·--·insert·key/data·pair·to·binary·tree | 473 | ····InsertTreeNode·--·insert·key/data·pair·to·binary·tree |
480 | | 474 | |
481 | ···SYNOPSIS | 475 | ···SYNOPSIS |
482 | ····Node·=·InsertTreeNode(Tree,·Key,·Data) | 476 | ····Node·=·InsertTreeNode(Tree,·Key,·Data) |
483 | ····(sysv) | 477 | ····(sysv) |
484 | | 478 | |
485 | ····APTR·InsertTreeNode(APTR,·const·APTR,·const·APTR); | 479 | ····APTR·InsertTreeNode(APTR,·const·APTR,·const·APTR); |
486 | | 480 | |
487 | ···FUNCTION | 481 | ···FUNCTION |
488 | ····Insert·a·node·into·the·binary·tree,·with·key·'Key'·and·data | 482 | ····Insert·a·node·into·the·binary·tree,·with·key·'Key'·and·data |
489 | ····pointer·'Data'.·The·tree·is·sorted·by·'Key'·using·argArray | 483 | ····pointer·'Data'.·The·tree·is·sorted·by·'Key'·using·argArray |
490 | ····Compare. | 484 | ····Compare. |
491 | | 485 | |
492 | ···INPUTS | 486 | ···INPUTS |
493 | ····Tree·-·tree·to·insert·node·to. | 487 | ····Tree·-·tree·to·insert·node·to. |
494 | | 488 | |
495 | ····Key·-·key·of·the·node. | 489 | ····Key·-·key·of·the·node. |
496 | | 490 | |
497 | ····Data·-·data·pointer·related·to·key. | 491 | ····Data·-·data·pointer·related·to·key. |
498 | | 492 | |
499 | ···RESULT | 493 | ···RESULT |
500 | ····Node·-·pointer·to·newly·created·node,·or·NULL. | 494 | ····Node·-·pointer·to·newly·created·node,·or·NULL. |
501 | | 495 | |
502 | ···NOTE | 496 | ···NOTE |
503 | | 497 | |
504 | ···SEE·ALSO | 498 | ···SEE·ALSO |
505 | ····DeleteTreeNode,·libraries/btree.h | 499 | ····DeleteTreeNode,·libraries/btree.h |
506 | | 500 | |
507 | btree.library/MaxTreeNode | 501 | btree.library/MaxTreeNode···························btree.library/MaxTreeNode |
508 | | 502 | |
509 | ···NAME | 503 | ···NAME |
510 | ····MaxTreeNode·--·get·pointer·to·the·node·with·highest·key. | 504 | ····MaxTreeNode·--·get·pointer·to·the·node·with·highest·key. |
511 | | 505 | |
512 | ···SYNOPSIS | 506 | ···SYNOPSIS |
513 | ····MaxNode·=·MaxTreeNode(Tree) | 507 | ····MaxNode·=·MaxTreeNode(Tree) |
514 | ····(sysv) | 508 | ····(sysv) |
515 | | 509 | |
516 | ····APTR·MaxTreeNode(const·APTR); | 510 | ····APTR·MaxTreeNode(const·APTR); |
517 | | 511 | |
518 | ···FUNCTION | 512 | ···FUNCTION |
519 | ····Return·pointer·to·the·node·with·highest·key. | 513 | ····Return·pointer·to·the·node·with·highest·key. |
520 | | 514 | |
521 | ···INPUTS | 515 | ···INPUTS |
522 | ····Tree·-·tree·to·get·the·highest·key·node·of. | 516 | ····Tree·-·tree·to·get·the·highest·key·node·of. |
523 | | 517 | |
524 | ···RESULT | 518 | ···RESULT |
525 | ····MaxNode·-·the·node·with·the·highest·key,·or·NULL·if·empty·tree. | 519 | ····MaxNode·-·the·node·with·the·highest·key,·or·NULL·if·empty·tree. |
526 | | 520 | |
527 | ···NOTE | 521 | ···NOTE |
528 | | 522 | |
529 | ···SEE·ALSO | 523 | ···SEE·ALSO |
530 | ····MinTreeNode,·libraries/btree.h | 524 | ····MinTreeNode,·libraries/btree.h |
531 | | 525 | |
532 | btree.library/MinTreeNode | 526 | btree.library/MinTreeNode···························btree.library/MinTreeNode |
533 | | 527 | |
534 | ···NAME | 528 | ···NAME |
535 | ····MinTreeNode·--·get·pointer·to·the·node·with·lowest·key. | 529 | ····MinTreeNode·--·get·pointer·to·the·node·with·lowest·key. |
536 | | 530 | |
537 | ···SYNOPSIS | 531 | ···SYNOPSIS |
538 | ····MinNode·=·MinTreeNode(Tree) | 532 | ····MinNode·=·MinTreeNode(Tree) |
539 | ····(sysv) | 533 | ····(sysv) |
540 | | 534 | |
541 | ····APTR·MinTreeNode(const·APTR); | 535 | ····APTR·MinTreeNode(const·APTR); |
542 | | 536 | |
543 | ···FUNCTION | 537 | ···FUNCTION |
544 | ····Return·pointer·to·the·node·with·lowest·key. | 538 | ····Return·pointer·to·the·node·with·lowest·key. |
545 | | 539 | |
546 | ···INPUTS | 540 | ···INPUTS |
547 | ····Tree·-·tree·to·get·the·lowest·key·node·of. | 541 | ····Tree·-·tree·to·get·the·lowest·key·node·of. |
548 | | 542 | |
549 | ···RESULT | 543 | ···RESULT |
550 | ····MinNode·-·the·node·with·the·lowest·key,·or·NULL·if·empty·tree. | 544 | ····MinNode·-·the·node·with·the·lowest·key,·or·NULL·if·empty·tree. |
551 | | 545 | |
552 | ···NOTE | 546 | ···NOTE |
553 | | 547 | |
554 | ···SEE·ALSO | 548 | ···SEE·ALSO |
555 | ····MaxTreeNode,·libraries/btree.h | 549 | ····MaxTreeNode,·libraries/btree.h |
556 | | 550 | |
557 | btree.library/PredTreeNode | 551 | btree.library/PredTreeNode·························btree.library/PredTreeNode |
558 | | 552 | |
559 | ···NAME | 553 | ···NAME |
560 | ····PredTreeNode·--·get·pointer·to·previous·node | 554 | ····PredTreeNode·--·get·pointer·to·previous·node |
561 | | 555 | |
562 | ···SYNOPSIS | 556 | ···SYNOPSIS |
563 | ····PredNode·=·PredTreeNode(Tree,·Node) | 557 | ····PredNode·=·PredTreeNode(Tree,·Node) |
564 | ····(sysv) | 558 | ····(sysv) |
565 | | 559 | |
566 | ····APTR·PredTreeNode(const·APTR,·const·APTR); | 560 | ····APTR·PredTreeNode(const·APTR,·const·APTR); |
567 | | 561 | |
568 | ···FUNCTION | 562 | ···FUNCTION |
569 | ····Return·pointer·to·previous·node. | 563 | ····Return·pointer·to·previous·node. |
570 | | 564 | |
571 | ···INPUTS | 565 | ···INPUTS |
572 | ····Tree·-·tree·the·node·belongs·to. | 566 | ····Tree·-·tree·the·node·belongs·to. |
573 | | 567 | |
574 | ····Node·-·node·to·get·predecessor·of. | 568 | ····Node·-·node·to·get·predecessor·of. |
575 | | 569 | |
576 | ···RESULT | 570 | ···RESULT |
577 | ····PredNode·-·previous·node·pointer·or·NULL·if·no·more·nodes. | 571 | ····PredNode·-·previous·node·pointer·or·NULL·if·no·more·nodes. |
578 | | 572 | |
579 | ···NOTE | 573 | ···NOTE |
580 | | 574 | |
581 | ···SEE·ALSO | 575 | ···SEE·ALSO |
582 | ····SuccTreeNode,·libraries/btree.h | 576 | ····SuccTreeNode,·libraries/btree.h |
583 | | 577 | |
584 | btree.library/SetTreeNodeData | 578 | btree.library/SetTreeNodeData···················btree.library/SetTreeNodeData |
585 | | 579 | |
586 | ···NAME | 580 | ···NAME |
587 | ····SetTreeNodeData·--·set·data·of·the·node·(V50.7) | 581 | ····SetTreeNodeData·--·set·data·of·the·node·(V50.7) |
588 | | 582 | |
589 | ···SYNOPSIS | 583 | ···SYNOPSIS |
590 | ····OldData·=·SetTreeNodeData(Tree,·Node,·NewData) | 584 | ····OldData·=·SetTreeNodeData(Tree,·Node,·NewData) |
591 | ····(sysv) | 585 | ····(sysv) |
592 | | 586 | |
593 | ····APTR·GetTreeNodeData(const·APTR,·APTR,·const·APTR); | 587 | ····APTR·GetTreeNodeData(const·APTR,·APTR,·const·APTR); |
594 | | 588 | |
595 | ···FUNCTION | 589 | ···FUNCTION |
596 | ····Set·new·data·for·the·node,·return·old·data. | 590 | ····Set·new·data·for·the·node,·return·old·data. |
597 | | 591 | |
598 | ···INPUTS | 592 | ···INPUTS |
599 | ····Tree·-·tree·the·node·belongs·to. | 593 | ····Tree·-·tree·the·node·belongs·to. |
600 | | 594 | |
601 | ····Node·-·node·to·set·data·of. | 595 | ····Node·-·node·to·set·data·of. |
602 | | 596 | |
603 | ····NewData·-·new·data·for·the·given·node. | 597 | ····NewData·-·new·data·for·the·given·node. |
604 | | 598 | |
605 | ···RESULT | 599 | ···RESULT |
606 | ····OldData·-·previous·data·of·the·given·node. | 600 | ····OldData·-·previous·data·of·the·given·node. |
607 | | 601 | |
608 | ···NOTE | 602 | ···NOTE |
609 | ····There·is·no·SetTreeNodeKey,·for·obvious·reasons. | 603 | ····There·is·no·SetTreeNodeKey,·for·obvious·reasons. |
610 | ····This·function·didn't·exist·before·V50.7.·You·MUST·check | 604 | ····This·function·didn't·exist·before·V50.7.·You·MUST·check |
611 | ····for·version·&·revision·before·using·this·function. | 605 | ····for·version·&·revision·before·using·this·function. |
612 | | 606 | |
613 | ···SEE·ALSO | 607 | ···SEE·ALSO |
614 | ····GetTreeNodeData,·libraries/btree.h | 608 | ····GetTreeNodeData,·libraries/btree.h |
615 | | 609 | |
616 | btree.library/SuccTreeNode | 610 | btree.library/SuccTreeNode·························btree.library/SuccTreeNode |
617 | | 611 | |
618 | ···NAME | 612 | ···NAME |
619 | ····SuccTreeNode·--·get·pointer·to·next·node | 613 | ····SuccTreeNode·--·get·pointer·to·next·node |
620 | | 614 | |
621 | ···SYNOPSIS | 615 | ···SYNOPSIS |
622 | ····SuccNode·=·SuccTreeNode(Tree,·Node) | 616 | ····SuccNode·=·SuccTreeNode(Tree,·Node) |
623 | ····(sysv) | 617 | ····(sysv) |
624 | | 618 | |
625 | ····APTR·SuccTreeNode(const·APTR,·const·APTR); | 619 | ····APTR·SuccTreeNode(const·APTR,·const·APTR); |
626 | | 620 | |
627 | ···FUNCTION | 621 | ···FUNCTION |
628 | ····Return·pointer·to·next·node. | 622 | ····Return·pointer·to·next·node. |
629 | | 623 | |
630 | ···INPUTS | 624 | ···INPUTS |
631 | ····Tree·-·tree·the·node·belongs·to. | 625 | ····Tree·-·tree·the·node·belongs·to. |
632 | | 626 | |
633 | ····Node·-·node·to·get·successor·of. | 627 | ····Node·-·node·to·get·successor·of. |
634 | | 628 | |
635 | ···RESULT | 629 | ···RESULT |
636 | ····SuccNode·-·next·node·pointer·or·NULL·if·no·more·nodes. | 630 | ····SuccNode·-·next·node·pointer·or·NULL·if·no·more·nodes. |
637 | | 631 | |
638 | ···NOTE | 632 | ···NOTE |
639 | | 633 | |
640 | ···SEE·ALSO | 634 | ···SEE·ALSO |
641 | ····PredTreeNode,·libraries/btree.h | 635 | ····PredTreeNode,·libraries/btree.h |
642 | | 636 | |
643 | | 637 | |
\ No newline at end of file
|