Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Vector<T>

Type parameters

  • T

Hierarchy

  • Vector

Indexable

[index: number]: T

Index

Constructors

constructor

  • new Vector(length?: number, fixed?: boolean): Vector

Properties

fixed

fixed: boolean

length

length: number

next

next: T

Methods

concat

copy

get

  • get(index: number): T

indexOf

  • indexOf(x: T, from?: number): number

insertAt

  • insertAt(index: number, element: T): void

join

  • join(sep: string): string

lastIndexOf

  • lastIndexOf(x: T, from?: number): number

pop

  • pop(): null | T

push

  • push(x: T): number

removeAt

  • removeAt(index: number): T

reverse

set

  • set(index: number, value: T): T

shift

  • shift(): null | T

slice

  • slice(pos?: number, end?: number): Vector<T>

sort

  • sort(f: function): void
  • Parameters

    • f: function
        • (a: T, b: T): number
        • Parameters

          • a: T
          • b: T

          Returns number

    Returns void

splice

  • splice(pos: number, len: number): Vector<T>

unshift

  • unshift(x: T): void

Static ofArray

  • ofArray<T>(a: Array<T>): Vector<T>

Generated using TypeDoc