radix-tree-1.1.0.0: Radix trees
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Radix1Tree.Word8.Strict.Pointer

Description

Compressed references for spine-strict radix trees.

Pointers have a much smaller memory footprint and allow faster lookup in trees that are known to never change shape.

Synopsis

Documentation

data Pointer Source #

Pure compressed tree reference.

Since: 1.1

Instances

Instances details
Show Pointer Source # 
Instance details

Defined in Data.RadixNTree.Word8.Strict.Pointer

Lift Pointer Source # 
Instance details

Defined in Data.RadixNTree.Word8.Strict.Pointer

Methods

lift :: Quote m => Pointer -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Pointer -> Code m Pointer #

pointer :: Feed1 -> Radix1Tree a -> Maybe Pointer Source #

\(\mathcal{O}(\min(x,k))\). Create a pointer that mirrors an existing key.

The pointer is only guaranteed to behave correctly for any tree that holds the same set of keys as the provided one.

Since: 1.1

follow :: a -> Pointer -> Radix1Tree a -> a Source #

\(\mathcal{O}(\log n)\). Look up the value at a pointer in the tree, falling back to the given default value if it does not exist.

Since: 1.1