Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UniqueTreeMap<Key, T, Source, IteratorT, ReverseT>

Basic tree map blocking duplicated key.

author

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

Type parameters

  • Key

    Key type

  • T

    Mapped type

  • Source: UniqueTreeMap<Key, T, Source, IteratorT, ReverseT>

    Derived type extending this UniqueTreeMap

  • IteratorT: Iterator<Key, T, Source, IteratorT, ReverseT>

    Iterator type

  • ReverseT: ReverseIterator<Key, T, Source, IteratorT, ReverseT>

    Reverse iterator type

Hierarchy

Implements

Index

Type aliases

Static Iterator

Iterator<Key, T, SourceT, IteratorT, ReverseT>: Iterator<Key, T, true, SourceT, IteratorT, ReverseT>

Iterator of UniqueMap

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • T

  • SourceT: UniqueMap<Key, T, SourceT, IteratorT, ReverseT>

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

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

Static ReverseIterator

ReverseIterator<Key, T, SourceT, IteratorT, ReverseT>: ReverseIterator<Key, T, true, SourceT, IteratorT, ReverseT>

Reverse iterator of UniqueMap

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • T

  • SourceT: UniqueMap<Key, T, SourceT, IteratorT, ReverseT>

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

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

Constructors

Protected constructor

  • new UniqueTreeMap(factory: (thisArg: Source) => ILinearContainerBase<Entry<Key, T>, Source, IteratorT, ReverseT>): UniqueTreeMap

Methods

[Symbol.iterator]

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

assign

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

begin

  • begin(): IteratorT

clear

  • clear(): void

count

  • count(key: Key): number

emplace

  • emplace(key: Key, val: T): Pair<IteratorT, boolean>

emplace_hint

  • emplace_hint(hint: IteratorT, key: Key, val: T): IteratorT

empty

  • empty(): boolean

end

  • end(): IteratorT

equal_range

  • equal_range(key: Key): Pair<IteratorT, IteratorT>

erase

  • erase(key: Key): number
  • erase(it: IteratorT): IteratorT
  • erase(begin: IteratorT, end: IteratorT): IteratorT

extract

  • extract(key: Key): Entry<Key, T>
  • extract(pos: IteratorT): IteratorT

find

  • find(key: Key): IteratorT

get

  • get(key: Key): T

has

  • has(key: Key): boolean

insert

  • insert(pair: IPair<Key, T>): Pair<IteratorT, boolean>
  • insert(hint: IteratorT, pair: IPair<Key, T>): IteratorT
  • insert<InputIterator>(first: InputIterator, last: InputIterator): void
  • Insert an element.

    Parameters

    • pair: IPair<Key, T>

      A tuple to be referenced for the insert.

    Returns Pair<IteratorT, boolean>

    Pair of an iterator to the newly inserted element and true, if the specified key doesn't exist, otherwise Pair of iterator to the ordinary element and false.

  • Insert an element with hint.

    Parameters

    • hint: IteratorT

      Hint for the position where the element can be inserted.

    • pair: IPair<Key, T>

      A tuple to be referenced for the insert.

    Returns IteratorT

    An iterator to the newly inserted element, if the specified key doesn't exist, otherwise an iterator to the ordinary element.

  • Insert range elements.

    Type parameters

    Parameters

    • first: InputIterator

      Input iterator of the first position.

    • last: InputIterator

      Input iteartor of the last position.

    Returns void

insert_or_assign

  • insert_or_assign(key: Key, value: T): Pair<IteratorT, boolean>
  • insert_or_assign(hint: IteratorT, key: Key, value: T): IteratorT
  • Insert or assign an element.

    Parameters

    • key: Key

      Key to be mapped or search for.

    • value: T

      Value to insert or assign.

    Returns Pair<IteratorT, boolean>

    Pair of an iterator to the newly inserted element and true, if the specified key doesn't exist, otherwise Pair of iterator to the ordinary element and false.

  • Insert or assign an element with hint.

    Parameters

    • hint: IteratorT

      Hint for the position where the element can be inserted.

    • key: Key

      Key to be mapped or search for.

    • value: T

      Value to insert or assign.

    Returns IteratorT

    An iterator to the newly inserted element, if the specified key doesn't exist, otherwise an iterator to the ordinary element.

Abstract key_comp

  • key_comp(): Comparator<Key>

Abstract lower_bound

  • lower_bound(key: Key): IteratorT

merge

  • merge(source: Source): void

push

  • push(...items: IPair<Key, T>[]): number

rbegin

  • rbegin(): ReverseT

rend

  • rend(): ReverseT

set

  • set(key: Key, val: T): void

size

  • size(): number

Abstract swap

  • swap(obj: Source): void

toJSON

  • toJSON(): Array<Entry<Key, T>>

Abstract upper_bound

  • upper_bound(key: Key): IteratorT

value_comp

  • value_comp(): Comparator<IPair<Key, T>>

Generated using TypeDoc