Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Vector<T>

Vector, an array with variable capacity.

author

Jeongho Nam - https://github.com/samchon

Type parameters

  • T

Hierarchy

Implements

Index

Type aliases

Static Iterator

Iterator<T>: ArrayIterator<T, Vector<T>>

Iterator of Vector

Type parameters

  • T

Static ReverseIterator

ReverseIterator<T>: ArrayReverseIterator<T, Vector<T>>

Reverse iterator of Vector

Type parameters

  • T

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<T>

assign

  • assign(n: number, val: T): void
  • assign<InputIterator>(begin: InputIterator, end: InputIterator): void

at

  • at(index: number): T

back

  • back(): T
  • back(val: T): void

begin

clear

  • clear(): void

data

  • data(): Array<T>

empty

  • empty(): boolean

end

equals

  • equals(obj: Vector<T>): boolean

erase

front

  • front(): T
  • front(val: T): void

insert

nth

pop_back

  • pop_back(): void

push

  • push(...items: T[]): number

push_back

  • push_back(val: T): void

rbegin

rend

resize

  • resize(n: number): void

set

  • set(index: number, val: T): void

size

  • size(): number

swap

toJSON

  • toJSON(): Array<T>

Static wrap

  • wrap<T>(data: Array<T>): Vector<T>
  • Wrap an array into a vector.

    Type parameters

    • T

    Parameters

    • data: Array<T>

      Target array to be wrapped

    Returns Vector<T>

    A vector wrapping the parametric array.

Generated using TypeDoc