Skip to main content
Deno 2 is finally here 🎉️
Learn more
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@1.0.4/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