Class AVLTreeMultiMapNode<K, V, NODE>

Represents a node in a binary tree.

Type Parameters

  • K = any

  • V = any

    The type of data stored in the node.

  • NODE extends AVLTreeMultiMapNode<K, V, NODE> = AVLTreeMultiMapNodeNested<K, V>

    The type of the family relationship in the binary tree.

Hierarchy

Constructors

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

    Type Parameters

    Parameters

    • key: K

      The key parameter is of type K and represents the unique identifier of the binary tree node.

    • Optional value: V

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

    • Optional count: number = 1

      The count parameter is a number that represents the number of times a particular value occurs in a binary tree node. It has a default value of 1, which means that if no value is provided for the count parameter when creating a new instance of the BinaryTreeNode class.

    Returns AVLTreeMultiMapNode<K, V, NODE>

Accessors

  • get count(): number
  • The function returns the value of the protected variable _count.

    Returns number

    The count property of the object, which is of type number.

  • set count(value): void
  • The above function sets the value of the count property.

    Parameters

    • value: number

      The value parameter is of type number, which means it can accept any numeric value.

    Returns void

  • get familyPosition(): FamilyPosition
  • Get the position of the node within its family.

    Returns FamilyPosition

    • The family position of the node.
  • get height(): number
  • The function returns the value of the height property.

    Returns number

    The height of the object.

  • set height(value): void
  • The above function sets the value of the height property.

    Parameters

    • value: number

      The value parameter is a number that represents the new height value to be set.

    Returns void

  • get left(): undefined | NODE
  • The function returns the value of the _left property.

    Returns undefined | NODE

    The _left property of the current object is being returned.

  • set left(v): void
  • The function sets the left child of a node and updates the parent reference of the child.

    Parameters

    • v: undefined | NODE

      The parameter v is of type NODE | undefined. It can either be an instance of the NODE class or undefined.

    Returns void

  • get right(): undefined | NODE
  • The function returns the right node of a binary tree or undefined if there is no right node.

    Returns undefined | NODE

    The method is returning the value of the _right property, which is of type NODE or undefined.

  • set right(v): void
  • The function sets the right child of a node and updates the parent reference of the child.

    Parameters

    • v: undefined | NODE

      The parameter v is of type NODE | undefined. It can either be a NODE object or undefined.

    Returns void

Generated using TypeDoc