Class TreeMultiSetNode<T, FAMILY>

Type Parameters

Hierarchy

  • BSTNode<T, FAMILY>
    • TreeMultiSetNode

Implements

Constructors

  • The constructor function initializes a BinaryTreeNode object with an id, value, and count.

    Type Parameters

    Parameters

    • id: number

      The id parameter is of type BinaryTreeNodeId and represents the unique identifier for the binary tree node.

    • Optional val: T

      The val parameter is an optional parameter of type T. It represents the value of the binary tree node. If no value is provided, it will be undefined.

    • Optional count: number

      The count parameter is an optional parameter that represents the number of times the value val appears in the binary tree node. If the count parameter is not provided, it defaults to 1.

    Returns TreeMultiSetNode<T, FAMILY>

Accessors

Methods

  • The function creates a new node in a binary tree with an optional value and count.

    Parameters

    • id: number

      The id parameter is the identifier for the binary tree node. It is used to uniquely identify each node in the tree.

    • Optional val: T

      The val parameter represents the value to be stored in the node. It is an optional parameter, meaning it can be omitted when calling the createNode method.

    • Optional count: number

      The count parameter represents the number of occurrences of the value in the binary tree node. It is an optional parameter, so it can be omitted when calling the createNode method.

    Returns FAMILY

    The method is returning a new instance of the TreeMultiSetNode class, casted as the FAMILY type.

Generated using TypeDoc