|Maintainer||Alberto Ruiz <firstname.lastname@example.org>|
|1D arrays suitable for numeric computations using external libraries.
|A one-dimensional array of objects stored in a contiguous memory block.
creates a Vector from a list:
> fromList [2,3,5,7]
4 |> [2.0,3.0,5.0,7.0]
An alternative to fromList with explicit dimension. The input
list is explicitly truncated if it is too long, so it may safely
be used, for instance, with infinite lists.
This is the format used in the instances for Show (Vector a).
extracts the Vector elements to a list
> toList (linspace 5 (1,10))
|number of elements
Reads a vector position:
> fromList [0..9] @> 7
|:: Storable t|
|=> Int||number of elements to extract
|-> Vector t||result
|-> Vector t|
takes a number of consecutive elements from a Vector
> subVector 2 3 (fromList [1..10])
3 |> [3.0,4.0,5.0]
creates a new Vector by joining a list of Vectors
> join [fromList [1..5], constant 1 3]
8 |> [1.0,2.0,3.0,4.0,5.0,1.0,1.0,1.0]
creates a vector with a given number of equal components:
> constant 2 7
7 |> [2.0,2.0,2.0,2.0,2.0,2.0,2.0]
Creates a real vector containing a range of values:
> linspace 5 (-3,7)
5 |> [-3.0,-0.5,2.0,4.5,7.0]
|map on Vectors
|zipWith for Vectors
|Loads a vector from an ASCII file (the number of elements must be known in advance).
|Saves the elements of a vector, with a given format (%f, %e, %g), to an ASCII file.
|Loads a vector from a binary file (the number of elements must be known in advance).
|Saves the elements of a vector to a binary file.
|Produced by Haddock version 2.6.0|