graph-typed 1.54.0 → 1.54.1
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/binary-tree/avl-tree-counter.d.ts +213 -0
- package/dist/data-structures/binary-tree/avl-tree-counter.js +407 -0
- package/dist/data-structures/binary-tree/avl-tree-multi-map.d.ts +71 -177
- package/dist/data-structures/binary-tree/avl-tree-multi-map.js +135 -340
- package/dist/data-structures/binary-tree/avl-tree.d.ts +102 -57
- package/dist/data-structures/binary-tree/avl-tree.js +110 -47
- package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +3 -0
- package/dist/data-structures/binary-tree/binary-indexed-tree.js +3 -0
- package/dist/data-structures/binary-tree/binary-tree.d.ts +240 -190
- package/dist/data-structures/binary-tree/binary-tree.js +269 -240
- package/dist/data-structures/binary-tree/bst.d.ts +145 -112
- package/dist/data-structures/binary-tree/bst.js +180 -129
- package/dist/data-structures/binary-tree/index.d.ts +2 -0
- package/dist/data-structures/binary-tree/index.js +2 -0
- package/dist/data-structures/binary-tree/red-black-tree.d.ts +100 -82
- package/dist/data-structures/binary-tree/red-black-tree.js +115 -79
- package/dist/data-structures/binary-tree/tree-counter.d.ts +212 -0
- package/dist/data-structures/binary-tree/tree-counter.js +444 -0
- package/dist/data-structures/binary-tree/tree-multi-map.d.ts +78 -174
- package/dist/data-structures/binary-tree/tree-multi-map.js +142 -377
- package/dist/data-structures/graph/directed-graph.d.ts +3 -0
- package/dist/data-structures/graph/directed-graph.js +3 -0
- package/dist/data-structures/graph/map-graph.d.ts +3 -0
- package/dist/data-structures/graph/map-graph.js +3 -0
- package/dist/data-structures/graph/undirected-graph.d.ts +3 -0
- package/dist/data-structures/graph/undirected-graph.js +3 -0
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +3 -0
- package/dist/data-structures/linked-list/singly-linked-list.js +3 -0
- package/dist/data-structures/linked-list/skip-linked-list.d.ts +3 -0
- package/dist/data-structures/linked-list/skip-linked-list.js +3 -0
- package/dist/data-structures/matrix/matrix.d.ts +3 -0
- package/dist/data-structures/matrix/matrix.js +3 -0
- package/dist/data-structures/matrix/navigator.d.ts +3 -0
- package/dist/data-structures/matrix/navigator.js +3 -0
- package/dist/data-structures/priority-queue/max-priority-queue.d.ts +3 -0
- package/dist/data-structures/priority-queue/max-priority-queue.js +3 -0
- package/dist/data-structures/priority-queue/min-priority-queue.d.ts +3 -0
- package/dist/data-structures/priority-queue/min-priority-queue.js +3 -0
- package/dist/data-structures/trie/trie.d.ts +0 -4
- package/dist/data-structures/trie/trie.js +0 -4
- package/dist/interfaces/binary-tree.d.ts +8 -8
- package/dist/types/data-structures/binary-tree/avl-tree-counter.d.ts +2 -0
- package/dist/types/data-structures/binary-tree/avl-tree-counter.js +2 -0
- package/dist/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +1 -4
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +0 -3
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +0 -3
- package/dist/types/data-structures/binary-tree/bst.d.ts +3 -3
- package/dist/types/data-structures/binary-tree/index.d.ts +2 -0
- package/dist/types/data-structures/binary-tree/index.js +2 -0
- package/dist/types/data-structures/binary-tree/rb-tree.d.ts +1 -4
- package/dist/types/data-structures/binary-tree/tree-counter.d.ts +2 -0
- package/dist/types/data-structures/binary-tree/tree-counter.js +2 -0
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +1 -4
- package/package.json +2 -2
- package/src/data-structures/binary-tree/avl-tree-counter.ts +463 -0
- package/src/data-structures/binary-tree/avl-tree-multi-map.ts +155 -393
- package/src/data-structures/binary-tree/avl-tree.ts +144 -93
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +3 -0
- package/src/data-structures/binary-tree/binary-tree.ts +433 -405
- package/src/data-structures/binary-tree/bst.ts +261 -239
- package/src/data-structures/binary-tree/index.ts +2 -0
- package/src/data-structures/binary-tree/red-black-tree.ts +163 -134
- package/src/data-structures/binary-tree/tree-counter.ts +504 -0
- package/src/data-structures/binary-tree/tree-multi-map.ts +161 -429
- package/src/data-structures/graph/directed-graph.ts +3 -0
- package/src/data-structures/graph/map-graph.ts +3 -0
- package/src/data-structures/graph/undirected-graph.ts +3 -0
- package/src/data-structures/linked-list/singly-linked-list.ts +3 -0
- package/src/data-structures/linked-list/skip-linked-list.ts +3 -0
- package/src/data-structures/matrix/matrix.ts +3 -0
- package/src/data-structures/matrix/navigator.ts +3 -0
- package/src/data-structures/priority-queue/max-priority-queue.ts +3 -0
- package/src/data-structures/priority-queue/min-priority-queue.ts +3 -0
- package/src/data-structures/trie/trie.ts +0 -4
- package/src/interfaces/binary-tree.ts +10 -24
- package/src/types/data-structures/binary-tree/avl-tree-counter.ts +3 -0
- package/src/types/data-structures/binary-tree/avl-tree-multi-map.ts +1 -6
- package/src/types/data-structures/binary-tree/avl-tree.ts +0 -5
- package/src/types/data-structures/binary-tree/binary-tree.ts +0 -5
- package/src/types/data-structures/binary-tree/bst.ts +5 -5
- package/src/types/data-structures/binary-tree/index.ts +2 -0
- package/src/types/data-structures/binary-tree/rb-tree.ts +1 -6
- package/src/types/data-structures/binary-tree/tree-counter.ts +3 -0
- package/src/types/data-structures/binary-tree/tree-multi-map.ts +1 -6
|
@@ -5,202 +5,96 @@
|
|
|
5
5
|
* @copyright Copyright (c) 2022 Pablo Zeng <zrwusa@gmail.com>
|
|
6
6
|
* @license MIT License
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
9
|
-
import { IBinaryTree } from '../../interfaces';
|
|
8
|
+
import { AVLTreeMultiMapOptions, BTNRep, OptNodeOrNull } from '../../types';
|
|
10
9
|
import { AVLTree, AVLTreeNode } from './avl-tree';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @param {
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
constructor(key: K, value
|
|
10
|
+
import { IBinaryTree } from '../../interfaces';
|
|
11
|
+
export declare class AVLTreeMultiMapNode<K = any, V = any> extends AVLTreeNode<K, V[]> {
|
|
12
|
+
/**
|
|
13
|
+
* This TypeScript constructor initializes an object with a key of type K and an array of values of
|
|
14
|
+
* type V.
|
|
15
|
+
* @param {K} key - The `key` parameter is typically used to store a unique identifier or key for the
|
|
16
|
+
* data being stored in the data structure. It helps in quickly accessing or retrieving the
|
|
17
|
+
* associated value in the data structure.
|
|
18
|
+
* @param {V[]} value - The `value` parameter in the constructor represents an array of values of
|
|
19
|
+
* type `V`.
|
|
20
|
+
*/
|
|
21
|
+
constructor(key: K, value: V[]);
|
|
22
|
+
parent?: AVLTreeMultiMapNode<K, V>;
|
|
23
|
+
_left?: OptNodeOrNull<AVLTreeMultiMapNode<K, V>>;
|
|
24
|
+
get left(): OptNodeOrNull<AVLTreeMultiMapNode<K, V>>;
|
|
25
|
+
set left(v: OptNodeOrNull<AVLTreeMultiMapNode<K, V>>);
|
|
26
|
+
_right?: OptNodeOrNull<AVLTreeMultiMapNode<K, V>>;
|
|
27
|
+
get right(): OptNodeOrNull<AVLTreeMultiMapNode<K, V>>;
|
|
28
|
+
set right(v: OptNodeOrNull<AVLTreeMultiMapNode<K, V>>);
|
|
23
29
|
}
|
|
24
30
|
/**
|
|
25
|
-
*
|
|
31
|
+
*
|
|
26
32
|
*/
|
|
27
|
-
export declare class AVLTreeMultiMap<K = any, V = any, R = object, MK = any, MV = any, MR = object
|
|
33
|
+
export declare class AVLTreeMultiMap<K = any, V = any, R = object, MK = any, MV = any, MR = object> extends AVLTree<K, V[], R, MK, MV[], MR> implements IBinaryTree<K, V[], R, MK, MV, MR> {
|
|
28
34
|
/**
|
|
29
|
-
* The constructor initializes
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
+
* The constructor initializes an AVLTreeMultiMap with the provided keys, nodes, entries, or raw data
|
|
36
|
+
* and options.
|
|
37
|
+
* @param keysNodesEntriesOrRaws - The `keysNodesEntriesOrRaws` parameter in the constructor is an
|
|
38
|
+
* iterable that can contain either key-value pairs represented as `BTNRep<K, V[],
|
|
39
|
+
* AVLTreeMultiMapNode<K, V>>` or raw data represented as `R`. This parameter is used to initialize
|
|
40
|
+
* the AVLTreeMulti
|
|
41
|
+
* @param [options] - The `options` parameter in the constructor is of type
|
|
42
|
+
* `AVLTreeMultiMapOptions<K, V[], R>`. It is an optional parameter that allows you to specify
|
|
43
|
+
* additional options for configuring the AVLTreeMultiMap instance.
|
|
35
44
|
*/
|
|
36
|
-
constructor(keysNodesEntriesOrRaws?: Iterable<
|
|
37
|
-
protected _count: number;
|
|
45
|
+
constructor(keysNodesEntriesOrRaws?: Iterable<BTNRep<K, V[], AVLTreeMultiMapNode<K, V>> | R>, options?: AVLTreeMultiMapOptions<K, V[], R>);
|
|
38
46
|
/**
|
|
39
|
-
*
|
|
40
|
-
* search.
|
|
41
|
-
* @returns the sum of the count property of all nodes in the tree.
|
|
42
|
-
*/
|
|
43
|
-
get count(): number;
|
|
44
|
-
/**
|
|
45
|
-
* Time Complexity: O(n)
|
|
46
|
-
* Space Complexity: O(1)
|
|
47
|
-
*
|
|
48
|
-
* The function calculates the sum of the count property of all nodes in a tree using depth-first
|
|
49
|
-
* search.
|
|
50
|
-
* @returns the sum of the count property of all nodes in the tree.
|
|
51
|
-
*/
|
|
52
|
-
getComputedCount(): number;
|
|
53
|
-
/**
|
|
54
|
-
* The function creates a new AVLTreeMultiMapNode with the specified key, value, and count.
|
|
55
|
-
* @param {K} key - The key parameter represents the key of the node being created. It is of type K,
|
|
56
|
-
* which is a generic type that can be replaced with any specific type when using the function.
|
|
57
|
-
* @param {V} [value] - The `value` parameter is an optional parameter that represents the value
|
|
58
|
-
* associated with the key in the node. It is of type `V`, which can be any data type.
|
|
59
|
-
* @param {number} [count] - The `count` parameter represents the number of occurrences of a
|
|
60
|
-
* key-value pair in the AVLTreeMultiMapNode. It is an optional parameter, so it can be omitted when
|
|
61
|
-
* calling the `createNode` method. If provided, it specifies the initial count for the node.
|
|
62
|
-
* @returns a new instance of the AVLTreeMultiMapNode class, casted as NODE.
|
|
63
|
-
*/
|
|
64
|
-
createNode(key: K, value?: V, count?: number): NODE;
|
|
65
|
-
/**
|
|
66
|
-
* The function creates a new AVLTreeMultiMap object with the specified options and returns it.
|
|
67
|
-
* @param [options] - The `options` parameter is an optional object that contains additional
|
|
68
|
-
* configuration options for creating the AVLTreeMultiMap. It can have the following properties:
|
|
69
|
-
* @returns a new instance of the AVLTreeMultiMap class, with the specified options, as a TREE
|
|
70
|
-
* object.
|
|
71
|
-
*/
|
|
72
|
-
createTree(options?: AVLTreeMultiMapOptions<K, V, R>): TREE;
|
|
73
|
-
/**
|
|
74
|
-
* The function checks if the input is an instance of AVLTreeMultiMapNode.
|
|
75
|
-
* @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The parameter
|
|
76
|
-
* `keyNodeEntryOrRaw` can be of type `R` or `BTNRep<K, V, NODE>`.
|
|
77
|
-
* @returns a boolean value indicating whether the input parameter `keyNodeEntryOrRaw` is
|
|
78
|
-
* an instance of the `AVLTreeMultiMapNode` class.
|
|
79
|
-
*/
|
|
80
|
-
isNode(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R): keyNodeEntryOrRaw is NODE;
|
|
81
|
-
/**
|
|
82
|
-
* Time Complexity: O(log n)
|
|
83
|
-
* Space Complexity: O(1)
|
|
84
|
-
*
|
|
85
|
-
* The function overrides the add method of a TypeScript class to add a new node to a data structure
|
|
86
|
-
* and update the count.
|
|
87
|
-
* @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The
|
|
88
|
-
* `keyNodeEntryOrRaw` parameter can accept a value of type `R`, which can be any type. It
|
|
89
|
-
* can also accept a value of type `BTNRep<K, V, NODE>`, which represents a key, node,
|
|
90
|
-
* entry, or raw element
|
|
91
|
-
* @param {V} [value] - The `value` parameter represents the value associated with the key in the
|
|
92
|
-
* data structure. It is an optional parameter, so it can be omitted if not needed.
|
|
93
|
-
* @param [count=1] - The `count` parameter represents the number of times the key-value pair should
|
|
94
|
-
* be added to the data structure. By default, it is set to 1, meaning that the key-value pair will
|
|
95
|
-
* be added once. However, you can specify a different value for `count` if you want to add
|
|
96
|
-
* @returns a boolean value.
|
|
97
|
-
*/
|
|
98
|
-
add(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R, value?: V, count?: number): boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Time Complexity: O(log n)
|
|
47
|
+
* Time Complexity: O(1)
|
|
101
48
|
* Space Complexity: O(1)
|
|
102
49
|
*
|
|
103
|
-
* The function
|
|
104
|
-
*
|
|
105
|
-
* @param
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* boolean flag that determines whether to ignore the count of the node being deleted. If
|
|
111
|
-
* `ignoreCount` is set to `true`, the method will delete the node regardless of its count. If
|
|
112
|
-
* `ignoreCount` is set to
|
|
113
|
-
* @returns The `delete` method overrides the default delete behavior in a binary tree data
|
|
114
|
-
* structure. It takes a predicate or node to be deleted and an optional flag to ignore count. The
|
|
115
|
-
* method returns an array of `BinaryTreeDeleteResult` objects, each containing information about the
|
|
116
|
-
* deleted node and whether balancing is needed in the tree.
|
|
50
|
+
* The function `createTree` in TypeScript overrides the creation of an AVLTreeMultiMap with
|
|
51
|
+
* specified options.
|
|
52
|
+
* @param [options] - The `options` parameter in the `createTree` function is of type
|
|
53
|
+
* `AVLTreeMultiMapOptions<K, V[], R>`. This means it is an object that can have properties of type
|
|
54
|
+
* `K`, `V[]`, and `R`. The function creates a new `AVL
|
|
55
|
+
* @returns The `createTree` method is returning a new instance of `AVLTreeMultiMap` with the
|
|
56
|
+
* provided options.
|
|
117
57
|
*/
|
|
118
|
-
|
|
58
|
+
createTree(options?: AVLTreeMultiMapOptions<K, V[], R>): AVLTreeMultiMap<K, V, R, MK, MV, MR>;
|
|
119
59
|
/**
|
|
120
60
|
* Time Complexity: O(1)
|
|
121
61
|
* Space Complexity: O(1)
|
|
122
62
|
*
|
|
123
|
-
* The
|
|
124
|
-
*
|
|
63
|
+
* The function `createNode` overrides the method to create a new AVLTreeMultiMapNode with a
|
|
64
|
+
* specified key and an empty array of values.
|
|
65
|
+
* @param {K} key - The `key` parameter in the `createNode` method represents the key of the node
|
|
66
|
+
* that will be created in the AVLTreeMultiMap.
|
|
67
|
+
* @returns An AVLTreeMultiMapNode object is being returned, initialized with the provided key and an
|
|
68
|
+
* empty array.
|
|
125
69
|
*/
|
|
126
|
-
|
|
70
|
+
createNode(key: K): AVLTreeMultiMapNode<K, V>;
|
|
71
|
+
add(node: BTNRep<K, V[], AVLTreeMultiMapNode<K, V>>): boolean;
|
|
72
|
+
add(key: K, value: V): boolean;
|
|
127
73
|
/**
|
|
128
|
-
* Time Complexity: O(
|
|
74
|
+
* Time Complexity: O(log n)
|
|
129
75
|
* Space Complexity: O(log n)
|
|
130
|
-
* The `perfectlyBalance` function takes a sorted array of nodes and builds a balanced binary search
|
|
131
|
-
* tree using either a recursive or iterative approach.
|
|
132
|
-
* @param {IterationType} iterationType - The `iterationType` parameter is an optional parameter that
|
|
133
|
-
* specifies the type of iteration to use when building the balanced binary search tree. It has a
|
|
134
|
-
* default value of `this.iterationType`, which means it will use the iteration type currently set in
|
|
135
|
-
* the object.
|
|
136
|
-
* @returns The function `perfectlyBalance` returns a boolean value. It returns `true` if the
|
|
137
|
-
* balancing operation is successful, and `false` if there are no nodes to balance.
|
|
138
|
-
*/
|
|
139
|
-
perfectlyBalance(iterationType?: IterationType): boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Time complexity: O(n)
|
|
142
|
-
* Space complexity: O(n)
|
|
143
|
-
*
|
|
144
|
-
* The function overrides the clone method to create a deep copy of a tree object.
|
|
145
|
-
* @returns The `clone()` method is returning a cloned instance of the `TREE` object.
|
|
146
|
-
*/
|
|
147
|
-
clone(): TREE;
|
|
148
|
-
/**
|
|
149
|
-
* The `map` function in TypeScript overrides the default behavior to create a new AVLTreeMultiMap
|
|
150
|
-
* with modified entries based on a provided callback.
|
|
151
|
-
* @param callback - The `callback` parameter is a function that will be called for each entry in the
|
|
152
|
-
* AVLTreeMultiMap. It takes four arguments:
|
|
153
|
-
* @param [options] - The `options` parameter in the `override map` function is of type
|
|
154
|
-
* `AVLTreeMultiMapOptions<MK, MV, MR>`. This parameter allows you to provide additional
|
|
155
|
-
* configuration options when creating a new `AVLTreeMultiMap` instance within the `map` function.
|
|
156
|
-
* These options
|
|
157
|
-
* @param {any} [thisArg] - The `thisArg` parameter in the `override map` function is used to specify
|
|
158
|
-
* the value of `this` when executing the `callback` function. It allows you to set the context
|
|
159
|
-
* (value of `this`) for the callback function. This can be useful when you want to access properties
|
|
160
|
-
* or
|
|
161
|
-
* @returns The `map` method is returning a new `AVLTreeMultiMap` instance with the entries
|
|
162
|
-
* transformed by the provided `callback` function. Each entry in the original tree is passed to the
|
|
163
|
-
* `callback` function along with the index and the original tree itself. The transformed entries are
|
|
164
|
-
* then added to the new `AVLTreeMultiMap` instance, which is returned at the end.
|
|
165
|
-
*/
|
|
166
|
-
map<MK, MV, MR>(callback: EntryCallback<K, V | undefined, [MK, MV]>, options?: AVLTreeMultiMapOptions<MK, MV, MR>, thisArg?: any): AVLTreeMultiMap<MK, MV, MR>;
|
|
167
|
-
/**
|
|
168
|
-
* The function `keyValueNodeEntryRawToNodeAndValue` converts a key, value, entry, or raw element into
|
|
169
|
-
* a node object.
|
|
170
|
-
* @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The
|
|
171
|
-
* `keyNodeEntryOrRaw` parameter can be of type `R` or `BTNRep<K, V, NODE>`.
|
|
172
|
-
* @param {V} [value] - The `value` parameter is an optional value that can be passed to the
|
|
173
|
-
* `override` function. It represents the value associated with the key in the data structure. If no
|
|
174
|
-
* value is provided, it will default to `undefined`.
|
|
175
|
-
* @param [count=1] - The `count` parameter is an optional parameter that specifies the number of
|
|
176
|
-
* times the key-value pair should be added to the data structure. If not provided, it defaults to 1.
|
|
177
|
-
* @returns either a NODE object or undefined.
|
|
178
|
-
*/
|
|
179
|
-
protected _keyValueNodeEntryRawToNodeAndValue(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R, value?: V, count?: number): [NODE | undefined, V | undefined];
|
|
180
|
-
/**
|
|
181
|
-
* Time Complexity: O(1)
|
|
182
|
-
* Space Complexity: O(1)
|
|
183
76
|
*
|
|
184
|
-
* The `
|
|
185
|
-
*
|
|
186
|
-
* @param {
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
|
|
193
|
-
|
|
77
|
+
* The function `deleteValue` removes a specific value from a key in an AVLTreeMultiMap data
|
|
78
|
+
* structure and deletes the entire node if no values are left for that key.
|
|
79
|
+
* @param {BTNRep<K, V[], AVLTreeMultiMapNode<K, V>> | K} keyNodeOrEntry - The `keyNodeOrEntry`
|
|
80
|
+
* parameter in the `deleteValue` function can be either a `BTNRep` object representing a key-value
|
|
81
|
+
* pair in the AVLTreeMultiMapNode, or just the key itself.
|
|
82
|
+
* @param {V} value - The `value` parameter in the `deleteValue` function represents the specific
|
|
83
|
+
* value that you want to delete from the multi-map data structure associated with a particular key.
|
|
84
|
+
* The function checks if the value exists in the array of values associated with the key, and if
|
|
85
|
+
* found, removes it from the array.
|
|
86
|
+
* @returns The `deleteValue` function returns a boolean value. It returns `true` if the specified
|
|
87
|
+
* `value` was successfully deleted from the array of values associated with the `keyNodeOrEntry`. If
|
|
88
|
+
* the value was not found in the array, it returns `false`.
|
|
89
|
+
*/
|
|
90
|
+
deleteValue(keyNodeOrEntry: BTNRep<K, V[], AVLTreeMultiMapNode<K, V>> | K, value: V): boolean;
|
|
194
91
|
/**
|
|
195
|
-
* Time Complexity: O(
|
|
196
|
-
* Space Complexity: O(
|
|
92
|
+
* Time Complexity: O(n)
|
|
93
|
+
* Space Complexity: O(n)
|
|
197
94
|
*
|
|
198
|
-
* The function
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
* @param {NODE} newNode - The `newNode` parameter is an instance of the `NODE` class.
|
|
202
|
-
* @returns The method is returning the result of calling the `_replaceNode` method from the
|
|
203
|
-
* superclass, which is of type `NODE`.
|
|
95
|
+
* The function `clone` overrides the default cloning behavior to create a deep copy of a tree
|
|
96
|
+
* structure.
|
|
97
|
+
* @returns A cloned tree object is being returned.
|
|
204
98
|
*/
|
|
205
|
-
|
|
99
|
+
clone(): AVLTreeMultiMap<K, V, R, MK, MV, MR>;
|
|
206
100
|
}
|