Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
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.
evaluateCoeffVector :: C a v => T v -> a -> vnumeric-prelude MathObj.Polynomial Here the coefficients are vectors, for example the coefficients are real and the coefficents are real vectors.
hornerArgVector :: (C a v, C v) => v -> [a] -> vnumeric-prelude MathObj.Polynomial.Core No documentation available.