The advanced options that can be used to control the construction of a Vector or BigVector

interface VectorOptions {
    initialCapacity?: number;
    initialLength?: number;
    growthFn?: ((current: number) => number);
}

Properties

initialCapacity?: number

The initial capacity of the Vector.

0, unless initialLength is greater.

initialLength?: number

The initial length of the Vector. The initial values are initialized to 0.

0

growthFn?: ((current: number) => number)

This method is called when the Vector needs to be resized to determine how much more memory should be allocated. The default behavior is to grow by a rate of 1.5.

(current: number) => Math.ceil(current * 1.5)