Constructors

Accessors

Constructors

  • The constructor initializes the properties of a SegmentTreeNode object.

    Parameters

    • start: number

      The start parameter represents the starting index of the segment covered by this node in a segment tree.

    • end: number

      The end parameter represents the end index of the segment covered by this node in a segment tree.

    • sum: number

      The sum parameter represents the sum of the values in the range covered by the segment tree node.

    • Optional value: number

      The value parameter is an optional parameter of type SegmentTreeNodeVal. It represents the value associated with the segment tree node.

    Returns SegmentTreeNode

Accessors

  • get end(): number
  • The function returns the value of the protected variable _end.

    Returns number

    The value of the protected property _end.

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

    Parameters

    • value: number

      The value parameter is a number that represents the new value for the end property.

    Returns void

  • get left(): undefined | SegmentTreeNode
  • The function returns the left child of a segment tree node.

    Returns undefined | SegmentTreeNode

    The left property of the SegmentTreeNode object is being returned. It is of type SegmentTreeNode or undefined.

  • set left(value): void
  • The function sets the value of the left property of a SegmentTreeNode object.

    Parameters

    • value: undefined | SegmentTreeNode

      The value parameter is of type SegmentTreeNode or undefined.

    Returns void

  • get right(): undefined | SegmentTreeNode
  • The function returns the right child of a segment tree node.

    Returns undefined | SegmentTreeNode

    The getRight() method is returning a value of type SegmentTreeNode or undefined.

  • set right(value): void
  • The function sets the right child of a segment tree node.

    Parameters

    • value: undefined | SegmentTreeNode

      The value parameter is of type SegmentTreeNode | undefined. This means that it can accept either a SegmentTreeNode object or undefined as its value.

    Returns void

  • get start(): number
  • The function returns the value of the protected variable _start.

    Returns number

    The start value, which is of type number.

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

    Parameters

    • value: number

      The value parameter is of type number.

    Returns void

  • get sum(): number
  • The function returns the value of the sum property.

    Returns number

    The method is returning the value of the variable _sum.

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

    Parameters

    • value: number

      The parameter "value" is of type "number".

    Returns void

  • get value(): undefined | number
  • The function returns the value of a segment tree node.

    Returns undefined | number

    The value being returned is either a SegmentTreeNodeVal object or undefined.

  • set value(value): void
  • The function sets the value of a segment tree node.

    Parameters

    • value: undefined | number

      The value parameter is of type SegmentTreeNodeVal or undefined.

    Returns void

Generated using TypeDoc