File tree 4 files changed +7
-7
lines changed
4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export {default as predecessor} from './family/predecessor.js';
18
18
export { default as sibling } from './family/sibling.js' ;
19
19
export { default as uncle } from './family/uncle.js' ;
20
20
export { default as insert } from './insertion/insert.js' ;
21
- export { default as insert_case1 } from './insertion/insert_case1 .js' ;
21
+ export { default as insert_case0 } from './insertion/insert_case0 .js' ;
22
22
export { default as insert_case2 } from './insertion/insert_case2.js' ;
23
23
export { default as insert_case3 } from './insertion/insert_case3.js' ;
24
24
export { default as insert_case4 } from './insertion/insert_case4.js' ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import Node from '../types/Node.js';
10
10
* search tree.
11
11
* For our red-black tree, all that is left to do is fix the red-black tree
12
12
* properties in case they have been violated by this insertion. This is fixed
13
- * by {@link insert_case1 }.
13
+ * by {@link insert_case0 }.
14
14
*
15
15
* @param {Function } compare - The comparison function to use.
16
16
* @param {Node } A - The root of the tree.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import insert_case2 from './insert_case2.js';
11
11
*
12
12
* @param {Node } n - The input node.
13
13
*/
14
- const insert_case1 = ( n ) => {
14
+ const insert_case0 = ( n ) => {
15
15
assert ( n instanceof Node ) ;
16
16
assert ( n . _color === RED ) ;
17
17
assert ( n . left . _color === BLACK ) ;
@@ -27,4 +27,4 @@ const insert_case1 = (n) => {
27
27
else insert_case2 ( n ) ;
28
28
} ;
29
29
30
- export default insert_case1 ;
30
+ export default insert_case0 ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import BLACK from '../color/BLACK.js';
4
4
import RED from '../color/RED.js' ;
5
5
import uncle from '../family/uncle.js' ;
6
6
import grandparent from '../family/grandparent.js' ;
7
- import insert_case1 from './insert_case1 .js' ;
7
+ import insert_case0 from './insert_case0 .js' ;
8
8
import insert_case4 from './insert_case4.js' ;
9
9
10
10
/**
@@ -28,7 +28,7 @@ const insert_case3 = (n) => {
28
28
/**
29
29
* If n has a non-leaf uncle and this uncle is red then we simply
30
30
* repaint the parent and the uncle of n in black, the grandparent of
31
- * n in red, then call insert_case1 on n's grandparent.
31
+ * n in red, then call insert_case0 on n's grandparent.
32
32
*
33
33
* B >R
34
34
* / \ / \
@@ -44,7 +44,7 @@ const insert_case3 = (n) => {
44
44
u . _color = BLACK ;
45
45
const g = grandparent ( n ) ;
46
46
g . _color = RED ;
47
- insert_case1 ( g ) ;
47
+ insert_case0 ( g ) ;
48
48
} else insert_case4 ( n ) ;
49
49
} ;
50
50
You can’t perform that action at this time.
0 commit comments