Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PriorityQueue<T>

Priority Queue; Greater Out First.

author

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

Type parameters

  • T

Hierarchy

Implements

  • IEmpty
  • ISize
  • IPush<T>

Index

Constructors

Methods

Constructors

constructor

  • Default Constructor.

    Parameters

    • Optional comp: Comparator<T>

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Note that, because equality is predicated by !comp(x, y) && !comp(y, x), the function must not cover the equality like <= or >=. It must exclude the equality like < or >. Default is less.

    Returns PriorityQueue

  • Copy Constructor.

    Parameters

    Returns PriorityQueue

  • Range Constructor.

    Parameters

    • first: Readonly<IForwardIterator<T>>

      Input iterator of the first position.

    • last: Readonly<IForwardIterator<T>>

      Input iterator of the last position.

    • Optional comp: Comparator<T>

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Note that, because equality is predicated by !comp(x, y) && !comp(y, x), the function must not cover the equality like <= or >=. It must exclude the equality like < or >. Default is less.

    Returns PriorityQueue

Methods

empty

  • empty(): boolean

pop

  • pop(): void

push

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

size

  • size(): number

swap

top

  • top(): T

value_comp

  • value_comp(): Comparator<T>

Generated using TypeDoc