|
| Data.Vector.Dense | | Stability | experimental | | Maintainer | Patrick Perry <patperry@stanford.edu> |
|
|
|
|
|
| Description |
|
|
| Synopsis |
|
|
|
| Documentation |
|
|
|
| module BLAS.Vector |
|
| module BLAS.Tensor.Base |
|
| module BLAS.Tensor.Dense.Immutable |
|
| module BLAS.Tensor.Immutable |
|
| module BLAS.Tensor.Scalable |
|
| Creating vectors
|
|
|
| Create a vector with the given dimension and elements. The elements
given in the association list must all have unique indices, otherwise
the result is undefined.
|
|
|
| Create a vector of the given dimension with elements initialized
to the values from the list.
|
|
| Special vectors
|
|
|
| basis n i creates a vector of dimension n with zeros everywhere but
position i, where there is a one.
|
|
| Augmenting vectors
|
|
|
| subvector x o n creates a subvector view of x starting at index o
and having length n.
|
|
|
| subvectorWithStride s x o n creates a subvector view of x starting
at index o, having length n and stride s.
|
|
| Norms and dot product
|
|
|
| Compute the sum of absolute values of entries in the vector.
|
|
|
| Compute the 2-norm of a vector.
|
|
|
| Get the index and norm of the element with absulte value. Not valid
if any of the vector entries are NaN. Raises an exception if the
vector has length 0.
|
|
|
| Compute the dot product of two vectors.
|
|
| Vector arithmetic
|
|
|
| Add a value to every element in a vector.
|
|
|
| Scale every element by the given value.
|
|
|
| Divide every element by a value.
|
|
| Converting to and from lists
|
|
|
| Convert a vector to a list. Same as elems.
|
|
|
| Convert a list to a vector. fromList xs = listVector (length xs) xs.
|
|
| Casting vectors
|
|
|
| Cast the phantom length type.
|
|
| Unsafe operations
|
|
|
| Same as vector, but does not range-check the indices.
|
|
|
| Same as subvector but arguments are not range-checked.
|
|
|
| Same as subvectorWithStride but arguments are not range-checked.
|
|
| Produced by Haddock version 2.3.0 |