Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- compressU :: HasCallStack => Vector Int -> (Vector Int, Vector Int)
- bindex :: (HasCallStack, Vector v a, Ord a) => v a -> a -> Int
- chunksOfG :: Vector v a => Int -> v a -> Vector (v a)
- constructMN :: forall a m. (PrimMonad m, Unbox a) => Int -> (Vector a -> m a) -> m (Vector a)
- constructrMN :: forall a m. (PrimMonad m, Unbox a) => Int -> (Vector a -> m a) -> m (Vector a)
Documentation
compressU :: HasCallStack => Vector Int -> (Vector Int, Vector Int) #
\(O(N \log N)\) One dimensional index compression: xs -> (nubSortXs, xs')
bindex :: (HasCallStack, Vector v a, Ord a) => v a -> a -> Int #
\(O(\log N)\) Binary search-based indexing.
chunksOfG :: Vector v a => Int -> v a -> Vector (v a) #
\(O(N)\) = Test >>> chunksOfG 3 $ U.fromList ([1, 2, 3, 4, 5, 6, 7] :: [Int]) [[1,2,3],[4,5,6],[7]]