| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.OSTree.Internal
- size :: OSTree a -> Size
- bin :: a -> OSTree a -> OSTree a -> OSTree a
- balanced :: OSTree a -> Bool
- count :: OSTree a -> Size
- balanceL :: a -> OSTree a -> OSTree a -> OSTree a
- balanceR :: a -> OSTree a -> OSTree a -> OSTree a
- rotateL :: a -> OSTree a -> OSTree a -> OSTree a
- singleL :: a -> OSTree a -> OSTree a -> OSTree a
- doubleL :: a -> OSTree a -> OSTree a -> OSTree a
- rotateR :: a -> OSTree a -> OSTree a -> OSTree a
- singleR :: a -> OSTree a -> OSTree a -> OSTree a
- doubleR :: a -> OSTree a -> OSTree a -> OSTree a
- isBalanced :: OSTree a -> OSTree a -> Bool
- isSingle :: OSTree a -> OSTree a -> Bool
- deleteFindMin :: OSTree a -> (a, OSTree a)
- deleteFindMax :: OSTree a -> (a, OSTree a)
- glue :: OSTree a -> OSTree a -> OSTree a
- balance :: a -> OSTree a -> OSTree a -> OSTree a
Documentation
isBalanced :: OSTree a -> OSTree a -> Bool Source
deleteFindMin :: OSTree a -> (a, OSTree a) Source
O(log n). Delete and find the minimal element.
deleteFindMin (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((3,"b"), fromList[(5,"a"), (10,"c")]) deleteFindMin Error: can not return the minimal element of an empty map
deleteFindMax :: OSTree a -> (a, OSTree a) Source
O(log n). Delete and find the maximal element.
deleteFindMax (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((10,"c"), fromList [(3,"b"), (5,"a")]) deleteFindMax empty Error: can not return the maximal element of an empty map