sparse-linear-algebra-0.2.0.5: Numerical computation in native Haskell

Safe HaskellSafe
LanguageHaskell2010

Data.Sparse.Utils

Contents

Synopsis

Misc. utilities

maxTup :: Ord t => (t, t) -> (t, t) -> (t, t) Source #

Componentwise tuple operations TODO : use semilattice properties instead

minTup :: Ord t => (t, t) -> (t, t) -> (t, t) Source #

Componentwise tuple operations TODO : use semilattice properties instead

denseIxArray :: [b] -> [(Int, b)] Source #

integer-indexed ziplist

denseIxArray2 :: Int -> [c] -> [(Int, Int, c)] Source #

", 2d arrays

foldrMap :: (Foldable t, Functor t) => (a -> b) -> (b -> c -> c) -> c -> t a -> c Source #

foldr over the results of a fmap

foldlStrict :: (a -> b -> a) -> a -> [b] -> a Source #

strict left fold

ifoldr :: Num i => (a -> b -> b) -> b -> (i -> c -> d -> a) -> c -> [d] -> b Source #

indexed right fold

Bounds checking

type LB = Int Source #

type UB = Int Source #

inBounds :: LB -> UB -> Int -> Bool Source #

inBounds2 :: (LB, UB) -> (Int, Int) -> Bool Source #

inBounds02 :: (UB, UB) -> (Int, Int) -> Bool Source #