Copyright | (C) 2015 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
- data Label s
- new :: PrimMonad m => m (Label (PrimState m))
- insertAfter :: PrimMonad m => Label (PrimState m) -> m (Label (PrimState m))
- delete :: PrimMonad m => Label (PrimState m) -> m ()
- least :: PrimMonad m => Label (PrimState m) -> m (Label (PrimState m))
- greatest :: PrimMonad m => Label (PrimState m) -> m (Label (PrimState m))
- cutAfter :: PrimMonad m => Label (PrimState m) -> m ()
- cutBefore :: PrimMonad m => Label (PrimState m) -> m ()
- compareM :: PrimMonad m => Label (PrimState m) -> Label (PrimState m) -> m Ordering
Documentation
new :: PrimMonad m => m (Label (PrimState m)) Source
O(1). Create a new labeling structure. Labels from different list labeling structures are incomparable.
insertAfter :: PrimMonad m => Label (PrimState m) -> m (Label (PrimState m)) Source
O(log n) amortized. Insert a new label after a given label.
least :: PrimMonad m => Label (PrimState m) -> m (Label (PrimState m)) Source
O(n). Retrieve the least label
greatest :: PrimMonad m => Label (PrimState m) -> m (Label (PrimState m)) Source
O(n). Retrieve the greatest label
cutAfter :: PrimMonad m => Label (PrimState m) -> m () Source
O(1). Split off all labels after the current label.