Safe Haskell | None |
---|
- data Vector a
- = Empty
- | Indexed {
- segmentLength :: Data Length
- segmentIndex :: Data Index -> a
- continuation :: Vector a
- type Vector1 a = Vector (Data a)
- type Vector2 a = Vector (Vector (Data a))
- indexed :: Data Length -> (Data Index -> a) -> Vector a
- segments :: Vector a -> [Vector a]
- length :: Vector a -> Data Length
- mergeSegments :: Syntax a => Vector a -> Vector a
- freezeVector :: Type a => Vector (Data a) -> Data [a]
- thawVector :: Type a => Data [a] -> Vector (Data a)
- thawVector' :: Type a => Length -> Data [a] -> Vector (Data a)
- newLen :: Syntax a => Data Length -> Vector a -> Vector a
- withLen :: (Syntax a, Syntax b) => Data Length -> (Vector a -> Vector b) -> Vector a -> Vector b
- (++) :: Vector a -> Vector a -> Vector a
- take :: Data Length -> Vector a -> Vector a
- drop :: Data Length -> Vector a -> Vector a
- splitAt :: Data Index -> Vector a -> (Vector a, Vector a)
- head :: Syntax a => Vector a -> a
- last :: Syntax a => Vector a -> a
- tail :: Vector a -> Vector a
- init :: Vector a -> Vector a
- tails :: Vector a -> Vector (Vector a)
- inits :: Vector a -> Vector (Vector a)
- inits1 :: Vector a -> Vector (Vector a)
- permute' :: (Data Length -> Data Index -> Data Index) -> Vector a -> Vector a
- permute :: Syntax a => (Data Length -> Data Index -> Data Index) -> Vector a -> Vector a
- reverse :: Syntax a => Vector a -> Vector a
- rotateVecL :: Syntax a => Data Index -> Vector a -> Vector a
- rotateVecR :: Syntax a => Data Index -> Vector a -> Vector a
- replicate :: Data Length -> a -> Vector a
- enumFromTo :: forall a. Integral a => Data a -> Data a -> Vector (Data a)
- enumFrom :: Integral a => Data a -> Vector (Data a)
- (...) :: Integral a => Data a -> Data a -> Vector (Data a)
- map :: (a -> b) -> Vector a -> Vector b
- zip :: (Syntax a, Syntax b) => Vector a -> Vector b -> Vector (a, b)
- zip3 :: (Syntax a, Syntax b, Syntax c) => Vector a -> Vector b -> Vector c -> Vector (a, b, c)
- zip4 :: (Syntax a, Syntax b, Syntax c, Syntax d) => Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d)
- zip5 :: (Syntax a, Syntax b, Syntax c, Syntax d, Syntax e) => Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector (a, b, c, d, e)
- unzip :: Vector (a, b) -> (Vector a, Vector b)
- unzip3 :: Vector (a, b, c) -> (Vector a, Vector b, Vector c)
- unzip4 :: Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d)
- unzip5 :: Vector (a, b, c, d, e) -> (Vector a, Vector b, Vector c, Vector d, Vector e)
- zipWith :: (Syntax a, Syntax b) => (a -> b -> c) -> Vector a -> Vector b -> Vector c
- zipWith3 :: (Syntax a, Syntax b, Syntax c) => (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
- zipWith4 :: (Syntax a, Syntax b, Syntax c, Syntax d) => (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
- zipWith5 :: (Syntax a, Syntax b, Syntax c, Syntax d, Syntax e) => (a -> b -> c -> d -> e -> f) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f
- fold :: Syntax a => (a -> b -> a) -> a -> Vector b -> a
- fold1 :: Syntax a => (a -> a -> a) -> Vector a -> a
- sum :: (Syntax a, Num a) => Vector a -> a
- maximum :: Ord a => Vector (Data a) -> Data a
- minimum :: Ord a => Vector (Data a) -> Data a
- or :: Vector (Data Bool) -> Data Bool
- and :: Vector (Data Bool) -> Data Bool
- any :: (a -> Data Bool) -> Vector a -> Data Bool
- all :: (a -> Data Bool) -> Vector a -> Data Bool
- eqVector :: Eq a => Vector (Data a) -> Vector (Data a) -> Data Bool
- scalarProd :: (Syntax a, Num a) => Vector a -> Vector a -> a
- scan :: (Syntax a, Syntax b) => (a -> b -> a) -> a -> Vector b -> Vector a
- tVec :: Patch a a -> Patch (Vector a) (Vector a)
- tVec1 :: Patch a a -> Patch (Vector (Data a)) (Vector (Data a))
- tVec2 :: Patch a a -> Patch (Vector (Vector (Data a))) (Vector (Vector (Data a)))
Types
Symbolic vector
Empty | |
Indexed | |
|
Len Vector | |
Ixmap Vector | |
Pushy Vector | |
(Syntax a, Show (Internal a)) => Show (Vector a) | |
(Arbitrary (Internal a), Syntax a) => Arbitrary (Vector a) | |
Syntax a => Sized (Vector a) | |
Syntax a => Indexed (Vector a) | |
Syntax a => Syntactic (Vector a) | |
(ElemWise a, Syntax (Vector a)) => ElemWise (Vector a) | |
CollMap (Vector a) (Vector b) | |
Numeric a => Mul (Data a) (Matrix a) | |
Numeric a => Mul (Data a) (Vector1 a) | |
Numeric a => Mul (Vector1 a) (Matrix a) | |
Numeric a => Mul (Vector1 a) (Vector1 a) | |
Numeric a => Mul (Vector1 a) (Data a) | |
Numeric a => Mul (Matrix a) (Matrix a) | |
Numeric a => Mul (Matrix a) (Vector1 a) | |
Numeric a => Mul (Matrix a) (Data a) |
Construction/conversion
segments :: Vector a -> [Vector a]Source
Breaks up a segmented vector into a list of single-segment vectors.
mergeSegments :: Syntax a => Vector a -> Vector aSource
Converts a segmented vector to a vector with a single segment.
freezeVector :: Type a => Vector (Data a) -> Data [a]Source
Converts a non-nested vector to a core vector.
thawVector :: Type a => Data [a] -> Vector (Data a)Source
Converts a non-nested core array to a vector.
Operations
newLen :: Syntax a => Data Length -> Vector a -> Vector aSource
Change the length of the vector to the supplied value. If the supplied length is greater than the old length, the new elements will have undefined value. The resulting vector has only one segment.
withLen :: (Syntax a, Syntax b) => Data Length -> (Vector a -> Vector b) -> Vector a -> Vector bSource
Change the length of the vector before and after calling the function.
permute' :: (Data Length -> Data Index -> Data Index) -> Vector a -> Vector aSource
Permute a single-segment vector
permute :: Syntax a => (Data Length -> Data Index -> Data Index) -> Vector a -> Vector aSource
Permute a vector
enumFromTo :: forall a. Integral a => Data a -> Data a -> Vector (Data a)Source
enumFromTo m n
: Enumerate the integers from m
to n
enumFrom :: Integral a => Data a -> Vector (Data a)Source
enumFrom m
: Enumerate the indexes from m
to maxBound
zip3 :: (Syntax a, Syntax b, Syntax c) => Vector a -> Vector b -> Vector c -> Vector (a, b, c)Source
Zipping three Vector
s
zip4 :: (Syntax a, Syntax b, Syntax c, Syntax d) => Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d)Source
Zipping four Vector
s
zip5 :: (Syntax a, Syntax b, Syntax c, Syntax d, Syntax e) => Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector (a, b, c, d, e)Source
Zipping five Vector
s
unzip4 :: Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d)Source
Unzip to four Vector
s
unzip5 :: Vector (a, b, c, d, e) -> (Vector a, Vector b, Vector c, Vector d, Vector e)Source
Unzip to five Vector
s
zipWith :: (Syntax a, Syntax b) => (a -> b -> c) -> Vector a -> Vector b -> Vector cSource
Generalization of zip
using the supplied function instead of tupling
to combine the elements
zipWith3 :: (Syntax a, Syntax b, Syntax c) => (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector dSource
Generalization of zip3
using the supplied function instead of tupling
to combine the elements
zipWith4 :: (Syntax a, Syntax b, Syntax c, Syntax d) => (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector eSource
Generalization of zip4
using the supplied function instead of tupling
to combine the elements