Node
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
children: * |
|
public |
Each node has two other attributes. |
|
public |
The boolean-valued attribute x.mark indicates whether node x has lost a child since the last time x was made the child of another node. |
|
public |
next: * |
|
public |
parent: * As Figure 19.2(b) shows, each node x contains a pointer x.p to its parent and a pointer x.child to any one of its children. |
|
public |
prev: * |
|
public |
value: * |
Public Constructors
public constructor() source
Public Members
public children: * source
public degree: number source
Each node has two other attributes. We store the number of children in the child list of node x in x.degree.
public mark: boolean source
The boolean-valued attribute x.mark indicates whether node x has lost a child since the last time x was made the child of another node. Newly created nodes are unmarked, and a node x becomes unmarked whenever it is made the child of another node. Until we look at the DECREASE-KEY operation in Section 19.3, we will just set all mark attributes to FALSE .
public next: * source
public parent: * source
As Figure 19.2(b) shows, each node x contains a pointer x.p to its parent and a pointer x.child to any one of its children. The children of x are linked together in a circular, doubly linked list, which we call the child list of x. Each child y in a child list has pointers y.left and y.right that point to y’s left and right siblings, respectively. If node y is an only child, then y.left = y.right = y. Siblings may appear in a child list in any order.