Skip to main content
Module

x/rimbu/mod.ts>ProximityMap.Context

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface ProximityMap.Context
implements [RMapBase.Context]<UK, ProximityMap.Types>
import { type ProximityMap } from "https://deno.land/x/rimbu@1.0.5/mod.ts";
const { Context } = ProximityMap;

A context instance for a ProximityMap that acts as a factory for every instance of this type of collection.

Properties

readonly
typeTag: "ProximityMap"
readonly
distanceFunction: DistanceFunction<UK>

The function used to compute the distance between stored keys and any research key

readonly
hashMapContext: HashMap.Context<UK>

The context used by the internal HashMap

Methods

createBuilder<K extends UK, V>(source?: ProximityMap.NonEmpty<K, V>): ProximityMap.Builder<K, V>

Creates a builder given the optional non-empty source map