Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/hashed/set-custom/implementation/context.ts>HashSetContext

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class HashSetContext
implements [HashSet.Context]<UT>
import { HashSetContext } from "https://deno.land/x/rimbu@0.13.0/hashed/set-custom/implementation/context.ts";

Constructors

new
HashSetContext(
hasher: Hasher<UT>,
eq: Eq<UT>,
blockSizeBits: number,
listContext: List.Context,
)

Properties

readonly
_empty: HashSet<any>
readonly
_emptyBlock: HashSetBlock<any>
readonly
blockCapacity: number
readonly
blockMask: number
readonly
builder: <T extends UT>() => HashSet.Builder<T>
readonly
maxDepth: number
readonly
typeTag: string

Methods

block(
entries: readonly UT[] | null,
entrySets: SetEntrySet<UT>[] | null,
size: number,
level: number,
): HashSetBlock<UT>
collision(entries: List.NonEmpty<UT>): HashSetCollision<UT>
createBuilder<T extends UT>(source?: HashSet.NonEmpty<T>): HashSet.Builder<T>
getKeyIndex(level: number, hash: number): number
hash(value: UT): number
isNonEmptyInstance(source: any): source is any
isValidValue(value: unknown): value is UT