Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MultiSet<Key, Source, IteratorT, ReverseT>

Basic set container allowing multiple keys.

template

Mapped type

author

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

Type parameters

  • Key

    Key type

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

    Derived type extending this MultiSet

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

    Iterator type

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

    Reverse iterator type

Hierarchy

Implements

Index

Type aliases

Static InsertRet

InsertRet<Key, Unique, Source, IteratorT, ReverseT>: Unique extends true ? Pair<IteratorT, boolean> : IteratorT

Return type of {@link SetContainer.insert}

Type parameters

  • Key

  • Unique: boolean

  • Source: SetContainer<Key, Unique, Source, IteratorT, ReverseT>

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

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

Static Iterator

Iterator<Key, Unique, SourceT, IteratorT, ReverseT, Key, SourceT, IteratorT, ReverseT>: Iterator<Key, false, SourceT, IteratorT, ReverseT>

Iterator of SetContainer Iterator of MultiSet

author

Jenogho Nam http://samchon.org

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • Unique: boolean

  • SourceT: SetContainer<Key, Unique, SourceT, IteratorT, ReverseT>

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

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

  • Key

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

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

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

Static ReverseIterator

ReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT, Key, SourceT, IteratorT, ReverseT>: ReverseIterator<Key, false, SourceT, IteratorT, ReverseT>

Reverse iterator of SetContainer Reverse iterator of MultiSet

author

Jenogho Nam http://samchon.org

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • Unique: boolean

  • SourceT: SetContainer<Key, Unique, SourceT, IteratorT, ReverseT>

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

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

  • Key

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

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

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

Constructors

Protected constructor

  • new MultiSet(factory: (thisArg: Source) => ILinearContainerBase<Key, Source, IteratorT, ReverseT>): MultiSet
  • 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 MultiSet

Methods

[Symbol.iterator]

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

assign

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

begin

  • begin(): IteratorT

clear

  • clear(): void

Abstract count

  • count(key: Key): number

empty

  • empty(): boolean

end

  • end(): IteratorT

erase

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

Abstract find

  • find(key: Key): IteratorT

has

  • has(key: Key): boolean

insert

  • insert(key: Key): IteratorT
  • insert(hint: IteratorT, key: Key): IteratorT
  • insert<InputIterator>(begin: InputIterator, end: InputIterator): void
  • Insert an element.

    Parameters

    • key: Key

    Returns IteratorT

    An iterator to the newly inserted element.

  • 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.

  • Insert range elements.

    Type parameters

    Parameters

    • begin: InputIterator
    • end: InputIterator

    Returns void

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>

Generated using TypeDoc