Hoogle Search
Within LTS Haskell 24.37 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
fromAscList :: Eq v => v -> [(k, v)] -> Piecewise k vmappings Data.Mapping.Piecewise Assumes the keys are distinct and increasing (but consecutive values may be the same, in which case the intervening keys are removed)
fromAscListUnsafe :: v -> [(k, v)] -> Piecewise k vmappings Data.Mapping.Piecewise Assumes that the keys are distinct and increasing, and also that consecutive values are distinct
fromList :: forall (m :: Nat) (n :: Nat) a . (KnownNat m, KnownNat n) => [a] -> Maybe (Matrix m n a)matrix-static Data.Matrix.Static Create a matrix from a list of elements. The list must have exactly length n*m or this returns Nothing. An example:
fromList [1..9] :: Maybe (Matrix 3 3 Int) Just ( 1 2 3 ) ( 4 5 6 ) ( 7 8 9 )
fromListUnsafe :: forall (m :: Nat) (n :: Nat) a . (KnownNat m, KnownNat n) => [a] -> Matrix m n amatrix-static Data.Matrix.Static Create a matrix from a non-empty list given the desired size. The list must have at least rows*cols elements. An example:
fromListUnsafe [1..9] :: Matrix 3 3 Int ( 1 2 3 ) ( 4 5 6 ) ( 7 8 9 )
-
matrix-static Data.Matrix.Static Create a matrix from a list of rows. The list must have exactly m lists of length n. Nothing is returned otherwise Example:
fromLists [ [1,2,3] ( 1 2 3 ) , [4,5,6] ( 4 5 6 ) , [7,8,9] ] = ( 7 8 9 )
fromListsUnsafe :: forall a (m :: Nat) (n :: Nat) . [[a]] -> Matrix m n amatrix-static Data.Matrix.Static Create a matrix from a list of rows. The list must have exactly m lists of length n. If this does not hold, the resulting Matrix will have different static dimensions that the runtime dimension and will result in hard to debug errors. Use fromLists whenever you're unsure. Example:
fromListsUnsafe [ [1,2,3] ( 1 2 3 ) , [4,5,6] ( 4 5 6 ) , [7,8,9] ] = ( 7 8 9 )
toList :: forall (m :: Nat) (n :: Nat) a . Matrix m n a -> [a]matrix-static Data.Matrix.Static Get the elements of a matrix stored in a list.
( 1 2 3 ) ( 4 5 6 ) toList ( 7 8 9 ) = [1..9]
toLists :: forall (m :: Nat) (n :: Nat) a . Matrix m n a -> [[a]]matrix-static Data.Matrix.Static Get the elements of a matrix stored in a list of lists, where each list contains the elements of a single row.
( 1 2 3 ) [ [1,2,3] ( 4 5 6 ) , [4,5,6] toLists ( 7 8 9 ) = , [7,8,9] ]
fromList :: (Real a, Eq a) => [a] -> MedianStream amedian-stream Data.MedianStream Creates a MedianStream from a list of input elements. Complexity: O(nlgn)
insertList :: (Real a, Eq a) => MedianStream a -> [a] -> MedianStream amedian-stream Data.MedianStream Adds a list of input elements to an existing MedianStream Complexity: O(nlgn)