dawgdic
Copyright(c) Andrey Prokopenko 2025
LicenseBSD-3-Clause
Stabilityexperimental
Safe HaskellNone
LanguageGHC2021

Data.DAWG.Internal.LinkTable

Description

 
Synopsis

LinkTable

type LinkTable (m :: Type -> Type) = UUHT m BaseType (BaseType, BaseType) Source #

Alias for UUHT that holds a pair of index with offset as value associated with a hash as a key.

init :: PrimMonad m => LinkTable m -> BaseType -> m () Source #

Allocates a table space with given size.

insert :: PrimMonad m => LinkTable m -> BaseType -> BaseType -> m () Source #

Stores index with offset into the table.

find :: PrimMonad m => LinkTable m -> BaseType -> m BaseType Source #

Find an offset that corresponds to a given index.

Helpers

findId :: PrimMonad m => LinkTable m -> BaseType -> m BaseType Source #

Finds a hash associated with a given index.