Initialize a new Red-Black Tree node with the given values: label: The value associated with this node color: 0 if black, 1 if red parent: The parent to this node left: This node's left child right: This node's right child
(
self,
label: int | None = None,
color: int = 0,
parent: RedBlackTree | None = None,
left: RedBlackTree | None = None,
right: RedBlackTree | None = None,
)
| 18 | """ |
| 19 | |
| 20 | def __init__( |
| 21 | self, |
| 22 | label: int | None = None, |
| 23 | color: int = 0, |
| 24 | parent: RedBlackTree | None = None, |
| 25 | left: RedBlackTree | None = None, |
| 26 | right: RedBlackTree | None = None, |
| 27 | ) -> None: |
| 28 | """Initialize a new Red-Black Tree node with the given values: |
| 29 | label: The value associated with this node |
| 30 | color: 0 if black, 1 if red |
| 31 | parent: The parent to this node |
| 32 | left: This node's left child |
| 33 | right: This node's right child |
| 34 | """ |
| 35 | self.label = label |
| 36 | self.parent = parent |
| 37 | self.left = left |
| 38 | self.right = right |
| 39 | self.color = color |
| 40 | |
| 41 | # Here are functions which are specific to red-black trees |
| 42 |
nothing calls this directly
no outgoing calls
no test coverage detected