4444
4545<a name =" module_symbol-tree--SymbolTree+initialize " ></a >
4646#### symbolTree.initialize(object) ⇒ <code >Object</code >
47- You can optionally initialize an object after its creation,
47+ You can use this function to ( optionally) initialize an object right after its creation,
4848to take advantage of V8's fast properties. Also useful if you would like to
4949freeze your object.
5050
@@ -61,7 +61,7 @@ freeze your object.
6161#### symbolTree.hasChildren(object) ⇒ <code >Boolean</code >
6262Returns ` true ` if the object has any children. Otherwise it returns ` false ` .
6363
64- ` O(1) `
64+ * ` O(1) `
6565
6666** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
6767
@@ -71,9 +71,9 @@ Returns `true` if the object has any children. Otherwise it returns `false`.
7171
7272<a name =" module_symbol-tree--SymbolTree+firstChild " ></a >
7373#### symbolTree.firstChild(object) ⇒ <code >Object</code >
74- Return the first child of the given object.
74+ Returns the first child of the given object.
7575
76- ` O(1) `
76+ * ` O(1) `
7777
7878** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
7979
@@ -83,9 +83,9 @@ Return the first child of the given object.
8383
8484<a name =" module_symbol-tree--SymbolTree+lastChild " ></a >
8585#### symbolTree.lastChild(object) ⇒ <code >Object</code >
86- Return the last child of the given object.
86+ Returns the last child of the given object.
8787
88- ` O(1) `
88+ * ` O(1) `
8989
9090** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
9191
@@ -95,9 +95,9 @@ Return the last child of the given object.
9595
9696<a name =" module_symbol-tree--SymbolTree+previousSibling " ></a >
9797#### symbolTree.previousSibling(object) ⇒ <code >Object</code >
98- Return the previous sibling of the given object.
98+ Returns the previous sibling of the given object.
9999
100- ` O(1) `
100+ * ` O(1) `
101101
102102** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
103103
@@ -107,9 +107,9 @@ Return the previous sibling of the given object.
107107
108108<a name =" module_symbol-tree--SymbolTree+nextSibling " ></a >
109109#### symbolTree.nextSibling(object) ⇒ <code >Object</code >
110- Return the nextSibling sibling of the given object.
110+ Returns the next sibling of the given object.
111111
112- ` O(1) `
112+ * ` O(1) `
113113
114114** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
115115
@@ -121,7 +121,7 @@ Return the nextSibling sibling of the given object.
121121#### symbolTree.parent(object) ⇒ <code >Object</code >
122122Return the parent of the given object.
123123
124- ` O(1) `
124+ * ` O(1) `
125125
126126** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
127127
@@ -133,7 +133,7 @@ Return the parent of the given object.
133133#### symbolTree.lastInclusiveDescendant(object) ⇒ <code >Object</code >
134134Find the inclusive descendant that is last in tree order of the given object.
135135
136- ` O(n) ` (worst case) where n is the depth of the subtree of ` object `
136+ * ` O(n) ` (worst case) where ` n ` is the depth of the subtree of ` object `
137137
138138** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
139139
@@ -147,8 +147,8 @@ Find the preceding object (A) of the given object (B).
147147An object A is preceding an object B if A and B are in the same tree
148148and A comes before B in tree order.
149149
150- ` O(n) ` (worst case) < br >
151- ` O(1) ` (amortized when walking the entire tree)
150+ * ` O(n) ` (worst case)
151+ * ` O(1) ` (amortized when walking the entire tree)
152152
153153** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
154154
@@ -164,8 +164,8 @@ Find the following object (A) of the given object (B).
164164An object A is following an object B if A and B are in the same tree
165165and A comes after B in tree order.
166166
167- ` O(n) ` (worst case) where n is the amount of objects in the entire tree< br >
168- ` O(1) ` (amortized when walking the entire tree)
167+ * ` O(n) ` (worst case) where ` n ` is the amount of objects in the entire tree
168+ * ` O(1) ` (amortized when walking the entire tree)
169169
170170** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
171171
@@ -180,7 +180,7 @@ and A comes after B in tree order.
180180#### symbolTree.childrenToArray(parent, [ options] ) ⇒ <code >Array.< ; Object> ; </code >
181181Append all children of the given object to an array.
182182
183- ` O(n) ` where n is the amount of children of the given ` parent `
183+ * ` O(n) ` where ` n ` is the amount of children of the given ` parent `
184184
185185** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
186186
@@ -196,7 +196,7 @@ Append all children of the given object to an array.
196196#### symbolTree.ancestorsToArray(object, [ options] ) ⇒ <code >Array.< ; Object> ; </code >
197197Append all inclusive ancestors of the given object to an array.
198198
199- ` O(n) ` where n is the amount of ancestors of the given ` object `
199+ * ` O(n) ` where ` n ` is the amount of ancestors of the given ` object `
200200
201201** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
202202
@@ -212,7 +212,7 @@ Append all inclusive ancestors of the given object to an array.
212212#### symbolTree.treeToArray(root, [ options] ) ⇒ <code >Array.< ; Object> ; </code >
213213Append all descendants of the given object to an array (in tree order).
214214
215- ` O(n) ` where n is the amount of objects in the sub-tree of the given ` object `
215+ * ` O(n) ` where ` n ` is the amount of objects in the sub-tree of the given ` object `
216216
217217** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
218218
@@ -228,7 +228,7 @@ Append all descendants of the given object to an array (in tree order).
228228#### symbolTree.childrenIterator(parent, [ options] ) ⇒ <code >Object</code >
229229Iterate over all children of the given object
230230
231- ` O(1) ` for a single iteration
231+ * ` O(1) ` for a single iteration
232232
233233** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
234234** Returns** : <code >Object</code > - An iterable iterator (ES6)
@@ -243,7 +243,7 @@ Iterate over all children of the given object
243243#### symbolTree.previousSiblingsIterator(object) ⇒ <code >Object</code >
244244Iterate over all the previous siblings of the given object. (in reverse tree order)
245245
246- ` O(1) ` for a single iteration
246+ * ` O(1) ` for a single iteration
247247
248248** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
249249** Returns** : <code >Object</code > - An iterable iterator (ES6)
@@ -256,7 +256,7 @@ Iterate over all the previous siblings of the given object. (in reverse tree ord
256256#### symbolTree.nextSiblingsIterator(object) ⇒ <code >Object</code >
257257Iterate over all the next siblings of the given object. (in tree order)
258258
259- ` O(1) ` for a single iteration
259+ * ` O(1) ` for a single iteration
260260
261261** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
262262** Returns** : <code >Object</code > - An iterable iterator (ES6)
@@ -269,7 +269,7 @@ Iterate over all the next siblings of the given object. (in tree order)
269269#### symbolTree.ancestorsIterator(object) ⇒ <code >Object</code >
270270Iterate over all inclusive ancestors of the given object
271271
272- ` O(1) ` for a single iteration
272+ * ` O(1) ` for a single iteration
273273
274274** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
275275** Returns** : <code >Object</code > - An iterable iterator (ES6)
@@ -282,9 +282,10 @@ Iterate over all inclusive ancestors of the given object
282282#### symbolTree.treeIterator(root, options) ⇒ <code >Object</code >
283283Iterate over all descendants of the given object (in tree order).
284284
285- where n is the amount of objects in the sub-tree of the given ` root ` :
286- ` O(n) ` (worst case for a single iterator)
287- ` O(n) ` (amortized, when completing the iterator)<br >
285+ Where ` n ` is the amount of objects in the sub-tree of the given ` root ` :
286+
287+ * ` O(n) ` (worst case for a single iteration)
288+ * ` O(n) ` (amortized, when completing the iterator)
288289
289290** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
290291** Returns** : <code >Object</code > - An iterable iterator (ES6)
@@ -299,8 +300,8 @@ where n is the amount of objects in the sub-tree of the given `root`:
299300#### symbolTree.index(child) ⇒ <code >Number</code >
300301Find the index of the given object (the number of preceding siblings).
301302
302- ` O(n) ` where n is the amount of preceding siblings< br >
303- ` O(1) ` (amortized, if the tree is not modified)
303+ * ` O(n) ` where ` n ` is the amount of preceding siblings
304+ * ` O(1) ` (amortized, if the tree is not modified)
304305
305306** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
306307** Returns** : <code >Number</code > - The number of preceding siblings, or -1 if the object has no parent
@@ -313,8 +314,8 @@ Find the index of the given object (the number of preceding siblings).
313314#### symbolTree.childrenCount(parent) ⇒ <code >Number</code >
314315Calculate the number of children.
315316
316- ` O(n) ` where n is the amount of children< br >
317- ` O(1) ` (amortized, if the tree is not modified)
317+ * ` O(n) ` where ` n ` is the amount of children
318+ * ` O(1) ` (amortized, if the tree is not modified)
318319
319320** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
320321
@@ -337,10 +338,11 @@ Compare the position of an object relative to another object. A bit set is retur
337338The semantics are the same as compareDocumentPosition in DOM, with the exception that
338339DISCONNECTED never occurs with any other bit.
339340
340- where n and m are the amount of ancestors of ` left ` and ` right ` ;
341- where o is the amount of children of the lowest common ancestor of ` left ` and ` right ` :
342- ` O(n + m + o) ` (worst case)
343- ` O(n + m) ` (amortized, if the tree is not modified)
341+ where ` n ` and ` m ` are the amount of ancestors of ` left ` and ` right ` ;
342+ where ` o ` is the amount of children of the lowest common ancestor of ` left ` and ` right ` :
343+
344+ * ` O(n + m + o) ` (worst case)
345+ * ` O(n + m) ` (amortized, if the tree is not modified)
344346
345347** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
346348
@@ -354,7 +356,7 @@ where o is the amount of children of the lowest common ancestor of `left` and `r
354356Remove the object from this tree.
355357Has no effect if already removed.
356358
357- ` O(1) `
359+ * ` O(1) `
358360
359361** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
360362** Returns** : <code >Object</code > - removeObject
@@ -368,7 +370,7 @@ Has no effect if already removed.
368370Insert the given object before the reference object.
369371` newObject ` is now the previous sibling of ` referenceObject ` .
370372
371- ` O(1) `
373+ * ` O(1) `
372374
373375** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
374376** Returns** : <code >Object</code > - newObject
@@ -387,7 +389,7 @@ Insert the given object before the reference object.
387389Insert the given object after the reference object.
388390` newObject ` is now the next sibling of ` referenceObject ` .
389391
390- ` O(1) `
392+ * ` O(1) `
391393
392394** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
393395** Returns** : <code >Object</code > - newObject
@@ -406,7 +408,7 @@ Insert the given object after the reference object.
406408Insert the given object as the first child of the given reference object.
407409` newObject ` is now the first child of ` referenceObject ` .
408410
409- ` O(1) `
411+ * ` O(1) `
410412
411413** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
412414** Returns** : <code >Object</code > - newObject
@@ -425,7 +427,7 @@ Insert the given object as the first child of the given reference object.
425427Insert the given object as the last child of the given reference object.
426428` newObject ` is now the last child of ` referenceObject ` .
427429
428- ` O(1) `
430+ * ` O(1) `
429431
430432** Kind** : instance method of <code >[ SymbolTree] ( #exp_module_symbol-tree--SymbolTree ) </code >
431433** Returns** : <code >Object</code > - newObject
0 commit comments