Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IArrayContainer<T, SourceT, IteratorT, ReverseT, PElem>

Common interface for array containers.

author

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

Type parameters

  • T: PElem

    Stored elements' type

  • SourceT: IArrayContainer<T, SourceT, IteratorT, ReverseT, T>

    Derived type extending this IArrayContainer

  • IteratorT: Iterator<T, SourceT, IteratorT, ReverseT, T>

    Iterator type

  • ReverseT: ReverseIterator<T, SourceT, IteratorT, ReverseT, T>

    Reverse iterator type

  • PElem = T

    Parent type of T, used for inserting elements through assign and insert.

Hierarchy

Implemented by

Index

Type aliases

Iterator

Iterator<T, SourceT, IteratorT, ReverseT, ElemT>: Iterator<T, SourceT, IteratorT, ReverseT, ElemT>

Iterator of ILinearContainer

author

Jenogho Nam http://samchon.org

Type parameters

  • T: ElemT

  • SourceT: ILinearContainer<T, SourceT, IteratorT, ReverseT, T>

  • IteratorT: ILinearContainer.Iterator<T, SourceT, IteratorT, ReverseT, T>

  • ReverseT: ILinearContainer.ReverseIterator<T, SourceT, IteratorT, ReverseT, T>

  • ElemT = T

ReverseIterator

ReverseIterator<T, SourceT, IteratorT, ReverseT, ElemT>: ReverseIterator<T, SourceT, IteratorT, ReverseT, ElemT>

Reverse iterator of ILinearContainer

author

Jenogho Nam http://samchon.org

Type parameters

  • T: ElemT

  • SourceT: ILinearContainer<T, SourceT, IteratorT, ReverseT, T>

  • IteratorT: ILinearContainer.Iterator<T, SourceT, IteratorT, ReverseT, T>

  • ReverseT: ILinearContainer.ReverseIterator<T, SourceT, IteratorT, ReverseT, T>

  • ElemT = T

Methods

[Symbol.iterator]

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

assign

  • assign(n: number, val: T): void
  • assign<InputIterator>(first: InputIterator, last: InputIterator): void

at

  • at(index: number): T

back

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

begin

  • begin(): IteratorT

clear

  • clear(): void

empty

  • empty(): boolean

end

  • end(): IteratorT

erase

  • erase(pos: IteratorT): IteratorT
  • erase(first: IteratorT, last: IteratorT): IteratorT
  • Erase an element.

    Parameters

    • pos: IteratorT

      Position to erase.

    Returns IteratorT

    Iterator following the pos, strained by the erasing.

  • Erase elements in range.

    Parameters

    • first: IteratorT

      Range of the first position to erase.

    • last: IteratorT

      Rangee of the last position to erase.

    Returns IteratorT

    Iterator following the last removed element, strained by the erasing.

front

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

insert

  • insert(pos: IteratorT, val: T): IteratorT
  • insert(pos: IteratorT, n: number, val: T): IteratorT
  • insert<InputIterator>(pos: IteratorT, first: InputIterator, last: InputIterator): IteratorT
  • Insert a single element.

    Parameters

    • pos: IteratorT

      Position to insert.

    • val: T

      Value to insert.

    Returns IteratorT

    An iterator to the newly inserted element.

  • Insert repeated elements.

    Parameters

    • pos: IteratorT

      Position to insert.

    • n: number

      Number of elements to insert.

    • val: T

      Value to insert repeatedly.

    Returns IteratorT

    An iterator to the first of the newly inserted elements.

  • Insert range elements.

    Type parameters

    Parameters

    • pos: IteratorT

      Position to insert.

    • first: InputIterator

      Input iterator of the first position.

    • last: InputIterator

      Input iteartor of the last position.

    Returns IteratorT

    An iterator to the first of the newly inserted elements.

nth

  • nth(index: number): IteratorT

pop_back

  • pop_back(): void

push

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

push_back

  • push_back(val: T): void

rbegin

  • rbegin(): ReverseT

rend

  • rend(): ReverseT

resize

  • resize(n: number): void

set

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

size

  • size(): number

swap

  • swap(obj: SourceT): void

toJSON

  • toJSON(): Array<T>

Generated using TypeDoc