Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IHashSet<Key, Unique, Source>

Common interface for hash sets.

author

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

Type parameters

  • Key

    Key type

  • Unique: boolean

    Whether duplicated key is blocked or not

  • Source: IHashSet<Key, Unique, Source>

    Derived type extending this IHashSet

Hierarchy

Implements

Implemented by

Index

Type aliases

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>

Iterator

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

Iterator of SetContainer

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>

ReverseIterator

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

Reverse iterator of SetContainer

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>

Constructors

Protected constructor

  • new IHashSet(factory: (thisArg: Source) => ILinearContainerBase<Key, Source, Iterator<Key, Unique, Source>, ReverseIterator<Key, Unique, Source>>): IHashSet

Methods

[Symbol.iterator]

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

assign

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

begin

  • begin(): Iterator<Key, Unique, Source>
  • begin(index: number): Iterator<Key, Unique, Source>

bucket

  • bucket(key: Key): number

bucket_count

  • bucket_count(): number

bucket_size

  • bucket_size(index: number): number

clear

  • clear(): void

Abstract count

  • count(key: Key): number

empty

  • empty(): boolean

end

  • end(): Iterator<Key, Unique, Source>
  • end(index: number): Iterator<Key, Unique, Source>

erase

  • erase(key: Key): number
  • erase(pos: Iterator<Key, Unique, Source>): Iterator<Key, Unique, Source>
  • erase(first: Iterator<Key, Unique, Source>, last: Iterator<Key, Unique, Source>): Iterator<Key, Unique, Source>

Abstract find

  • find(key: Key): Iterator<Key, Unique, Source>

has

  • has(key: Key): boolean

hash_function

  • hash_function(): Hasher<Key>

key_eq

  • key_eq(): BinaryPredicator<Key>

load_factor

  • load_factor(): number

max_load_factor

  • max_load_factor(): number
  • max_load_factor(z: number): void

Abstract merge

  • merge(source: Source): void

push

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

rbegin

rehash

  • rehash(n: number): void

rend

reserve

  • reserve(n: number): void

size

  • size(): number

Abstract swap

  • swap(obj: Source): void

toJSON

  • toJSON(): Array<Key>

Generated using TypeDoc