Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TreeMultiSet<Key>

Multiple-key Set based on Tree.

author

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

Type parameters

  • Key

Hierarchy

Implements

Index

Constructors

constructor

  • Default Constructor.

    Parameters

    • Optional comp: Comparator<Key>

      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 TreeMultiSet

  • Initializer Constructor.

    Parameters

    • items: Key[]

      Items to assign.

    • Optional comp: Comparator<Key>

      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 TreeMultiSet

  • Copy Constructor.

    Parameters

    Returns TreeMultiSet

  • Range Constructor.

    Parameters

    • first: Readonly<IForwardIterator<Key>>

      Input iterator of the first position.

    • last: Readonly<IForwardIterator<Key>>

      Input iterator of the last position.

    • Optional comp: Comparator<Key>

      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 TreeMultiSet

Methods

[Symbol.iterator]

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

assign

  • assign<InputIterator>(first: InputIterator, last: InputIterator): void

begin

  • begin(): TreeMultiSet.Iterator<Key>

clear

  • clear(): void

count

  • count(key: Key): number

empty

  • empty(): boolean

end

  • end(): TreeMultiSet.Iterator<Key>

equal_range

  • equal_range(key: Key): Pair<TreeMultiSet.Iterator<Key>, TreeMultiSet.Iterator<Key>>

erase

  • erase(key: Key): number
  • erase(pos: TreeMultiSet.Iterator<Key>): TreeMultiSet.Iterator<Key>
  • erase(first: TreeMultiSet.Iterator<Key>, last: TreeMultiSet.Iterator<Key>): TreeMultiSet.Iterator<Key>

find

  • find(key: Key): TreeMultiSet.Iterator<Key>

has

  • has(key: Key): boolean

insert

  • insert(key: Key): TreeMultiSet.Iterator<Key>
  • insert(hint: TreeMultiSet.Iterator<Key>, key: Key): TreeMultiSet.Iterator<Key>
  • insert<InputIterator>(begin: InputIterator, end: InputIterator): void

key_comp

  • key_comp(): Comparator<Key>

lower_bound

  • lower_bound(key: Key): TreeMultiSet.Iterator<Key>

merge

push

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

rbegin

  • rbegin(): TreeMultiSet.ReverseIterator<Key>

rend

  • rend(): TreeMultiSet.ReverseIterator<Key>

size

  • size(): number

swap

toJSON

  • toJSON(): Array<Key>

upper_bound

  • upper_bound(key: Key): TreeMultiSet.Iterator<Key>

value_comp

  • value_comp(): Comparator<Key>

Generated using TypeDoc