module Data.Series.Unboxed (
Series, index, values,
singleton, fromIndex,
fromList, toList,
fromVector, toVector,
Occurrence, fromListDuplicates, fromVectorDuplicates,
fromStrictMap, toStrictMap,
fromLazyMap, toLazyMap,
IsSeries(..),
G.convert,
map, mapWithKey, mapIndex, concatMap,
take, takeWhile, drop, dropWhile, filter, filterWithKey,
mapWithKeyM, mapWithKeyM_, forWithKeyM, forWithKeyM_,
zipWithMatched, zipWithKey,
zipWithMatched3, zipWithKey3,
ZipStrategy, skipStrategy, mapStrategy, constStrategy, zipWithStrategy, zipWithStrategy3,
zipWithMonoid, esum, eproduct, unzip, unzip3,
require, dropIndex,
select, selectWhere, Range, to, from, upto, Selection,
at, iat,
replace, (|->), (<-|),
groupBy, Grouping, aggregateWith, foldWith,
windowing, expanding,
fold, foldM, foldWithKey, foldMWithKey, foldMap, foldMap', foldMapWithKey,
G.mean, G.variance, G.std,
null, length, all, any, and, or, sum, product, maximum, maximumOn, minimum, minimumOn,
argmin, argmax,
postscanl, prescanl,
display, displayWith,
noLongerThan,
DisplayOptions(..), G.defaultDisplayOptions
) where
import Control.Foldl ( Fold, FoldM )
import qualified Data.Map.Lazy as ML
import qualified Data.Map.Strict as MS
import Data.Series.Index ( Index )
import Data.Series.Generic.View
( Range, Selection, to, from, upto )
import Data.Series.Generic ( IsSeries(..), ZipStrategy, Occurrence, DisplayOptions(..), skipStrategy, mapStrategy, constStrategy
, noLongerThan
)
import qualified Data.Series.Generic as G
import Data.Vector.Unboxed ( Vector, Unbox )
import qualified Data.Vector.Unboxed as Vector
import Prelude hiding ( map, concatMap, zipWith, filter, foldMap, null, length, all, any, and, or
, sum, product, maximum, minimum, take, takeWhile, drop, dropWhile
, last, unzip, unzip3
)
infixl 1 `select`
infix 6 |->, <-|
type Series = G.Series Vector
index :: Series k a -> Index k
{-# INLINABLE index #-}
index :: forall k a. Series k a -> Index k
index = Series Vector k a -> Index k
forall {k1} (v :: k1 -> *) k2 (a :: k1). Series v k2 a -> Index k2
G.index
values :: Series k a -> Vector a
{-# INLINABLE values #-}
values :: forall k a. Series k a -> Vector a
values = Series Vector k a -> Vector a
forall {k1} (v :: k1 -> *) k2 (a :: k1). Series v k2 a -> v a
G.values
singleton :: Unbox a => k -> a -> Series k a
{-# INLINABLE singleton #-}
singleton :: forall a k. Unbox a => k -> a -> Series k a
singleton = k -> a -> Series Vector k a
forall (v :: * -> *) a k. Vector v a => k -> a -> Series v k a
G.singleton
fromIndex :: Unbox a
=> (k -> a) -> Index k -> Series k a
{-# INLINABLE fromIndex #-}
fromIndex :: forall a k. Unbox a => (k -> a) -> Index k -> Series k a
fromIndex = (k -> a) -> Index k -> Series Vector k a
forall (v :: * -> *) a k.
Vector v a =>
(k -> a) -> Index k -> Series v k a
G.fromIndex
fromList :: (Ord k, Unbox a) => [(k, a)] -> Series k a
{-# INLINABLE fromList #-}
fromList :: forall k a. (Ord k, Unbox a) => [(k, a)] -> Series k a
fromList = [(k, a)] -> Series Vector k a
forall (v :: * -> *) a k.
(Vector v a, Ord k) =>
[(k, a)] -> Series v k a
G.fromList
fromListDuplicates :: (Ord k, Unbox a) => [(k, a)] -> Series (k, Occurrence) a
{-# INLINABLE fromListDuplicates #-}
fromListDuplicates :: forall k a.
(Ord k, Unbox a) =>
[(k, a)] -> Series (k, Occurrence) a
fromListDuplicates = [(k, a)] -> Series Vector (k, Occurrence) a
forall (v :: * -> *) a k.
(Vector v a, Ord k) =>
[(k, a)] -> Series v (k, Occurrence) a
G.fromListDuplicates
toList :: Unbox a => Series k a -> [(k, a)]
{-# INLINABLE toList #-}
toList :: forall a k. Unbox a => Series k a -> [(k, a)]
toList = Series Vector k a -> [(k, a)]
forall (v :: * -> *) a k. Vector v a => Series v k a -> [(k, a)]
G.toList
toVector :: (Unbox a, Unbox k) => Series k a -> Vector (k, a)
{-# INLINABLE toVector #-}
toVector :: forall a k. (Unbox a, Unbox k) => Series k a -> Vector (k, a)
toVector = Series Vector k a -> Vector (k, a)
forall (v :: * -> *) a k.
(Vector v a, Vector v k, Vector v (k, a)) =>
Series v k a -> v (k, a)
G.toVector
fromVector :: (Ord k, Unbox k, Unbox a)
=> Vector (k, a) -> Series k a
{-# INLINABLE fromVector #-}
fromVector :: forall k a.
(Ord k, Unbox k, Unbox a) =>
Vector (k, a) -> Series k a
fromVector = Vector (k, a) -> Series Vector k a
forall k (v :: * -> *) a.
(Ord k, Vector v k, Vector v a, Vector v (k, a)) =>
v (k, a) -> Series v k a
G.fromVector
fromVectorDuplicates :: (Unbox k, Unbox a, Ord k) => Vector (k, a) -> Series (k, Occurrence) a
{-# INLINABLE fromVectorDuplicates #-}
fromVectorDuplicates :: forall k a.
(Unbox k, Unbox a, Ord k) =>
Vector (k, a) -> Series (k, Occurrence) a
fromVectorDuplicates = Vector (k, a) -> Series Vector (k, Occurrence) a
forall k (v :: * -> *) a.
(Ord k, Vector v k, Vector v a, Vector v (k, a),
Vector v (k, Occurrence)) =>
v (k, a) -> Series v (k, Occurrence) a
G.fromVectorDuplicates
toLazyMap :: (Unbox a) => Series k a -> ML.Map k a
{-# INLINABLE toLazyMap #-}
toLazyMap :: forall a k. Unbox a => Series k a -> Map k a
toLazyMap = Series Vector k a -> Map k a
forall (v :: * -> *) a k. Vector v a => Series v k a -> Map k a
G.toLazyMap
fromLazyMap :: (Unbox a) => ML.Map k a -> Series k a
{-# INLINABLE fromLazyMap #-}
fromLazyMap :: forall a k. Unbox a => Map k a -> Series k a
fromLazyMap = Map k a -> Series Vector k a
forall (v :: * -> *) a k. Vector v a => Map k a -> Series v k a
G.fromLazyMap
toStrictMap :: (Unbox a) => Series k a -> MS.Map k a
{-# INLINABLE toStrictMap #-}
toStrictMap :: forall a k. Unbox a => Series k a -> Map k a
toStrictMap = Series Vector k a -> Map k a
forall (v :: * -> *) a k. Vector v a => Series v k a -> Map k a
G.toStrictMap
fromStrictMap :: (Unbox a) => MS.Map k a -> Series k a
{-# INLINABLE fromStrictMap #-}
fromStrictMap :: forall a k. Unbox a => Map k a -> Series k a
fromStrictMap = Map k a -> Series Vector k a
forall (v :: * -> *) a k. Vector v a => Map k a -> Series v k a
G.fromStrictMap
map :: (Unbox a, Unbox b) => (a -> b) -> Series k a -> Series k b
{-# INLINABLE map #-}
map :: forall a b k.
(Unbox a, Unbox b) =>
(a -> b) -> Series k a -> Series k b
map = (a -> b) -> Series Vector k a -> Series Vector k b
forall (v :: * -> *) a b k.
(Vector v a, Vector v b) =>
(a -> b) -> Series v k a -> Series v k b
G.map
mapWithKey :: (Unbox a, Unbox b) => (k -> a -> b) -> Series k a -> Series k b
{-# INLINABLE mapWithKey #-}
mapWithKey :: forall a b k.
(Unbox a, Unbox b) =>
(k -> a -> b) -> Series k a -> Series k b
mapWithKey = (k -> a -> b) -> Series Vector k a -> Series Vector k b
forall (v :: * -> *) a b k.
(Vector v a, Vector v b) =>
(k -> a -> b) -> Series v k a -> Series v k b
G.mapWithKey
mapIndex :: (Unbox a, Ord k, Ord g) => Series k a -> (k -> g) -> Series g a
{-# INLINABLE mapIndex #-}
mapIndex :: forall a k g.
(Unbox a, Ord k, Ord g) =>
Series k a -> (k -> g) -> Series g a
mapIndex = Series Vector k a -> (k -> g) -> Series Vector g a
forall (v :: * -> *) a k g.
(Vector v a, Ord k, Ord g) =>
Series v k a -> (k -> g) -> Series v g a
G.mapIndex
concatMap :: (Unbox a, Unbox k, Unbox b, Ord k)
=> (a -> Series k b)
-> Series k a
-> Series k b
{-# INLINABLE concatMap #-}
concatMap :: forall a k b.
(Unbox a, Unbox k, Unbox b, Ord k) =>
(a -> Series k b) -> Series k a -> Series k b
concatMap = (a -> Series Vector k b) -> Series Vector k a -> Series Vector k b
forall (v :: * -> *) a k b.
(Vector v a, Vector v k, Vector v b, Vector v (k, a),
Vector v (k, b), Ord k) =>
(a -> Series v k b) -> Series v k a -> Series v k b
G.concatMap
mapWithKeyM :: (Unbox a, Unbox b, Monad m, Ord k) => (k -> a -> m b) -> Series k a -> m (Series k b)
{-# INLINABLE mapWithKeyM #-}
mapWithKeyM :: forall a b (m :: * -> *) k.
(Unbox a, Unbox b, Monad m, Ord k) =>
(k -> a -> m b) -> Series k a -> m (Series k b)
mapWithKeyM = (k -> a -> m b) -> Series Vector k a -> m (Series Vector k b)
forall (v :: * -> *) a b (m :: * -> *) k.
(Vector v a, Vector v b, Monad m, Ord k) =>
(k -> a -> m b) -> Series v k a -> m (Series v k b)
G.mapWithKeyM
mapWithKeyM_ :: (Unbox a, Monad m) => (k -> a -> m b) -> Series k a -> m ()
{-# INLINABLE mapWithKeyM_ #-}
mapWithKeyM_ :: forall a (m :: * -> *) k b.
(Unbox a, Monad m) =>
(k -> a -> m b) -> Series k a -> m ()
mapWithKeyM_ = (k -> a -> m b) -> Series Vector k a -> m ()
forall (v :: * -> *) a (m :: * -> *) k b.
(Vector v a, Monad m) =>
(k -> a -> m b) -> Series v k a -> m ()
G.mapWithKeyM_
forWithKeyM :: (Unbox a, Unbox b, Monad m, Ord k) => Series k a -> (k -> a -> m b) -> m (Series k b)
{-# INLINABLE forWithKeyM #-}
forWithKeyM :: forall a b (m :: * -> *) k.
(Unbox a, Unbox b, Monad m, Ord k) =>
Series k a -> (k -> a -> m b) -> m (Series k b)
forWithKeyM = Series Vector k a -> (k -> a -> m b) -> m (Series Vector k b)
forall (v :: * -> *) a b (m :: * -> *) k.
(Vector v a, Vector v b, Monad m, Ord k) =>
Series v k a -> (k -> a -> m b) -> m (Series v k b)
G.forWithKeyM
forWithKeyM_ :: (Unbox a, Monad m) => Series k a -> (k -> a -> m b) -> m ()
{-# INLINABLE forWithKeyM_ #-}
forWithKeyM_ :: forall a (m :: * -> *) k b.
(Unbox a, Monad m) =>
Series k a -> (k -> a -> m b) -> m ()
forWithKeyM_ = Series Vector k a -> (k -> a -> m b) -> m ()
forall (v :: * -> *) a (m :: * -> *) k b.
(Vector v a, Monad m) =>
Series v k a -> (k -> a -> m b) -> m ()
G.forWithKeyM_
take :: Unbox a => Int -> Series k a -> Series k a
{-# INLINABLE take #-}
take :: forall a k. Unbox a => Int -> Series k a -> Series k a
take = Int -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
Vector v a =>
Int -> Series v k a -> Series v k a
G.take
takeWhile :: Unbox a => (a -> Bool) -> Series k a -> Series k a
takeWhile :: forall a k. Unbox a => (a -> Bool) -> Series k a -> Series k a
takeWhile = (a -> Bool) -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
Vector v a =>
(a -> Bool) -> Series v k a -> Series v k a
G.takeWhile
drop :: Unbox a => Int -> Series k a -> Series k a
{-# INLINABLE drop #-}
drop :: forall a k. Unbox a => Int -> Series k a -> Series k a
drop = Int -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
Vector v a =>
Int -> Series v k a -> Series v k a
G.drop
dropWhile :: Unbox a => (a -> Bool) -> Series k a -> Series k a
dropWhile :: forall a k. Unbox a => (a -> Bool) -> Series k a -> Series k a
dropWhile = (a -> Bool) -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
Vector v a =>
(a -> Bool) -> Series v k a -> Series v k a
G.dropWhile
zipWithMatched :: (Unbox a, Unbox b, Unbox c, Ord k)
=> (a -> b -> c) -> Series k a -> Series k b -> Series k c
{-# INLINABLE zipWithMatched #-}
zipWithMatched :: forall a b c k.
(Unbox a, Unbox b, Unbox c, Ord k) =>
(a -> b -> c) -> Series k a -> Series k b -> Series k c
zipWithMatched = (a -> b -> c)
-> Series Vector k a -> Series Vector k b -> Series Vector k c
forall (v :: * -> *) a b c k.
(Vector v a, Vector v b, Vector v c, Ord k) =>
(a -> b -> c) -> Series v k a -> Series v k b -> Series v k c
G.zipWithMatched
zipWithMatched3 :: (Unbox a, Unbox b, Unbox c, Unbox d, Ord k)
=> (a -> b -> c -> d)
-> Series k a
-> Series k b
-> Series k c
-> Series k d
{-# INLINABLE zipWithMatched3 #-}
zipWithMatched3 :: forall a b c d k.
(Unbox a, Unbox b, Unbox c, Unbox d, Ord k) =>
(a -> b -> c -> d)
-> Series k a -> Series k b -> Series k c -> Series k d
zipWithMatched3 = (a -> b -> c -> d)
-> Series Vector k a
-> Series Vector k b
-> Series Vector k c
-> Series Vector k d
forall (v :: * -> *) a b c d k.
(Vector v a, Vector v b, Vector v c, Vector v d, Ord k) =>
(a -> b -> c -> d)
-> Series v k a -> Series v k b -> Series v k c -> Series v k d
G.zipWithMatched3
zipWithKey :: (Unbox a, Unbox b, Unbox c, Unbox k, Ord k)
=> (k -> a -> b -> c) -> Series k a -> Series k b -> Series k c
{-# INLINABLE zipWithKey #-}
zipWithKey :: forall a b c k.
(Unbox a, Unbox b, Unbox c, Unbox k, Ord k) =>
(k -> a -> b -> c) -> Series k a -> Series k b -> Series k c
zipWithKey = (k -> a -> b -> c)
-> Series Vector k a -> Series Vector k b -> Series Vector k c
forall (v :: * -> *) a b c k.
(Vector v a, Vector v b, Vector v c, Vector v k, Ord k) =>
(k -> a -> b -> c) -> Series v k a -> Series v k b -> Series v k c
G.zipWithKey
zipWithKey3 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox k, Ord k)
=> (k -> a -> b -> c -> d)
-> Series k a
-> Series k b
-> Series k c
-> Series k d
{-# INLINABLE zipWithKey3 #-}
zipWithKey3 :: forall a b c d k.
(Unbox a, Unbox b, Unbox c, Unbox d, Unbox k, Ord k) =>
(k -> a -> b -> c -> d)
-> Series k a -> Series k b -> Series k c -> Series k d
zipWithKey3 = (k -> a -> b -> c -> d)
-> Series Vector k a
-> Series Vector k b
-> Series Vector k c
-> Series Vector k d
forall (v :: * -> *) a b c d k.
(Vector v a, Vector v b, Vector v c, Vector v d, Vector v k,
Ord k) =>
(k -> a -> b -> c -> d)
-> Series v k a -> Series v k b -> Series v k c -> Series v k d
G.zipWithKey3
zipWithStrategy :: (Ord k, Unbox a, Unbox b, Unbox c)
=> (a -> b -> c)
-> ZipStrategy k a c
-> ZipStrategy k b c
-> Series k a
-> Series k b
-> Series k c
{-# INLINABLE zipWithStrategy #-}
zipWithStrategy :: forall k a b c.
(Ord k, Unbox a, Unbox b, Unbox c) =>
(a -> b -> c)
-> ZipStrategy k a c
-> ZipStrategy k b c
-> Series k a
-> Series k b
-> Series k c
zipWithStrategy = (a -> b -> c)
-> ZipStrategy k a c
-> ZipStrategy k b c
-> Series Vector k a
-> Series Vector k b
-> Series Vector k c
forall (v :: * -> *) a b c k.
(Vector v a, Vector v b, Vector v c, Ord k) =>
(a -> b -> c)
-> ZipStrategy k a c
-> ZipStrategy k b c
-> Series v k a
-> Series v k b
-> Series v k c
G.zipWithStrategy
zipWithStrategy3 :: (Ord k, Unbox a, Unbox b, Unbox c, Unbox d)
=> (a -> b -> c -> d)
-> ZipStrategy k a d
-> ZipStrategy k b d
-> ZipStrategy k c d
-> Series k a
-> Series k b
-> Series k c
-> Series k d
zipWithStrategy3 :: forall k a b c d.
(Ord k, Unbox a, Unbox b, Unbox c, Unbox d) =>
(a -> b -> c -> d)
-> ZipStrategy k a d
-> ZipStrategy k b d
-> ZipStrategy k c d
-> Series k a
-> Series k b
-> Series k c
-> Series k d
zipWithStrategy3 = (a -> b -> c -> d)
-> ZipStrategy k a d
-> ZipStrategy k b d
-> ZipStrategy k c d
-> Series Vector k a
-> Series Vector k b
-> Series Vector k c
-> Series Vector k d
forall (v :: * -> *) a b c d k.
(Vector v a, Vector v b, Vector v c, Vector v d, Ord k) =>
(a -> b -> c -> d)
-> ZipStrategy k a d
-> ZipStrategy k b d
-> ZipStrategy k c d
-> Series v k a
-> Series v k b
-> Series v k c
-> Series v k d
G.zipWithStrategy3
{-# INLINABLE zipWithStrategy3 #-}
zipWithMonoid :: ( Monoid a, Monoid b
, Unbox a, Unbox b, Unbox c
, Ord k
)
=> (a -> b -> c)
-> Series k a
-> Series k b
-> Series k c
zipWithMonoid :: forall a b c k.
(Monoid a, Monoid b, Unbox a, Unbox b, Unbox c, Ord k) =>
(a -> b -> c) -> Series k a -> Series k b -> Series k c
zipWithMonoid = (a -> b -> c)
-> Series Vector k a -> Series Vector k b -> Series Vector k c
forall a b (v :: * -> *) c k.
(Monoid a, Monoid b, Vector v a, Vector v b, Vector v c, Ord k) =>
(a -> b -> c) -> Series v k a -> Series v k b -> Series v k c
G.zipWithMonoid
{-# INLINABLE zipWithMonoid #-}
esum :: (Ord k, Num a, Unbox a)
=> Series k a
-> Series k a
-> Series k a
esum :: forall k a.
(Ord k, Num a, Unbox a) =>
Series k a -> Series k a -> Series k a
esum = Series Vector k a -> Series Vector k a -> Series Vector k a
forall k a (v :: * -> *).
(Ord k, Num a, Vector v a, Vector v (Sum a)) =>
Series v k a -> Series v k a -> Series v k a
G.esum
{-# INLINABLE esum #-}
eproduct :: (Ord k, Num a, Unbox a)
=> Series k a
-> Series k a
-> Series k a
eproduct :: forall k a.
(Ord k, Num a, Unbox a) =>
Series k a -> Series k a -> Series k a
eproduct = Series Vector k a -> Series Vector k a -> Series Vector k a
forall k a (v :: * -> *).
(Ord k, Num a, Vector v a, Vector v (Product a)) =>
Series v k a -> Series v k a -> Series v k a
G.eproduct
{-# INLINABLE eproduct #-}
unzip :: (Unbox a, Unbox b)
=> Series k (a, b)
-> ( Series k a
, Series k b
)
unzip :: forall a b k.
(Unbox a, Unbox b) =>
Series k (a, b) -> (Series k a, Series k b)
unzip = Series Vector k (a, b) -> (Series Vector k a, Series Vector k b)
forall (v :: * -> *) a b k.
(Vector v a, Vector v b, Vector v (a, b)) =>
Series v k (a, b) -> (Series v k a, Series v k b)
G.unzip
{-# INLINABLE unzip #-}
unzip3 :: (Unbox a, Unbox b, Unbox c)
=> Series k (a, b, c)
-> ( Series k a
, Series k b
, Series k c
)
unzip3 :: forall a b c k.
(Unbox a, Unbox b, Unbox c) =>
Series k (a, b, c) -> (Series k a, Series k b, Series k c)
unzip3 = Series Vector k (a, b, c)
-> (Series Vector k a, Series Vector k b, Series Vector k c)
forall (v :: * -> *) a b c k.
(Vector v a, Vector v b, Vector v c, Vector v (a, b, c)) =>
Series v k (a, b, c) -> (Series v k a, Series v k b, Series v k c)
G.unzip3
{-# INLINABLE unzip3 #-}
require :: (Unbox a, Ord k)
=> (k -> a) -> Series k a -> Index k -> Series k a
{-# INLINABLE require #-}
require :: forall a k.
(Unbox a, Ord k) =>
(k -> a) -> Series k a -> Index k -> Series k a
require k -> a
f = (k -> a)
-> (a -> a) -> Series Vector k a -> Index k -> Series Vector k a
forall (v :: * -> *) a b k.
(Vector v a, Vector v b, Ord k) =>
(k -> b) -> (a -> b) -> Series v k a -> Index k -> Series v k b
G.requireWith k -> a
f a -> a
forall a. a -> a
id
dropIndex :: Series k a -> Series Int a
{-# INLINABLE dropIndex #-}
dropIndex :: forall k a. Series k a -> Series Int a
dropIndex = Series Vector k a -> Series Vector Int a
forall {k1} (v :: k1 -> *) k2 (a :: k1).
Series v k2 a -> Series v Int a
G.dropIndex
filter :: (Unbox a, Ord k) => (a -> Bool) -> Series k a -> Series k a
{-# INLINABLE filter #-}
filter :: forall a k.
(Unbox a, Ord k) =>
(a -> Bool) -> Series k a -> Series k a
filter = (a -> Bool) -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
(Vector v a, Vector v Int, Ord k) =>
(a -> Bool) -> Series v k a -> Series v k a
G.filter
filterWithKey :: (Unbox a, Ord k)
=> (k -> a -> Bool)
-> Series k a
-> Series k a
{-# INLINABLE filterWithKey #-}
filterWithKey :: forall a k.
(Unbox a, Ord k) =>
(k -> a -> Bool) -> Series k a -> Series k a
filterWithKey = (k -> a -> Bool) -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
(Vector v a, Vector v Int, Vector v Bool, Ord k) =>
(k -> a -> Bool) -> Series v k a -> Series v k a
G.filterWithKey
select :: (Unbox a, Selection s, Ord k) => Series k a -> s k -> Series k a
select :: forall a (s :: * -> *) k.
(Unbox a, Selection s, Ord k) =>
Series k a -> s k -> Series k a
select = Series Vector k a -> s k -> Series Vector k a
forall (s :: * -> *) (v :: * -> *) a k.
(Selection s, Vector v a, Ord k) =>
Series v k a -> s k -> Series v k a
forall (v :: * -> *) a k.
(Vector v a, Ord k) =>
Series v k a -> s k -> Series v k a
G.select
selectWhere :: (Unbox a, Ord k) => Series k a -> Series k Bool -> Series k a
{-# INLINABLE selectWhere #-}
selectWhere :: forall a k.
(Unbox a, Ord k) =>
Series k a -> Series k Bool -> Series k a
selectWhere = Series Vector k a -> Series Vector k Bool -> Series Vector k a
forall (v :: * -> *) a k.
(Vector v a, Vector v Int, Vector v Bool, Ord k) =>
Series v k a -> Series v k Bool -> Series v k a
G.selectWhere
at :: (Unbox a, Ord k) => Series k a -> k -> Maybe a
{-# INLINABLE at #-}
at :: forall a k. (Unbox a, Ord k) => Series k a -> k -> Maybe a
at = Series Vector k a -> k -> Maybe a
forall (v :: * -> *) a k.
(Vector v a, Ord k) =>
Series v k a -> k -> Maybe a
G.at
iat :: Unbox a => Series k a -> Int -> Maybe a
{-# INLINABLE iat #-}
iat :: forall a k. Unbox a => Series k a -> Int -> Maybe a
iat = Series Vector k a -> Int -> Maybe a
forall (v :: * -> *) a k.
Vector v a =>
Series v k a -> Int -> Maybe a
G.iat
replace :: (Unbox a, Ord k) => Series k a -> Series k a -> Series k a
{-# INLINABLE replace #-}
replace :: forall a k.
(Unbox a, Ord k) =>
Series k a -> Series k a -> Series k a
replace = Series Vector k a -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
(Vector v a, Vector v Int, Ord k) =>
Series v k a -> Series v k a -> Series v k a
G.replace
(|->) :: (Unbox a, Ord k) => Series k a -> Series k a -> Series k a
{-# INLINABLE (|->) #-}
|-> :: forall a k.
(Unbox a, Ord k) =>
Series k a -> Series k a -> Series k a
(|->) = Series Vector k a -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
(Vector v a, Vector v Int, Ord k) =>
Series v k a -> Series v k a -> Series v k a
(G.|->)
(<-|) :: (Unbox a, Ord k) => Series k a -> Series k a -> Series k a
{-# INLINABLE (<-|) #-}
<-| :: forall a k.
(Unbox a, Ord k) =>
Series k a -> Series k a -> Series k a
(<-|) = Series Vector k a -> Series Vector k a -> Series Vector k a
forall (v :: * -> *) a k.
(Vector v a, Vector v Int, Ord k) =>
Series v k a -> Series v k a -> Series v k a
(G.<-|)
fold :: Unbox a
=> Fold a b -> Series k a -> b
fold :: forall a b k. Unbox a => Fold a b -> Series k a -> b
fold = Fold a b -> Series Vector k a -> b
forall (v :: * -> *) a b k.
Vector v a =>
Fold a b -> Series v k a -> b
G.fold
{-# INLINABLE fold #-}
foldM :: (Monad m, Unbox a)
=> FoldM m a b
-> Series k a
-> m b
foldM :: forall (m :: * -> *) a b k.
(Monad m, Unbox a) =>
FoldM m a b -> Series k a -> m b
foldM = FoldM m a b -> Series Vector k a -> m b
forall (m :: * -> *) (v :: * -> *) a b k.
(Monad m, Vector v a) =>
FoldM m a b -> Series v k a -> m b
G.foldM
{-# INLINABLE foldM #-}
foldWithKey :: (Unbox k, Unbox a)
=> Fold (k, a) b -> Series k a -> b
foldWithKey :: forall k a b.
(Unbox k, Unbox a) =>
Fold (k, a) b -> Series k a -> b
foldWithKey = Fold (k, a) b -> Series Vector k a -> b
forall (v :: * -> *) a k b.
(Vector v a, Vector v k, Vector v (k, a)) =>
Fold (k, a) b -> Series v k a -> b
G.foldWithKey
{-# INLINABLE foldWithKey #-}
foldMWithKey :: (Monad m, Unbox a, Unbox k)
=> FoldM m (k, a) b
-> Series k a
-> m b
foldMWithKey :: forall (m :: * -> *) a k b.
(Monad m, Unbox a, Unbox k) =>
FoldM m (k, a) b -> Series k a -> m b
foldMWithKey = FoldM m (k, a) b -> Series Vector k a -> m b
forall (m :: * -> *) (v :: * -> *) a k b.
(Monad m, Vector v a, Vector v k, Vector v (k, a)) =>
FoldM m (k, a) b -> Series v k a -> m b
G.foldMWithKey
{-# INLINABLE foldMWithKey #-}
foldMap :: (Monoid m, Unbox a) => (a -> m) -> Series k a -> m
{-# INLINABLE foldMap #-}
foldMap :: forall m a k. (Monoid m, Unbox a) => (a -> m) -> Series k a -> m
foldMap = (a -> m) -> Series Vector k a -> m
forall m (v :: * -> *) a k.
(Monoid m, Vector v a) =>
(a -> m) -> Series v k a -> m
G.foldMap
foldMap' :: (Monoid m, Unbox a) => (a -> m) -> Series k a -> m
{-# INLINABLE foldMap' #-}
foldMap' :: forall m a k. (Monoid m, Unbox a) => (a -> m) -> Series k a -> m
foldMap' a -> m
f = (a -> m) -> Vector a -> m
forall m a. (Monoid m, Unbox a) => (a -> m) -> Vector a -> m
Vector.foldMap' a -> m
f (Vector a -> m) -> (Series k a -> Vector a) -> Series k a -> m
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Series k a -> Vector a
forall k a. Series k a -> Vector a
values
foldMapWithKey :: (Monoid m, Unbox a, Unbox k) => (k -> a -> m) -> Series k a -> m
{-# INLINABLE foldMapWithKey #-}
foldMapWithKey :: forall m a k.
(Monoid m, Unbox a, Unbox k) =>
(k -> a -> m) -> Series k a -> m
foldMapWithKey = (k -> a -> m) -> Series Vector k a -> m
forall m (v :: * -> *) a k.
(Monoid m, Vector v a, Vector v k, Vector v (k, a)) =>
(k -> a -> m) -> Series v k a -> m
G.foldMapWithKey
groupBy :: Series k a
-> (k -> g)
-> Grouping k g a
{-# INLINABLE groupBy #-}
groupBy :: forall k a g. Series k a -> (k -> g) -> Grouping k g a
groupBy = Series Vector k a -> (k -> g) -> Grouping k g Vector a
forall {k1} (v :: k1 -> *) k2 (a :: k1) g.
Series v k2 a -> (k2 -> g) -> Grouping k2 g v a
G.groupBy
type Grouping k g a = G.Grouping k g Vector a
aggregateWith :: (Ord g, Unbox a, Unbox b)
=> Grouping k g a
-> (Series k a -> b)
-> Series g b
{-# INLINABLE aggregateWith #-}
aggregateWith :: forall g a b k.
(Ord g, Unbox a, Unbox b) =>
Grouping k g a -> (Series k a -> b) -> Series g b
aggregateWith = Grouping k g Vector a
-> (Series Vector k a -> b) -> Series Vector g b
forall g (v :: * -> *) a b k.
(Ord g, Vector v a, Vector v b) =>
Grouping k g v a -> (Series v k a -> b) -> Series v g b
G.aggregateWith
foldWith :: (Ord g, Unbox a)
=> Grouping k g a
-> (a -> a -> a)
-> Series g a
{-# INLINABLE foldWith #-}
foldWith :: forall g a k.
(Ord g, Unbox a) =>
Grouping k g a -> (a -> a -> a) -> Series g a
foldWith = Grouping k g Vector a -> (a -> a -> a) -> Series Vector g a
forall g (v :: * -> *) a k.
(Ord g, Vector v a) =>
Grouping k g v a -> (a -> a -> a) -> Series v g a
G.foldWith
expanding :: (Unbox a, Unbox b)
=> Series k a
-> (Series k a -> b)
-> Series k b
{-# INLINABLE expanding #-}
expanding :: forall a b k.
(Unbox a, Unbox b) =>
Series k a -> (Series k a -> b) -> Series k b
expanding = Series Vector k a -> (Series Vector k a -> b) -> Series Vector k b
forall (v :: * -> *) a b k.
(Vector v a, Vector v b) =>
Series v k a -> (Series v k a -> b) -> Series v k b
G.expanding
windowing :: (Ord k, Unbox a, Unbox b)
=> (k -> Range k)
-> (Series k a -> b)
-> Series k a
-> Series k b
{-# INLINABLE windowing #-}
windowing :: forall k a b.
(Ord k, Unbox a, Unbox b) =>
(k -> Range k) -> (Series k a -> b) -> Series k a -> Series k b
windowing = (k -> Range k)
-> (Series Vector k a -> b)
-> Series Vector k a
-> Series Vector k b
forall k (v :: * -> *) a b.
(Ord k, Vector v a, Vector v b) =>
(k -> Range k)
-> (Series v k a -> b) -> Series v k a -> Series v k b
G.windowing
null :: Unbox a => Series k a -> Bool
{-# INLINABLE null #-}
null :: forall a k. Unbox a => Series k a -> Bool
null = Series Vector k a -> Bool
forall (v :: * -> *) a k. Vector v a => Series v k a -> Bool
G.null
length :: Unbox a => Series k a -> Int
{-# INLINABLE length #-}
length :: forall a k. Unbox a => Series k a -> Int
length = Series Vector k a -> Int
forall (v :: * -> *) a k. Vector v a => Series v k a -> Int
G.length
all :: Unbox a => (a -> Bool) -> Series k a -> Bool
{-# INLINABLE all #-}
all :: forall a k. Unbox a => (a -> Bool) -> Series k a -> Bool
all = (a -> Bool) -> Series Vector k a -> Bool
forall (v :: * -> *) a k.
Vector v a =>
(a -> Bool) -> Series v k a -> Bool
G.all
any :: Unbox a => (a -> Bool) -> Series k a -> Bool
{-# INLINABLE any #-}
any :: forall a k. Unbox a => (a -> Bool) -> Series k a -> Bool
any = (a -> Bool) -> Series Vector k a -> Bool
forall (v :: * -> *) a k.
Vector v a =>
(a -> Bool) -> Series v k a -> Bool
G.any
and :: Series k Bool -> Bool
{-# INLINABLE and #-}
and :: forall k. Series k Bool -> Bool
and = Series Vector k Bool -> Bool
forall (v :: * -> *) k. Vector v Bool => Series v k Bool -> Bool
G.and
or :: Series k Bool -> Bool
{-# INLINABLE or #-}
or :: forall k. Series k Bool -> Bool
or = Series Vector k Bool -> Bool
forall (v :: * -> *) k. Vector v Bool => Series v k Bool -> Bool
G.or
sum :: (Unbox a, Num a) => Series k a -> a
{-# INLINABLE sum #-}
sum :: forall a k. (Unbox a, Num a) => Series k a -> a
sum = Series Vector k a -> a
forall a (v :: * -> *) k. (Num a, Vector v a) => Series v k a -> a
G.sum
product :: (Unbox a, Num a) => Series k a -> a
{-# INLINABLE product #-}
product :: forall a k. (Unbox a, Num a) => Series k a -> a
product = Series Vector k a -> a
forall a (v :: * -> *) k. (Num a, Vector v a) => Series v k a -> a
G.product
maximum :: (Ord a, Unbox a) => Series k a -> Maybe a
{-# INLINABLE maximum #-}
maximum :: forall a k. (Ord a, Unbox a) => Series k a -> Maybe a
maximum = Series Vector k a -> Maybe a
forall a (v :: * -> *) k.
(Ord a, Vector v a) =>
Series v k a -> Maybe a
G.maximum
maximumOn :: (Ord b, Unbox a) => (a -> b) -> Series k a -> Maybe a
{-# INLINABLE maximumOn #-}
maximumOn :: forall b a k. (Ord b, Unbox a) => (a -> b) -> Series k a -> Maybe a
maximumOn = (a -> b) -> Series Vector k a -> Maybe a
forall b (v :: * -> *) a k.
(Ord b, Vector v a) =>
(a -> b) -> Series v k a -> Maybe a
G.maximumOn
minimum :: (Ord a, Unbox a) => Series k a -> Maybe a
{-# INLINABLE minimum #-}
minimum :: forall a k. (Ord a, Unbox a) => Series k a -> Maybe a
minimum = Series Vector k a -> Maybe a
forall a (v :: * -> *) k.
(Ord a, Vector v a) =>
Series v k a -> Maybe a
G.minimum
minimumOn :: (Ord b, Unbox a) => (a -> b) -> Series k a -> Maybe a
{-# INLINABLE minimumOn #-}
minimumOn :: forall b a k. (Ord b, Unbox a) => (a -> b) -> Series k a -> Maybe a
minimumOn = (a -> b) -> Series Vector k a -> Maybe a
forall b (v :: * -> *) a k.
(Ord b, Vector v a) =>
(a -> b) -> Series v k a -> Maybe a
G.minimumOn
argmax :: (Ord a, Unbox a)
=> Series k a
-> Maybe k
argmax :: forall a k. (Ord a, Unbox a) => Series k a -> Maybe k
argmax = Series Vector k a -> Maybe k
forall a (v :: * -> *) k.
(Ord a, Vector v a) =>
Series v k a -> Maybe k
G.argmax
{-# INLINABLE argmax #-}
argmin :: (Ord a, Unbox a)
=> Series k a
-> Maybe k
argmin :: forall a k. (Ord a, Unbox a) => Series k a -> Maybe k
argmin = Series Vector k a -> Maybe k
forall a (v :: * -> *) k.
(Ord a, Vector v a, Vector v (Down a)) =>
Series v k a -> Maybe k
G.argmin
{-# INLINABLE argmin #-}
postscanl :: (Unbox a, Unbox b)
=> (a -> b -> a) -> a -> Series k b -> Series k a
{-# INLINABLE postscanl #-}
postscanl :: forall a b k.
(Unbox a, Unbox b) =>
(a -> b -> a) -> a -> Series k b -> Series k a
postscanl = (a -> b -> a) -> a -> Series Vector k b -> Series Vector k a
forall (v :: * -> *) a b k.
(Vector v a, Vector v b) =>
(a -> b -> a) -> a -> Series v k b -> Series v k a
G.postscanl
prescanl :: (Unbox a, Unbox b)
=> (a -> b -> a) -> a -> Series k b -> Series k a
{-# INLINABLE prescanl #-}
prescanl :: forall a b k.
(Unbox a, Unbox b) =>
(a -> b -> a) -> a -> Series k b -> Series k a
prescanl = (a -> b -> a) -> a -> Series Vector k b -> Series Vector k a
forall (v :: * -> *) a b k.
(Vector v a, Vector v b) =>
(a -> b -> a) -> a -> Series v k b -> Series v k a
G.prescanl
display :: (Unbox a, Show k, Show a)
=> Series k a
-> String
display :: forall a k. (Unbox a, Show k, Show a) => Series k a -> String
display = Series Vector k a -> String
forall (v :: * -> *) a k.
(Vector v a, Show k, Show a) =>
Series v k a -> String
G.display
displayWith :: (Unbox a)
=> DisplayOptions k a
-> Series k a
-> String
displayWith :: forall a k. Unbox a => DisplayOptions k a -> Series k a -> String
displayWith = DisplayOptions k a -> Series Vector k a -> String
forall (v :: * -> *) a k.
Vector v a =>
DisplayOptions k a -> Series v k a -> String
G.displayWith