undirected-graph-typed 2.0.5 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-structures/base/iterable-element-base.d.ts +186 -83
- package/dist/data-structures/base/iterable-element-base.js +149 -107
- package/dist/data-structures/base/iterable-entry-base.d.ts +95 -119
- package/dist/data-structures/base/iterable-entry-base.js +59 -116
- package/dist/data-structures/base/linear-base.d.ts +250 -192
- package/dist/data-structures/base/linear-base.js +137 -274
- package/dist/data-structures/binary-tree/avl-tree-counter.d.ts +126 -158
- package/dist/data-structures/binary-tree/avl-tree-counter.js +171 -205
- package/dist/data-structures/binary-tree/avl-tree-multi-map.d.ts +100 -69
- package/dist/data-structures/binary-tree/avl-tree-multi-map.js +135 -87
- package/dist/data-structures/binary-tree/avl-tree.d.ts +138 -149
- package/dist/data-structures/binary-tree/avl-tree.js +208 -195
- package/dist/data-structures/binary-tree/binary-tree.d.ts +476 -632
- package/dist/data-structures/binary-tree/binary-tree.js +598 -869
- package/dist/data-structures/binary-tree/bst.d.ts +258 -306
- package/dist/data-structures/binary-tree/bst.js +505 -481
- package/dist/data-structures/binary-tree/red-black-tree.d.ts +107 -179
- package/dist/data-structures/binary-tree/red-black-tree.js +114 -209
- package/dist/data-structures/binary-tree/tree-counter.d.ts +132 -154
- package/dist/data-structures/binary-tree/tree-counter.js +172 -203
- package/dist/data-structures/binary-tree/tree-multi-map.d.ts +72 -69
- package/dist/data-structures/binary-tree/tree-multi-map.js +105 -85
- package/dist/data-structures/graph/abstract-graph.d.ts +238 -233
- package/dist/data-structures/graph/abstract-graph.js +267 -237
- package/dist/data-structures/graph/directed-graph.d.ts +108 -224
- package/dist/data-structures/graph/directed-graph.js +146 -233
- package/dist/data-structures/graph/map-graph.d.ts +49 -55
- package/dist/data-structures/graph/map-graph.js +56 -59
- package/dist/data-structures/graph/undirected-graph.d.ts +103 -146
- package/dist/data-structures/graph/undirected-graph.js +129 -149
- package/dist/data-structures/hash/hash-map.d.ts +164 -338
- package/dist/data-structures/hash/hash-map.js +270 -457
- package/dist/data-structures/heap/heap.d.ts +214 -289
- package/dist/data-structures/heap/heap.js +340 -349
- package/dist/data-structures/heap/max-heap.d.ts +11 -47
- package/dist/data-structures/heap/max-heap.js +11 -66
- package/dist/data-structures/heap/min-heap.d.ts +12 -47
- package/dist/data-structures/heap/min-heap.js +11 -66
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +231 -347
- package/dist/data-structures/linked-list/doubly-linked-list.js +368 -494
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +261 -310
- package/dist/data-structures/linked-list/singly-linked-list.js +447 -466
- package/dist/data-structures/linked-list/skip-linked-list.d.ts +0 -107
- package/dist/data-structures/linked-list/skip-linked-list.js +0 -100
- package/dist/data-structures/priority-queue/max-priority-queue.d.ts +12 -56
- package/dist/data-structures/priority-queue/max-priority-queue.js +11 -78
- package/dist/data-structures/priority-queue/min-priority-queue.d.ts +11 -57
- package/dist/data-structures/priority-queue/min-priority-queue.js +10 -79
- package/dist/data-structures/priority-queue/priority-queue.d.ts +2 -61
- package/dist/data-structures/priority-queue/priority-queue.js +8 -83
- package/dist/data-structures/queue/deque.d.ts +227 -254
- package/dist/data-structures/queue/deque.js +309 -348
- package/dist/data-structures/queue/queue.d.ts +180 -201
- package/dist/data-structures/queue/queue.js +265 -248
- package/dist/data-structures/stack/stack.d.ts +124 -102
- package/dist/data-structures/stack/stack.js +181 -125
- package/dist/data-structures/trie/trie.d.ts +164 -165
- package/dist/data-structures/trie/trie.js +189 -172
- package/dist/interfaces/binary-tree.d.ts +56 -6
- package/dist/interfaces/graph.d.ts +16 -0
- package/dist/types/data-structures/base/base.d.ts +1 -1
- package/dist/types/data-structures/graph/abstract-graph.d.ts +4 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.js +2 -1
- package/package.json +2 -2
- package/src/data-structures/base/iterable-element-base.ts +238 -115
- package/src/data-structures/base/iterable-entry-base.ts +96 -120
- package/src/data-structures/base/linear-base.ts +271 -277
- package/src/data-structures/binary-tree/avl-tree-counter.ts +198 -216
- package/src/data-structures/binary-tree/avl-tree-multi-map.ts +192 -101
- package/src/data-structures/binary-tree/avl-tree.ts +239 -206
- package/src/data-structures/binary-tree/binary-tree.ts +664 -893
- package/src/data-structures/binary-tree/bst.ts +568 -570
- package/src/data-structures/binary-tree/red-black-tree.ts +161 -222
- package/src/data-structures/binary-tree/tree-counter.ts +199 -218
- package/src/data-structures/binary-tree/tree-multi-map.ts +131 -97
- package/src/data-structures/graph/abstract-graph.ts +339 -264
- package/src/data-structures/graph/directed-graph.ts +146 -236
- package/src/data-structures/graph/map-graph.ts +63 -60
- package/src/data-structures/graph/undirected-graph.ts +129 -152
- package/src/data-structures/hash/hash-map.ts +274 -496
- package/src/data-structures/heap/heap.ts +389 -402
- package/src/data-structures/heap/max-heap.ts +12 -76
- package/src/data-structures/heap/min-heap.ts +13 -76
- package/src/data-structures/linked-list/doubly-linked-list.ts +426 -530
- package/src/data-structures/linked-list/singly-linked-list.ts +495 -517
- package/src/data-structures/linked-list/skip-linked-list.ts +1 -108
- package/src/data-structures/priority-queue/max-priority-queue.ts +12 -87
- package/src/data-structures/priority-queue/min-priority-queue.ts +11 -88
- package/src/data-structures/priority-queue/priority-queue.ts +3 -92
- package/src/data-structures/queue/deque.ts +381 -357
- package/src/data-structures/queue/queue.ts +310 -264
- package/src/data-structures/stack/stack.ts +217 -131
- package/src/data-structures/trie/trie.ts +240 -175
- package/src/interfaces/binary-tree.ts +240 -6
- package/src/interfaces/graph.ts +37 -0
- package/src/types/data-structures/base/base.ts +5 -5
- package/src/types/data-structures/graph/abstract-graph.ts +5 -0
- package/src/types/utils/utils.ts +2 -0
- package/src/utils/utils.ts +9 -14
|
@@ -5,30 +5,64 @@
|
|
|
5
5
|
* @copyright Copyright (c) 2022 Pablo Zeng <zrwusa@gmail.com>
|
|
6
6
|
* @license MIT License
|
|
7
7
|
*/
|
|
8
|
-
import type { BSTNOptKeyOrNode, BSTOptions, BTNRep, Comparable, Comparator, CP, DFSOrderPattern, EntryCallback, IterationType, NodeCallback, NodePredicate, OptNode } from '../../types';
|
|
8
|
+
import type { BinaryTreeOptions, BSTNOptKeyOrNode, BSTOptions, BTNRep, Comparable, Comparator, CP, DFSOrderPattern, EntryCallback, IterationType, NodeCallback, NodePredicate, OptNode } from '../../types';
|
|
9
9
|
import { BinaryTree, BinaryTreeNode } from './binary-tree';
|
|
10
10
|
import { IBinaryTree } from '../../interfaces';
|
|
11
11
|
import { Range } from '../../common';
|
|
12
|
+
/**
|
|
13
|
+
* Represents a Node in a Binary Search Tree.
|
|
14
|
+
*
|
|
15
|
+
* @template K - The type of the key.
|
|
16
|
+
* @template V - The type of the value.
|
|
17
|
+
*/
|
|
12
18
|
export declare class BSTNode<K = any, V = any> extends BinaryTreeNode<K, V> {
|
|
13
19
|
parent?: BSTNode<K, V>;
|
|
14
20
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param
|
|
20
|
-
* have to be provided when creating an instance of the class. If a value is not provided, it will
|
|
21
|
-
* default to `undefined`.
|
|
21
|
+
* Creates an instance of BSTNode.
|
|
22
|
+
* @remarks Time O(1), Space O(1)
|
|
23
|
+
*
|
|
24
|
+
* @param key - The key of the node.
|
|
25
|
+
* @param [value] - The value associated with the key.
|
|
22
26
|
*/
|
|
23
27
|
constructor(key: K, value?: V);
|
|
24
28
|
_left?: BSTNode<K, V> | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the left child of the node.
|
|
31
|
+
* @remarks Time O(1), Space O(1)
|
|
32
|
+
*
|
|
33
|
+
* @returns The left child.
|
|
34
|
+
*/
|
|
25
35
|
get left(): BSTNode<K, V> | null | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Sets the left child of the node and updates its parent reference.
|
|
38
|
+
* @remarks Time O(1), Space O(1)
|
|
39
|
+
*
|
|
40
|
+
* @param v - The node to set as the left child.
|
|
41
|
+
*/
|
|
26
42
|
set left(v: BSTNode<K, V> | null | undefined);
|
|
27
43
|
_right?: BSTNode<K, V> | null | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the right child of the node.
|
|
46
|
+
* @remarks Time O(1), Space O(1)
|
|
47
|
+
*
|
|
48
|
+
* @returns The right child.
|
|
49
|
+
*/
|
|
28
50
|
get right(): BSTNode<K, V> | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the right child of the node and updates its parent reference.
|
|
53
|
+
* @remarks Time O(1), Space O(1)
|
|
54
|
+
*
|
|
55
|
+
* @param v - The node to set as the right child.
|
|
56
|
+
*/
|
|
29
57
|
set right(v: BSTNode<K, V> | null | undefined);
|
|
30
58
|
}
|
|
31
59
|
/**
|
|
60
|
+
* Represents a Binary Search Tree (BST).
|
|
61
|
+
* Keys are ordered, allowing for faster search operations compared to a standard Binary Tree.
|
|
62
|
+
* @template K - The type of the key.
|
|
63
|
+
* @template V - The type of the value.
|
|
64
|
+
* @template R - The type of the raw data object (if using `toEntryFn`).
|
|
65
|
+
*
|
|
32
66
|
* 1. Node Order: Each node's left child has a lesser value, and the right child has a greater value.
|
|
33
67
|
* 2. Unique Keys: No duplicate keys in a standard BST.
|
|
34
68
|
* 3. Efficient Search: Enables quick search, minimum, and maximum operations.
|
|
@@ -93,369 +127,287 @@ export declare class BSTNode<K = any, V = any> extends BinaryTreeNode<K, V> {
|
|
|
93
127
|
* console.log(findLCA(5, 35)); // 15
|
|
94
128
|
* console.log(findLCA(20, 30)); // 25
|
|
95
129
|
*/
|
|
96
|
-
export declare class BST<K = any, V = any, R
|
|
130
|
+
export declare class BST<K = any, V = any, R extends object = object> extends BinaryTree<K, V, R> implements IBinaryTree<K, V, R> {
|
|
97
131
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* @param [options] - The `options` parameter is an optional object that can contain the following
|
|
104
|
-
* properties:
|
|
132
|
+
* Creates an instance of BST.
|
|
133
|
+
* @remarks Time O(N log N) or O(N^2) depending on `isBalanceAdd` in `addMany` and input order. Space O(N).
|
|
134
|
+
*
|
|
135
|
+
* @param [keysNodesEntriesOrRaws=[]] - An iterable of items to add.
|
|
136
|
+
* @param [options] - Configuration options for the BST, including comparator.
|
|
105
137
|
*/
|
|
106
138
|
constructor(keysNodesEntriesOrRaws?: Iterable<K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined | R>, options?: BSTOptions<K, V, R>);
|
|
107
139
|
protected _root?: BSTNode<K, V>;
|
|
140
|
+
/**
|
|
141
|
+
* Gets the root node of the tree.
|
|
142
|
+
* @remarks Time O(1)
|
|
143
|
+
*
|
|
144
|
+
* @returns The root node.
|
|
145
|
+
*/
|
|
108
146
|
get root(): OptNode<BSTNode<K, V>>;
|
|
109
147
|
protected _isReverse: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Gets whether the tree's comparison logic is reversed.
|
|
150
|
+
* @remarks Time O(1)
|
|
151
|
+
*
|
|
152
|
+
* @returns True if the tree is reversed (e.g., a max-heap logic).
|
|
153
|
+
*/
|
|
110
154
|
get isReverse(): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* The default comparator function.
|
|
157
|
+
* @remarks Time O(1) (or O(C) if `specifyComparable` is used, C is complexity of that function).
|
|
158
|
+
*/
|
|
111
159
|
protected _comparator: Comparator<K>;
|
|
160
|
+
/**
|
|
161
|
+
* Gets the comparator function used by the tree.
|
|
162
|
+
* @remarks Time O(1)
|
|
163
|
+
*
|
|
164
|
+
* @returns The comparator function.
|
|
165
|
+
*/
|
|
112
166
|
get comparator(): Comparator<K>;
|
|
113
167
|
protected _specifyComparable?: (key: K) => Comparable;
|
|
114
|
-
get specifyComparable(): ((key: K) => Comparable) | undefined;
|
|
115
168
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
169
|
+
* Gets the function used to extract a comparable value from a complex key.
|
|
170
|
+
* @remarks Time O(1)
|
|
118
171
|
*
|
|
119
|
-
* The
|
|
120
|
-
* @param {K} key - The key parameter is of type K, which represents the type of the key for the node
|
|
121
|
-
* being created.
|
|
122
|
-
* @param {V} [value] - The "value" parameter is an optional parameter of type V. It represents the
|
|
123
|
-
* value associated with the key in the node being created.
|
|
124
|
-
* @returns The method is returning a new instance of the BSTNode class, casted as the BSTNode<K, V> type.
|
|
172
|
+
* @returns The key-to-comparable conversion function.
|
|
125
173
|
*/
|
|
126
|
-
|
|
174
|
+
get specifyComparable(): ((key: K) => Comparable) | undefined;
|
|
127
175
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
176
|
+
* (Protected) Creates a new BST node.
|
|
177
|
+
* @remarks Time O(1), Space O(1)
|
|
130
178
|
*
|
|
131
|
-
*
|
|
132
|
-
* @param [
|
|
133
|
-
*
|
|
134
|
-
* following properties:
|
|
135
|
-
* @returns a new instance of the BST class with the provided options.
|
|
179
|
+
* @param key - The key for the new node.
|
|
180
|
+
* @param [value] - The value for the new node (used if not in Map mode).
|
|
181
|
+
* @returns The newly created BSTNode.
|
|
136
182
|
*/
|
|
137
|
-
|
|
183
|
+
_createNode(key: K, value?: V): BSTNode<K, V>;
|
|
138
184
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
185
|
+
* Ensures the input is a node. If it's a key or entry, it searches for the node.
|
|
186
|
+
* @remarks Time O(log N) (height of the tree), O(N) worst-case.
|
|
141
187
|
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* @
|
|
145
|
-
* `keyNodeOrEntry` can accept a value of type `R`, which represents the key, node,
|
|
146
|
-
* entry, or raw element that needs to be ensured in the tree.
|
|
147
|
-
* @param {IterationType} [iterationType=ITERATIVE] - The `iterationType` parameter is an optional
|
|
148
|
-
* parameter that specifies the type of iteration to be used when ensuring a node. It has a default
|
|
149
|
-
* value of `'ITERATIVE'`.
|
|
150
|
-
* @returns The method is returning either the node that was ensured or `undefined` if the node could
|
|
151
|
-
* not be ensured.
|
|
188
|
+
* @param keyNodeOrEntry - The item to resolve to a node.
|
|
189
|
+
* @param [iterationType=this.iterationType] - The traversal method to use if searching.
|
|
190
|
+
* @returns The resolved node, or undefined if not found.
|
|
152
191
|
*/
|
|
153
192
|
ensureNode(keyNodeOrEntry: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, iterationType?: IterationType): OptNode<BSTNode<K, V>>;
|
|
154
193
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
194
|
+
* Checks if the given item is a `BSTNode` instance.
|
|
195
|
+
* @remarks Time O(1), Space O(1)
|
|
157
196
|
*
|
|
158
|
-
*
|
|
159
|
-
* @
|
|
160
|
-
* `keyNodeOrEntry` can be of type `R` or `K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined `.
|
|
161
|
-
* @returns a boolean value indicating whether the input parameter `keyNodeOrEntry` is
|
|
162
|
-
* an instance of the `BSTNode` class.
|
|
197
|
+
* @param keyNodeOrEntry - The item to check.
|
|
198
|
+
* @returns True if it's a BSTNode, false otherwise.
|
|
163
199
|
*/
|
|
164
200
|
isNode(keyNodeOrEntry: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined): keyNodeOrEntry is BSTNode<K, V>;
|
|
165
201
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
202
|
+
* Checks if the given key is valid (comparable).
|
|
203
|
+
* @remarks Time O(1)
|
|
168
204
|
*
|
|
169
|
-
*
|
|
170
|
-
* @
|
|
171
|
-
* type `K`.
|
|
172
|
-
* @returns The `override isValidKey(key: any): key is K` function is returning a boolean value based on
|
|
173
|
-
* the result of the `isComparable` function with the condition `this._compare !==
|
|
174
|
-
* this._DEFAULT_COMPARATOR`.
|
|
205
|
+
* @param key - The key to validate.
|
|
206
|
+
* @returns True if the key is valid, false otherwise.
|
|
175
207
|
*/
|
|
176
208
|
isValidKey(key: any): key is K;
|
|
177
209
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
210
|
+
* Performs a Depth-First Search (DFS) traversal.
|
|
211
|
+
* @remarks Time O(N), visits every node. Space O(log N) for the call/explicit stack. O(N) worst-case.
|
|
180
212
|
*
|
|
181
|
-
*
|
|
182
|
-
* @param
|
|
183
|
-
*
|
|
184
|
-
* @param
|
|
185
|
-
*
|
|
186
|
-
* @
|
|
213
|
+
* @template C - The type of the callback function.
|
|
214
|
+
* @param [callback=this._DEFAULT_NODE_CALLBACK] - Function to call on each node.
|
|
215
|
+
* @param [pattern='IN'] - The traversal order ('IN', 'PRE', 'POST').
|
|
216
|
+
* @param [onlyOne=false] - If true, stops after the first callback.
|
|
217
|
+
* @param [startNode=this._root] - The node to start from.
|
|
218
|
+
* @param [iterationType=this.iterationType] - The traversal method.
|
|
219
|
+
* @returns An array of callback results.
|
|
187
220
|
*/
|
|
188
|
-
|
|
221
|
+
dfs<C extends NodeCallback<BSTNode<K, V>>>(callback?: C, pattern?: DFSOrderPattern, onlyOne?: boolean, startNode?: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, iterationType?: IterationType): ReturnType<C>[];
|
|
189
222
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* @param
|
|
196
|
-
*
|
|
197
|
-
* @
|
|
198
|
-
* added. If provided, the values will be assigned to the corresponding keys or nodes in the same
|
|
199
|
-
* order. If not provided, undefined will be assigned as the value for each key or node.
|
|
200
|
-
* @param [isBalanceAdd=true] - A boolean flag indicating whether the tree should be balanced after
|
|
201
|
-
* adding the elements. If set to true, the tree will be balanced using a binary search tree
|
|
202
|
-
* algorithm. If set to false, the elements will be added without balancing the tree. The default
|
|
203
|
-
* value is true.
|
|
204
|
-
* @param {IterationType} iterationType - The `iterationType` parameter is an optional parameter that
|
|
205
|
-
* specifies the type of iteration to use when adding multiple keys or nodes to the binary search
|
|
206
|
-
* tree. It can have two possible values:
|
|
207
|
-
* @returns The function `addMany` returns an array of booleans indicating whether each element was
|
|
208
|
-
* successfully inserted into the data structure.
|
|
223
|
+
* Performs a Breadth-First Search (BFS) or Level-Order traversal.
|
|
224
|
+
* @remarks Time O(N), visits every node. Space O(N) in the worst case for the queue.
|
|
225
|
+
*
|
|
226
|
+
* @template C - The type of the callback function.
|
|
227
|
+
* @param [callback=this._DEFAULT_NODE_CALLBACK] - Function to call on each node.
|
|
228
|
+
* @param [startNode=this._root] - The node to start from.
|
|
229
|
+
* @param [iterationType=this.iterationType] - The traversal method.
|
|
230
|
+
* @returns An array of callback results.
|
|
209
231
|
*/
|
|
210
|
-
|
|
232
|
+
bfs<C extends NodeCallback<BSTNode<K, V>>>(callback?: C, startNode?: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, iterationType?: IterationType): ReturnType<C>[];
|
|
211
233
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* on
|
|
217
|
-
* @param
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* @param [onlyOne=false] - The `onlyOne` parameter is a boolean flag that determines whether the
|
|
221
|
-
* search should stop after finding the first matching node. If `onlyOne` is set to `true`, the
|
|
222
|
-
* search will return as soon as a matching node is found. If `onlyOne` is set to `false`, the
|
|
223
|
-
* @param {C} callback - The `callback` parameter in the `override search` function is a function
|
|
224
|
-
* that will be called on each node that matches the search criteria. It is of type `C`, which
|
|
225
|
-
* extends `NodeCallback<BSTNode<K, V> | null>`. The callback function should accept a node of type `BSTNode<K, V>` as its
|
|
226
|
-
* argument and
|
|
227
|
-
* @param {K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined } startNode - The `startNode` parameter in the `override search`
|
|
228
|
-
* method represents the node from which the search operation will begin. It is the starting point
|
|
229
|
-
* for searching within the tree data structure. The method ensures that the `startNode` is a valid
|
|
230
|
-
* node before proceeding with the search operation. If the `
|
|
231
|
-
* @param {IterationType} iterationType - The `iterationType` parameter in the `override search`
|
|
232
|
-
* function determines the type of iteration to be used during the search operation. It can have two
|
|
233
|
-
* possible values:
|
|
234
|
-
* @returns The `override search` method returns an array of values that match the search criteria
|
|
235
|
-
* specified by the input parameters. The method performs a search operation on a binary tree
|
|
236
|
-
* structure based on the provided key, predicate, and other options. The search results are
|
|
237
|
-
* collected in an array and returned as the output of the method.
|
|
234
|
+
* Returns a 2D array of nodes, grouped by level.
|
|
235
|
+
* @remarks Time O(N), visits every node. Space O(N) for the result array and the queue/stack.
|
|
236
|
+
*
|
|
237
|
+
* @template C - The type of the callback function.
|
|
238
|
+
* @param [callback=this._DEFAULT_NODE_CALLBACK] - Function to call on each node.
|
|
239
|
+
* @param [startNode=this._root] - The node to start from.
|
|
240
|
+
* @param [iterationType=this.iterationType] - The traversal method.
|
|
241
|
+
* @returns A 2D array of callback results.
|
|
238
242
|
*/
|
|
239
|
-
|
|
243
|
+
listLevels<C extends NodeCallback<BSTNode<K, V>>>(callback?: C, startNode?: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, iterationType?: IterationType): ReturnType<C>[][];
|
|
240
244
|
/**
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* @param
|
|
246
|
-
*
|
|
247
|
-
* @
|
|
248
|
-
* function that is used to process each node that is found within the specified range during the
|
|
249
|
-
* search operation. It is of type `NodeCallback<BSTNode<K, V> | null>`, where `BSTNode<K, V>` is the type of nodes in the
|
|
250
|
-
* data structure.
|
|
251
|
-
* @param {K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined } startNode - The `startNode` parameter in the `rangeSearch`
|
|
252
|
-
* function represents the node from which the search for nodes within the specified range will
|
|
253
|
-
* begin. It is the starting point for the range search operation.
|
|
254
|
-
* @param {IterationType} iterationType - The `iterationType` parameter in the `rangeSearch` function
|
|
255
|
-
* is used to specify the type of iteration to be performed during the search operation. It has a
|
|
256
|
-
* default value of `this.iterationType`, which suggests that it is likely a property of the class or
|
|
257
|
-
* object that the `rangeSearch`
|
|
258
|
-
* @returns The `rangeSearch` function is returning the result of calling the `search` method with
|
|
259
|
-
* the specified parameters.
|
|
245
|
+
* Gets the first node matching a predicate.
|
|
246
|
+
* @remarks Time O(log N) if searching by key, O(N) if searching by predicate. Space O(log N) or O(N).
|
|
247
|
+
*
|
|
248
|
+
* @param keyNodeEntryOrPredicate - The key, node, entry, or predicate function to search for.
|
|
249
|
+
* @param [startNode=this._root] - The node to start the search from.
|
|
250
|
+
* @param [iterationType=this.iterationType] - The traversal method.
|
|
251
|
+
* @returns The first matching node, or undefined if not found.
|
|
260
252
|
*/
|
|
261
|
-
|
|
253
|
+
getNode(keyNodeEntryOrPredicate: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined | NodePredicate<BSTNode<K, V>>, startNode?: BSTNOptKeyOrNode<K, BSTNode<K, V>>, iterationType?: IterationType): OptNode<BSTNode<K, V>>;
|
|
262
254
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* @param
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* node
|
|
273
|
-
* @param
|
|
274
|
-
*
|
|
275
|
-
* `this.iterationType`, which means it will use the iteration type defined in the class instance if
|
|
276
|
-
* no value is provided when calling the method.
|
|
277
|
-
* @returns The `getNode` method is returning an optional binary search tree node (`OptNode<BSTNode<K, V>>`).
|
|
278
|
-
* It is using the `getNodes` method to find the node based on the provided keyNodeEntryOrPredicate, beginning at
|
|
279
|
-
* the specified root node (`startNode`) and using the specified iteration type. The method then
|
|
280
|
-
* returns the first node found or `undefined` if no node is found.
|
|
255
|
+
* Searches the tree for nodes matching a predicate, key, or range.
|
|
256
|
+
* @remarks This is an optimized search for a BST. If searching by key or range, it prunes branches.
|
|
257
|
+
* Time O(H + M) for key/range search (H=height, M=matches). O(N) for predicate search.
|
|
258
|
+
* Space O(log N) for the stack.
|
|
259
|
+
*
|
|
260
|
+
* @template C - The type of the callback function.
|
|
261
|
+
* @param keyNodeEntryOrPredicate - The key, node, entry, predicate, or range to search for.
|
|
262
|
+
* @param [onlyOne=false] - If true, stops after finding the first match.
|
|
263
|
+
* @param [callback=this._DEFAULT_NODE_CALLBACK] - A function to call on matching nodes.
|
|
264
|
+
* @param [startNode=this._root] - The node to start the search from.
|
|
265
|
+
* @param [iterationType=this.iterationType] - Whether to use 'RECURSIVE' or 'ITERATIVE' search.
|
|
266
|
+
* @returns An array of results from the callback function for each matching node.
|
|
281
267
|
*/
|
|
282
|
-
|
|
268
|
+
search<C extends NodeCallback<BSTNode<K, V>>>(keyNodeEntryOrPredicate: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined | NodePredicate<BSTNode<K, V>> | Range<K>, onlyOne?: boolean, callback?: C, startNode?: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, iterationType?: IterationType): ReturnType<C>[];
|
|
283
269
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* @param
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* @
|
|
293
|
-
* specifies the order in which the Depth-First Search (DFS) traversal should be performed on the
|
|
294
|
-
* Binary Search Tree (BST). The possible values for the `pattern` parameter are:
|
|
295
|
-
* @param {boolean} [onlyOne=false] - The `onlyOne` parameter in the `override dfs` method is a
|
|
296
|
-
* boolean flag that indicates whether you want to stop the depth-first search traversal after
|
|
297
|
-
* finding the first matching node or continue searching for all matching nodes. If `onlyOne` is set
|
|
298
|
-
* to `true`, the traversal will stop after finding
|
|
299
|
-
* @param {K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined} startNode -
|
|
300
|
-
* The `startNode` parameter in the `override dfs` method can be one of the following types:
|
|
301
|
-
* @param {IterationType} iterationType - The `iterationType` parameter in the `override dfs` method
|
|
302
|
-
* specifies the type of iteration to be performed during the Depth-First Search (DFS) traversal of a
|
|
303
|
-
* Binary Search Tree (BST). It is used to determine the order in which nodes are visited during the
|
|
304
|
-
* traversal. The possible values for `
|
|
305
|
-
* @returns The `override` function is returning the result of calling the `dfs` method from the
|
|
306
|
-
* superclass, with the provided arguments `callback`, `pattern`, `onlyOne`, `startNode`, and
|
|
307
|
-
* `iterationType`. The return type is an array of the return type of the callback function `C`.
|
|
270
|
+
* Performs an optimized search for nodes within a given key range.
|
|
271
|
+
* @remarks Time O(H + M), where H is tree height and M is the number of matches.
|
|
272
|
+
*
|
|
273
|
+
* @template C - The type of the callback function.
|
|
274
|
+
* @param range - A `Range` object or a `[low, high]` tuple.
|
|
275
|
+
* @param [callback=this._DEFAULT_NODE_CALLBACK] - A function to call on matching nodes.
|
|
276
|
+
* @param [startNode=this._root] - The node to start the search from.
|
|
277
|
+
* @param [iterationType=this.iterationType] - The traversal method.
|
|
278
|
+
* @returns An array of callback results.
|
|
308
279
|
*/
|
|
309
|
-
|
|
280
|
+
rangeSearch<C extends NodeCallback<BSTNode<K, V>>>(range: Range<K> | [K, K], callback?: C, startNode?: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, iterationType?: IterationType): ReturnType<C>[];
|
|
310
281
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
* @
|
|
317
|
-
* visited during the breadth-first search. It should take a single argument, which is the current
|
|
318
|
-
* node being visited, and it can return a value of any type.
|
|
319
|
-
* @param {K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined } startNode - The `startNode` parameter is the starting
|
|
320
|
-
* point for the breadth-first search. It can be either a root node, a key-value pair, or an entry
|
|
321
|
-
* object. If no value is provided, the default value is the root of the tree.
|
|
322
|
-
* @param {IterationType} iterationType - The `iterationType` parameter is used to specify the type
|
|
323
|
-
* of iteration to be performed during the breadth-first search (BFS) traversal. It can have one of
|
|
324
|
-
* the following values:
|
|
325
|
-
* @returns an array of the return type of the callback function.
|
|
282
|
+
* Adds a new node to the BST based on key comparison.
|
|
283
|
+
* @remarks Time O(log N), where H is tree height. O(N) worst-case (unbalanced tree), O(log N) average. Space O(1).
|
|
284
|
+
*
|
|
285
|
+
* @param keyNodeOrEntry - The key, node, or entry to add.
|
|
286
|
+
* @param [value] - The value, if providing just a key.
|
|
287
|
+
* @returns True if the addition was successful, false otherwise.
|
|
326
288
|
*/
|
|
327
|
-
|
|
289
|
+
add(keyNodeOrEntry: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, value?: V): boolean;
|
|
328
290
|
/**
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
* @param
|
|
335
|
-
*
|
|
336
|
-
* tree
|
|
337
|
-
* @param
|
|
338
|
-
*
|
|
339
|
-
* key-value pair representing a node in the tree, or a key representing a node in the tree. If no
|
|
340
|
-
* value is provided, the root of
|
|
341
|
-
* @param {IterationType} iterationType - The `iterationType` parameter is used to specify the type
|
|
342
|
-
* of iteration to be performed on the tree. It can have one of the following values:
|
|
343
|
-
* @returns The method is returning a two-dimensional array of the return type of the callback
|
|
344
|
-
* function.
|
|
291
|
+
* Adds multiple items to the tree.
|
|
292
|
+
* @remarks If `isBalanceAdd` is true, sorts the input and builds a balanced tree. Time O(N log N) (due to sort and balanced add).
|
|
293
|
+
* If false, adds items one by one. Time O(N * H), which is O(N^2) worst-case.
|
|
294
|
+
* Space O(N) for sorting and recursion/iteration stack.
|
|
295
|
+
*
|
|
296
|
+
* @param keysNodesEntriesOrRaws - An iterable of items to add.
|
|
297
|
+
* @param [values] - An optional parallel iterable of values.
|
|
298
|
+
* @param [isBalanceAdd=true] - If true, builds a balanced tree from the items.
|
|
299
|
+
* @param [iterationType=this.iterationType] - The traversal method for balanced add (recursive or iterative).
|
|
300
|
+
* @returns An array of booleans indicating the success of each individual `add` operation.
|
|
345
301
|
*/
|
|
346
|
-
|
|
302
|
+
addMany(keysNodesEntriesOrRaws: Iterable<R | BTNRep<K, V, BSTNode<K, V>>>, values?: Iterable<V | undefined>, isBalanceAdd?: boolean, iterationType?: IterationType): boolean[];
|
|
347
303
|
/**
|
|
348
|
-
*
|
|
349
|
-
* Space
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
* @param
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
* @
|
|
357
|
-
* traverse nodes that are lesser, greater, or both than the `targetNode`. It accepts the values -1,
|
|
358
|
-
* 0, or 1, where:
|
|
359
|
-
* @param {K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined } targetNode - The `targetNode` parameter is the node in
|
|
360
|
-
* the binary tree that you want to start traversing from. It can be specified either by providing
|
|
361
|
-
* the key of the node, the node itself, or an entry containing the key and value of the node. If no
|
|
362
|
-
* `targetNode` is provided,
|
|
363
|
-
* @param {IterationType} iterationType - The `iterationType` parameter determines the type of
|
|
364
|
-
* traversal to be performed on the binary tree. It can have two possible values:
|
|
365
|
-
* @returns The function `lesserOrGreaterTraverse` returns an array of values of type
|
|
366
|
-
* `ReturnType<C>`, which is the return type of the callback function passed as an argument.
|
|
304
|
+
* Traverses the tree and returns nodes that are lesser or greater than a target node.
|
|
305
|
+
* @remarks Time O(N), as it performs a full traversal. Space O(log N) or O(N).
|
|
306
|
+
*
|
|
307
|
+
* @template C - The type of the callback function.
|
|
308
|
+
* @param [callback=this._DEFAULT_NODE_CALLBACK] - Function to call on matching nodes.
|
|
309
|
+
* @param [lesserOrGreater=-1] - -1 for lesser, 1 for greater, 0 for equal.
|
|
310
|
+
* @param [targetNode=this._root] - The node to compare against.
|
|
311
|
+
* @param [iterationType=this.iterationType] - The traversal method.
|
|
312
|
+
* @returns An array of callback results.
|
|
367
313
|
*/
|
|
368
314
|
lesserOrGreaterTraverse<C extends NodeCallback<BSTNode<K, V>>>(callback?: C, lesserOrGreater?: CP, targetNode?: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, iterationType?: IterationType): ReturnType<C>[];
|
|
369
315
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
316
|
+
* Rebuilds the tree to be perfectly balanced.
|
|
317
|
+
* @remarks Time O(N) (O(N) for DFS, O(N) for sorted build). Space O(N) for node array and recursion stack.
|
|
372
318
|
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* @param {IterationType} iterationType - The `iterationType` parameter is an optional parameter that
|
|
376
|
-
* specifies the type of iteration to use when building a balanced binary search tree. It has a
|
|
377
|
-
* default value of `this.iterationType`, which means it will use the iteration type specified in the
|
|
378
|
-
* current instance of the class.
|
|
379
|
-
* @returns The function `perfectlyBalance` returns a boolean value.
|
|
319
|
+
* @param [iterationType=this.iterationType] - The traversal method for the initial node export.
|
|
320
|
+
* @returns True if successful, false if the tree was empty.
|
|
380
321
|
*/
|
|
381
322
|
perfectlyBalance(iterationType?: IterationType): boolean;
|
|
382
323
|
/**
|
|
383
|
-
*
|
|
384
|
-
*
|
|
324
|
+
* Checks if the tree meets the AVL balance condition (height difference <= 1).
|
|
325
|
+
* @remarks Time O(N), as it must visit every node to compute height. Space O(log N) for recursion or O(N) for iterative map.
|
|
385
326
|
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
* @param {IterationType} iterationType - The `iterationType` parameter is an optional parameter that
|
|
389
|
-
* specifies the type of iteration to use when checking if the AVL tree is balanced. It has a default
|
|
390
|
-
* value of `this.iterationType`, which means it will use the iteration type specified in the current
|
|
391
|
-
* instance of the AVL tree.
|
|
392
|
-
* @returns a boolean value.
|
|
327
|
+
* @param [iterationType=this.iterationType] - The traversal method.
|
|
328
|
+
* @returns True if the tree is AVL balanced, false otherwise.
|
|
393
329
|
*/
|
|
394
330
|
isAVLBalanced(iterationType?: IterationType): boolean;
|
|
395
331
|
/**
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
* @
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
* @param [options] -
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
*
|
|
411
|
-
* @
|
|
412
|
-
*
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
* @
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
* @param
|
|
433
|
-
*
|
|
434
|
-
|
|
332
|
+
* Creates a new BST by mapping each [key, value] pair to a new entry.
|
|
333
|
+
* @remarks Time O(N * H), where N is nodes in this tree, and H is height of the new tree during insertion.
|
|
334
|
+
* Space O(N) for the new tree.
|
|
335
|
+
*
|
|
336
|
+
* @template MK - New key type.
|
|
337
|
+
* @template MV - New value type.
|
|
338
|
+
* @template MR - New raw type.
|
|
339
|
+
* @param callback - A function to map each [key, value] pair.
|
|
340
|
+
* @param [options] - Options for the new BST.
|
|
341
|
+
* @param [thisArg] - `this` context for the callback.
|
|
342
|
+
* @returns A new, mapped BST.
|
|
343
|
+
*/
|
|
344
|
+
map<MK = K, MV = V, MR extends object = object>(callback: EntryCallback<K, V | undefined, [MK, MV]>, options?: Partial<BinaryTreeOptions<MK, MV, MR>>, thisArg?: unknown): BST<MK, MV, MR>;
|
|
345
|
+
/**
|
|
346
|
+
* Deletes the first node found that satisfies the predicate.
|
|
347
|
+
* @remarks Performs an in-order traversal. Time O(N) worst-case (O(log N) to find + O(log N) to delete). Space O(log N) for stack.
|
|
348
|
+
*
|
|
349
|
+
* @param predicate - A function to test each [key, value] pair.
|
|
350
|
+
* @returns True if a node was deleted, false otherwise.
|
|
351
|
+
*/
|
|
352
|
+
deleteWhere(predicate: (key: K, value: V | undefined, index: number, tree: this) => boolean): boolean;
|
|
353
|
+
/**
|
|
354
|
+
* (Protected) Creates a new, empty instance of the same BST constructor.
|
|
355
|
+
* @remarks Time O(1)
|
|
356
|
+
*
|
|
357
|
+
* @template TK, TV, TR - Generic types for the new instance.
|
|
358
|
+
* @param [options] - Options for the new BST.
|
|
359
|
+
* @returns A new, empty BST.
|
|
360
|
+
*/
|
|
361
|
+
protected _createInstance<TK = K, TV = V, TR extends object = R>(options?: Partial<BSTOptions<TK, TV, TR>>): this;
|
|
362
|
+
/**
|
|
363
|
+
* (Protected) Creates a new instance of the same BST constructor, potentially with different generic types.
|
|
364
|
+
* @remarks Time O(N log N) or O(N^2) (from constructor) due to processing the iterable.
|
|
365
|
+
*
|
|
366
|
+
* @template TK, TV, TR - Generic types for the new instance.
|
|
367
|
+
* @param [iter=[]] - An iterable to populate the new BST.
|
|
368
|
+
* @param [options] - Options for the new BST.
|
|
369
|
+
* @returns A new BST.
|
|
370
|
+
*/
|
|
371
|
+
protected _createLike<TK = K, TV = V, TR extends object = R>(iter?: Iterable<TK | BSTNode<TK, TV> | [TK | null | undefined, TV | undefined] | null | undefined | TR>, options?: Partial<BSTOptions<TK, TV, TR>>): BST<TK, TV, TR>;
|
|
372
|
+
/**
|
|
373
|
+
* (Protected) Snapshots the current BST's configuration options.
|
|
374
|
+
* @remarks Time O(1)
|
|
375
|
+
*
|
|
376
|
+
* @template TK, TV, TR - Generic types for the options.
|
|
377
|
+
* @returns The options object.
|
|
378
|
+
*/
|
|
379
|
+
protected _snapshotOptions<TK = K, TV = V, TR extends object = R>(): BSTOptions<TK, TV, TR>;
|
|
380
|
+
/**
|
|
381
|
+
* (Protected) Converts a key, node, or entry into a standardized [node, value] tuple.
|
|
382
|
+
* @remarks Time O(1)
|
|
383
|
+
*
|
|
384
|
+
* @param keyNodeOrEntry - The input item.
|
|
385
|
+
* @param [value] - An optional value (used if input is just a key).
|
|
386
|
+
* @returns A tuple of [node, value].
|
|
435
387
|
*/
|
|
436
388
|
protected _keyValueNodeOrEntryToNodeAndValue(keyNodeOrEntry: K | BSTNode<K, V> | [K | null | undefined, V | undefined] | null | undefined, value?: V): [OptNode<BSTNode<K, V>>, V | undefined];
|
|
437
389
|
/**
|
|
438
|
-
*
|
|
439
|
-
*
|
|
390
|
+
* (Protected) Sets the root node and clears its parent reference.
|
|
391
|
+
* @remarks Time O(1)
|
|
440
392
|
*
|
|
441
|
-
*
|
|
442
|
-
* root.
|
|
443
|
-
* @param {OptNode<BSTNode<K, V>>} v - v is a parameter of type BSTNode<K, V> or undefined.
|
|
393
|
+
* @param v - The node to set as root.
|
|
444
394
|
*/
|
|
445
395
|
protected _setRoot(v: OptNode<BSTNode<K, V>>): void;
|
|
446
396
|
/**
|
|
447
|
-
*
|
|
448
|
-
*
|
|
397
|
+
* (Protected) Compares two keys using the tree's comparator and reverse setting.
|
|
398
|
+
* @remarks Time O(1) (or O(C) if `specifyComparable` is used).
|
|
449
399
|
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
* @
|
|
453
|
-
* `_compare` method.
|
|
454
|
-
* @param {K} b - The parameter `b` in the `_compare` function is of type `K`.
|
|
455
|
-
* @returns The `_compare` method is returning the result of the ternary expression. If `_isReverse`
|
|
456
|
-
* is true, it returns the negation of the result of calling the `_comparator` function with
|
|
457
|
-
* arguments `a` and `b`. If `_isReverse` is false, it returns the result of calling the
|
|
458
|
-
* `_comparator` function with arguments `a` and `b`.
|
|
400
|
+
* @param a - The first key.
|
|
401
|
+
* @param b - The second key.
|
|
402
|
+
* @returns A number (1, -1, or 0) representing the comparison.
|
|
459
403
|
*/
|
|
460
404
|
protected _compare(a: K, b: K): number;
|
|
405
|
+
/**
|
|
406
|
+
* (Private) Deletes a node by its key.
|
|
407
|
+
* @remarks Standard BST deletion algorithm. Time O(log N), O(N) worst-case. Space O(1).
|
|
408
|
+
*
|
|
409
|
+
* @param key - The key of the node to delete.
|
|
410
|
+
* @returns True if the node was found and deleted, false otherwise.
|
|
411
|
+
*/
|
|
412
|
+
private _deleteByKey;
|
|
461
413
|
}
|