Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ForwardList<T>

Singly Linked List.

author

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

Type parameters

  • T

Hierarchy

  • ForwardList

Implements

Index

Constructors

constructor

Methods

[Symbol.iterator]

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

assign

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

    Parameters

    • n: number

      Initial size.

    • val: T

      Value to fill.

    Returns void

  • Range Assigner.

    Type parameters

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    Returns void

before_begin

begin

clear

  • clear(): void

empty

  • empty(): boolean

end

erase_after

front

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

insert_after

  • Insert an element.

    Parameters

    • pos: Iterator<T>

      Position to insert after.

    • val: T

      Value to insert.

    Returns Iterator<T>

    An iterator to the newly inserted element.

  • Inserted repeated elements.

    Parameters

    • pos: Iterator<T>

      Position to insert after.

    • n: number

      Number of elements to insert.

    • val: T

      Value to insert repeatedly.

    Returns Iterator<T>

    An iterator to the last of the newly inserted elements.

  • Insert range elements.

    Type parameters

    Parameters

    • pos: Iterator<T>

      Position to insert after.

    • first: InputIterator

      Input iterator of the first position.

    • last: InputIterator

      Input iteartor of the last position.

    Returns Iterator<T>

    An iterator to the last of the newly inserted elements.

merge

  • merge(from: ForwardList<T>, comp?: Comparator<T>): void

pop_front

  • pop_front(): void

push_front

  • push_front(val: T): void

remove

  • remove(val: T): void

remove_if

  • remove_if(pred: UnaryPredicator<T>): void

reverse

  • reverse(): void

size

  • size(): number

sort

  • sort(comp?: Comparator<T>): void

splice_after

swap

toJSON

  • toJSON(): Array<T>

unique

  • unique(binary_pred?: BinaryPredicator<T>): void

Generated using TypeDoc