Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- data Pointer
- pointer :: Feed1 -> Radix1Tree a -> Maybe Pointer
- follow :: a -> Pointer -> Radix1Tree a -> a
Documentation
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