forsyde-atom-0.3.0.0: Shallow-embedded DSL for modeling cyber-physical systems
Copyright(c) George Ungureanu KTH/EECS/ESY 2019-2020
LicenseBSD-style (see the file LICENSE)
Maintainerugeorge@kth.se
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

ForSyDe.Atom.Skel.FastVector

Description

This library is is an un-official alternative to Vector meant for simulations of large data which is likely to become too cumbersome. Fast Vector functions do not use atoms, but rather use Prelude functions on a wrapped newtype using a native Haskell type (in this case lists). The API tries to copy the exported functions of ForSyDe.Atom.Skel.Vector and its submodule so that switching betwen libraries can be made seamlessly just by Vector with FastVector in the library import.

Useful links:

Synopsis

Documentation

newtype Vector a Source #

In this library Vector is just a wrapper around a list.

Constructors

Vector 

Fields

Instances

Instances details
Functor Vector Source # 
Instance details

Defined in ForSyDe.Atom.Skel.FastVector.Lib

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

Applicative Vector Source # 
Instance details

Defined in ForSyDe.Atom.Skel.FastVector.Lib

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Foldable Vector Source # 
Instance details

Defined in ForSyDe.Atom.Skel.FastVector.Lib

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Eq a => Eq (Vector a) Source # 
Instance details

Defined in ForSyDe.Atom.Skel.FastVector.Lib

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

Show a => Show (Vector a) Source # 
Instance details

Defined in ForSyDe.Atom.Skel.FastVector.Lib

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

vector :: [a] -> Vector a Source #

farm11 :: Functor f => (a -> b) -> f a -> f b Source #

farm21 :: Applicative f => (a1 -> a2 -> b) -> f a1 -> f a2 -> f b Source #

farm31 :: Applicative f => (a1 -> a2 -> a3 -> b) -> f a1 -> f a2 -> f a3 -> f b Source #

farm41 :: Applicative f => (a1 -> a2 -> a3 -> a4 -> b) -> f a1 -> f a2 -> f a3 -> f a4 -> f b Source #

farm51 :: Applicative f => (a1 -> a2 -> a3 -> a4 -> a5 -> b) -> f a1 -> f a2 -> f a3 -> f a4 -> f a5 -> f b Source #

farm12 :: Functor f => (a -> (a1, b)) -> f a -> (f a1, f b) Source #

farm22 :: Applicative f => (a1 -> a2 -> (a3, b)) -> f a1 -> f a2 -> (f a3, f b) Source #

(<++>) :: Vector a -> Vector a -> Vector a infixr 5 Source #

reduce :: (t -> t -> t) -> Vector t -> t Source #

See reduce.

drop :: Int -> Vector a -> Vector a Source #

See drop.

take :: Int -> Vector a -> Vector a Source #

See take.

first :: Vector t -> t Source #

See first.

group :: Int -> Vector a -> Vector (Vector a) Source #

See group.

fanout :: a -> Vector a Source #

See fanout.

fanoutn :: Int -> a -> Vector a Source #

See fanoutn.

iterate :: Int -> (a -> a) -> a -> Vector a Source #

See iterate.

pipe :: Vector (a -> a) -> a -> a Source #

See pipe.

pipe1 :: (a -> t -> t) -> Vector a -> t -> t Source #

See pipe1.

recuri :: Vector (b -> b) -> b -> Vector b Source #

See recuri.

get :: Int -> Vector a -> Maybe a Source #

See get.

odds :: Vector a -> Vector a Source #

See odds.