Type alias SegTreeInner<T>

SegTreeInner<T>: {
    actualLen: number;
    items: T[];
    monoid: Monoid<T>;
    srcLen: number;
}

Type Parameters

  • T

Type declaration

  • actualLen: number

    The number of the actual stored items, or capacity. Primary data are stored from items[size - 1] to items[size - 1 + srcLen].

  • items: T[]

    Tree of items calculated by monoid.combine. It defaults to monoid.identity.

    At the element of index, the relationships are:

    • Parent: Math.floor((index - 1) / 2),
    • First child: index * 2 + 1,
    • Second child: index * 2 + 2.
  • monoid: Monoid<T>

    The Monoid instance for T.

  • srcLen: number

    The length of source array.

Generated using TypeDoc