Hoogle Search
Within LTS Haskell 24.31 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
massiv Data.Massiv.Array.Manifest.Vector Just like fromVectorM, but will throw an exception on a mismatched size.
-
massiv Data.Massiv.Array.Manifest.Vector In case when resulting array representation matches the one of vector's it will do a O(1) - conversion using castFromVector, otherwise Vector elements will be copied into a new array. Will throw an error if length of resulting array doesn't match the source vector length.
-
massiv Data.Massiv.Array.Manifest.Vector Convert an array into a vector. Will perform a cast if resulting vector is of compatible representation, otherwise memory copy will occur.
Examples
In this example a Storable Array is created and then casted into a Storable Vector in costant time:>>> import Data.Massiv.Array as A >>> import Data.Massiv.Array.Manifest.Vector (toVector) >>> import qualified Data.Vector.Storable as VS >>> toVector (makeArrayR S Par (Sz2 5 6) (\(i :. j) -> i + j)) :: VS.Vector Int [0,1,2,3,4,5,1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9]
While in this example Storable Array will first be converted into Unboxed representation in Parallel and only after that will be coverted into Unboxed Vector in constant time.>>> import qualified Data.Vector.Unboxed as VU >>> toVector (makeArrayR S Par (Sz2 5 6) (\(i :. j) -> i + j)) :: VU.Vector Int [0,1,2,3,4,5,1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9]
-
massiv Data.Massiv.Array.Numeric Multiply matrix by a column vector. Same as .>< but returns computed version of a vector Throws Exception: SizeMismatchException when inner dimensions of arrays do not match.
-
massiv Data.Massiv.Array.Numeric Multiply a row vector by a matrix. Same as ><. but returns computed vector instead of a delayed one. Throws Exception: SizeMismatchException when inner dimensions of arrays do not match.
type
MVector s r e = MArray s r Ix1 emassiv Data.Massiv.Core Type synonym for a single dimension mutable array, or simply a flat mutable vector.
type
MVector s r e = MArray s r Ix1 emassiv Data.Massiv.Vector Type synonym for a single dimension mutable array, or simply a flat mutable vector.
unitVectorAtAngle :: Float -> Vectorgloss Graphics.Gloss.Data.Vector Produce a unit vector at a given angle relative to the +ve x-axis. The provided angle is in radians.
uniformVector :: (PrimMonad m, StatefulGen g m, Uniform a, Vector v a) => g -> Int -> m (v a)mwc-probability System.Random.MWC.Probability Generate a vector of pseudo-random variates. This is not necessarily faster than invoking uniform repeatedly in a loop, but it may be more convenient to use in some situations.
evaluateArgVector :: (C a v, C v) => T a -> v -> vnumeric-prelude MathObj.Polynomial Here the argument is a vector, for example the coefficients are complex numbers or square matrices and the coefficents are reals.