Skip to main content

package @rimbu/proximity/map-custom

The @rimbu/proximity/map-custom entry exposes internal builders, contexts and implementations for ProximityMap, allowing advanced users to tailor proximity behaviour and backing maps beyond the defaults exported from @rimbu/proximity. Prefer the high‑level @rimbu/proximity and @rimbu/proximity/map APIs for normal nearest‑neighbour map use; this entry is aimed at custom integration scenarios.

Classes

NameDescription
ProximityMapBuilderMutable builder used to efficiently construct new immutable {@link ProximityMap} instances.

The builder stores entries in an internal HashMap.Builder and only wraps the result into a ProximityMap when {@link ProximityMapBuilder.build | build} (or {@link ProximityMapBuilder.buildMapValues | buildMapValues}) is called. | | ProximityMapContext | Default concrete implementation of {@link ProximityMap.Context}.

It wires the configured {@link DistanceFunction} and HashMap context together and is used by the ProximityMap factory methods to create new instances. | | ProximityMapEmpty | Concrete empty implementation of {@link ProximityMap}.

It represents an empty ProximityMap instance for a given context and efficiently creates non-empty maps when elements are added. | | ProximityMapNonEmpty | Concrete non-empty implementation of {@link ProximityMap.NonEmpty}.

It stores entries in a non-empty HashMap and applies the configured distance function when resolving lookups via {@link ProximityMapNonEmpty.get}. |