Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UniqueTreeSet<Key, Source, IteratorT, ReverseT>

Basic tree set blocking duplicated key.

author

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

Type parameters

  • Key

    Key type

  • Source: UniqueTreeSet<Key, Source, IteratorT, ReverseT>

    Derived type extending this UniqueTreeSet

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

    Iterator type

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

    Reverse iterator type

Hierarchy

Implements

Index

Type aliases

Static Iterator

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

Iterator of UniqueSet

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • SourceT: UniqueSet<Key, SourceT, IteratorT, ReverseT>

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

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

Static ReverseIterator

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

Reverse iterator of UniqueSet

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • SourceT: UniqueSet<Key, SourceT, IteratorT, ReverseT>

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

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

Constructors

Protected constructor

  • new UniqueTreeSet(factory: (thisArg: Source) => ILinearContainerBase<Key, Source, IteratorT, ReverseT>): UniqueTreeSet
  • Default Constructor.

    Parameters

    • factory: (thisArg: Source) => ILinearContainerBase<Key, Source, IteratorT, ReverseT>
        • (thisArg: Source): ILinearContainerBase<Key, Source, IteratorT, ReverseT>
        • Parameters

          • thisArg: Source

          Returns ILinearContainerBase<Key, Source, IteratorT, ReverseT>

    Returns UniqueTreeSet

Methods

[Symbol.iterator]

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

assign

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

begin

  • begin(): IteratorT

clear

  • clear(): void

count

  • count(key: Key): number

empty

  • empty(): boolean

end

  • end(): IteratorT

equal_range

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

erase

  • erase(key: Key): number
  • erase(pos: IteratorT): IteratorT
  • erase(first: IteratorT, last: IteratorT): IteratorT

extract

  • extract(key: Key): Key
  • extract(it: IteratorT): IteratorT

find

  • find(key: Key): IteratorT

has

  • has(key: Key): boolean

insert

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

    Parameters

    • key: Key

      Key to 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 ordinary element and false.

  • Insert an element with hint.

    Parameters

    • hint: IteratorT

      Hint for the position where the element can be inserted.

    • key: Key

    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

Abstract key_comp

  • key_comp(): Comparator<Key>

Abstract lower_bound

  • lower_bound(key: Key): IteratorT

merge

  • merge(source: Source): void

push

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

rbegin

  • rbegin(): ReverseT

rend

  • rend(): ReverseT

size

  • size(): number

Abstract swap

  • swap(obj: Source): void

toJSON

  • toJSON(): Array<Key>

Abstract upper_bound

  • upper_bound(key: Key): IteratorT

value_comp

  • value_comp(): Comparator<Key>

Generated using TypeDoc