Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HashSet<Key>

Unique-key Set based on Hash buckets.

author

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

Type parameters

  • Key

Hierarchy

Implements

Index

Type aliases

Static Iterator

Iterator<Key, SourceT, IteratorT, ReverseT>: SetContainer.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>: SetContainer.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

constructor

  • new HashSet(hash?: Hasher<Key>, equal?: BinaryPredicator<Key>): HashSet
  • new HashSet(items: Key[], hash?: Hasher<Key>, equal?: BinaryPredicator<Key>): HashSet
  • new HashSet(obj: HashSet<Key>): HashSet
  • new HashSet(first: Readonly<IForwardIterator<Key>>, last: Readonly<IForwardIterator<Key>>, hash?: Hasher<Key>, equal?: BinaryPredicator<Key>): HashSet

Methods

[Symbol.iterator]

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

assign

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

begin

bucket

  • bucket(key: Key): number

bucket_count

  • bucket_count(): number

bucket_size

  • bucket_size(n: number): number

clear

  • clear(): void

count

  • count(key: Key): number

empty

  • empty(): boolean

end

erase

extract

find

has

  • has(key: Key): boolean

hash_function

  • hash_function(): Hasher<Key>

insert

  • insert(key: Key): Pair<Iterator<Key>, boolean>
  • insert(hint: Iterator<Key>, key: Key): Iterator<Key>
  • insert<InputIterator>(first: InputIterator, last: InputIterator): void

key_eq

  • key_eq(): BinaryPredicator<Key>

load_factor

  • load_factor(): number

max_load_factor

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

merge

  • merge(source: HashSet<Key>): void

push

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

rbegin

rehash

  • rehash(n: number): void

rend

reserve

  • reserve(n: number): void

size

  • size(): number

swap

toJSON

  • toJSON(): Array<Key>

Generated using TypeDoc