massiv
Massiv (Массив) is an Array Library.
https://github.com/lehins/massiv
| Version on this page: | 0.4.5.0 |
| LTS Haskell 24.18: | 1.0.5.0 |
| Stackage Nightly 2025-11-04: | 1.0.5.0 |
| Latest on Hackage: | 1.0.5.0 |
BSD-3-Clause licensed by Alexey Kuleshevich
Maintained by [email protected]
This version can be pinned in stack with:
massiv-0.4.5.0@sha256:a0e16ef4503c642cff1bbf686f1c89e87ac3bb6755f4d975ff8b5b8fc27b61db,4611Module documentation for 0.4.5.0
Depends on 9 packages(full list with versions):
Used by 2 packages in lts-15.3(full list with versions):
Changes
0.4.5
- Addition of
computeIOandcomputePrimM - Addition of
makeArrayLinearA - Addition of
traverseS - Fix regression in performance introduced in
massiv-0.4.0
0.4.4
- Addition of
appendOuterMandconcatOuterM - Addition of
zoom - Addition of
write_,modify_andswap_
0.4.3
- Addition of
catMaybesSandtally
0.4.3
- Addition of
applyStencilandPaddingwith helper functionsnoPaddingandsamePadding. - Addition of
foldlStencil,foldrStenciland monoidalfoldStencil. - Addition of common generic stencils:
sumStencil,productStencil,avgStencil,maxStencil,minStencilandidStencil. - Addition of
mapStencilUnsafefor the brave. - Improve compile time error reporting for invalid dimensions.
- Fix incorrect loading of
DWarrays of dimension higher than 3 - Addition of
foldOuterSlice,ifoldOuterSlice,foldInnerSliceandifoldInnerSlice. Fix for #56
0.4.2
- Fix loading empty
DSstream arrays of unknown size. Fix for #83.
0.4.1
- Introduction of
StreamandDSrepresentation:filterS,filterM,ifilterS,ifilterMmapMaybeS,mapMaybeM,imapMaybeS,imapMaybeMunfoldr,unfoldrNtakeSanddropS
- Deprecated
traverseAR,itraverseAR,traversePrimR,itraversePrimR(not feasible to keep duplicate functions just for representation,TypeApplicationsorScopedVariablesshould be used instead.) - Fix performance issue with copying of unboxed arrays and initialization of storable array.
- Addition of
unsafeLoadIntoS,unsafeLoadIntoandmaxSize - Addition of
reverse,reverse'andreverseM - Addition of
modifyDimension,modifyDimM, andmodifyDim'
0.4.0
- Made
Constructa super class ofMutable - Reimplement a safe version of
makeLoadArray, that is parallelizable. - Switch from
EltRepr r ixto much simplerR r - Remove
Constructinstance forMrepresentation. unsafeLinearSet- length argument now acceptsSz1instead of anInt- Renamed:
forPrimM_->forPrimMiforPrimM_->iforPrimMiforLinearPrimM_->iforLinearPrimM
- Introduced new functions that do not mutate the original array:
forPrimM_,iforPrimM_andiforLinearPrimM_ - Addition of
readM,writeM,modifyM,swapM,modifyM_,swapM_ - Add an orphan instance of
MonadThrowforSTmonad for older versions ofexceptions. See ekmett/exceptions#72 - Deprecation of
read',write'modify'andswap' - Make
modifyaccept a monadic action, rather than a pure function. Also now it returns the old element. - Make
swapreturn the swapped elements. - Addition of
unsafeLinearSwapandunsafeSwap - Expose
unsafeLinearModifyandunsafeModify - Expose
Data.Massiv.Core.List - Expose
indexWith, so macroINDEX_CHECKfrommassiv.hcould be used outside massiv. - Addition of
liftSz - Fixed
expand*functions by making them acceptSz1instead of anInt - Addition of
expandWithinM - Bunch of minor fixes to
Showinstances - Extracted test-suite into it’s own package.
- Stop accepting computation strategy for all functions that can be performed sequentially only:
iterateNiiterateNunfoldrS_iunfoldrS_unfoldlS_iunfoldlS_makeArrayAmakeArrayARgenerateArrayLinearSgenerateArrayS
- Redefined most of the numeric operators with
NumericandNumericFloat. Will be required for SIMD operations.
0.3.6
- Addition of
unsafeArrayLinearCopy,unsafeLinearCopy,unsafeLinearShrink,unsafeLinearGrow - Implementation of
iterateUntilanditerateUntilM identityMatrix- generation of identity matrix
0.3.5
- Fix and export
guardNumberOfElements Eqinstances forIndexExceptionandSizeException- Fix
upsampleimplementation and improve its performance. - Addition of
deleteRegionM,deleteRowsManddeleteColumnsM
0.3.4
- Use the the new stateful workers feature of
scheduler-1.4.0 - Addition of:
randomArraySrandomArrayWSgenerateArrayWSgenerateArrayLinearWSmapWS,forWS,imapWSandiforWS- and
splitLinearlyWithStatefulM_
0.3.3
- Fix type signature for
createArray. - Support for new version of
scheduler - Addition of
randomArray
0.3.2.1
- Fix
sqrtAfunction: #76
0.3.2
- Exported
withMArrayS - Switch to pure exception throwing for
read',write',modify'andswap'.MonadThrowconstraint prevented those functions to be used inSTmonad. - Addition of
quicksort,quicksortM_,unstablePartitionRegionMandunsafeUnstablePartitionRegionM
0.3.1
- Addition of
rangeStepInclusive' - Addition of
flatten makeLoadArrayhas been deprecated intounsafeMakeLoadArray.- A new safe
makeLoadArrayShas been added. - Fix
infix 4for(...)and(..:)range functions, so they can be easily composed with numeric operations - Addition of
imapSchedulerM_andiforSchedulerM_
0.3.0
- Class hierarchy an associated methods:
getCompmoved fromConstructtoLoadSizeclass lost array value parametere.unsafeResizeandunsafeExtractbecame their own classes
- New classes:
ResizewithunsafeResizefrom oldSize, except witharraytype parameter for applicability to mutableMArraysExtractwithunsafeExtractfrom oldSizeStrideLoad, child ofLoad
ifoldlIOand related no longer take list of capabilities, but instead respect the inner computation strategy. For that reason these folds have been removed:foldlOnP,ifoldlOnP,foldrOnP,ifoldrOnPfoldnow is just like the one fromData.Foldabletakes no arguments and requires elements to be a monoidsingletondoes not accept computation strategy any more and createsSeqarray by default- New function
empty. Raggedfunctions are no longer exported, until the interface stabilizes and proper implementation of ragged arrays is in place.- Partial functions
read',write'andswap'now live in IO and throw proper exceptions. loadArrayis renamed toloadArrayMand there is a new separate function (not part ofLoadclass) with the nameloadArraythat actually usesloadArrayM- Moved
unsafeWithPtrintoData.Massiv.Array.Unsafe - Addition of:
unsafeArrayToForeignPtr,unsafeMArrayToForeignPtr,unsafeArrayFromForeignPtr,unsafeArrayFromForeignPtr0,unsafeMArrayFromForeignPtr,unsafeMArrayFromForeignPtr0
- Addition of
castToByteString,castFromByteString - Addition of
makeUnsafeStencil Windownow has anwindowUnrollIx2field.- Addition of
insertWindowanddropWindow
0.2.8.1
- Fix
sqrtAfunction. Backport of #76
0.2.8
- Fixed a problem where convolution stencil size was not inverted, causing out of bounds memory read: #72
- Fixed an issue with windowed array where a stencil size is smaller than the array it is applied to
- Fixed incorrect cross-correlation stencil construction
0.2.7
- Fixed a serious performance regression in
Stencil’sFunctorinstance, which was introduced in version0.2.3 - Added type and pattern synonyms
Szfor future compatibility with version0.3. Could be useful for migration.
0.2.6
- Add
expand*family of functions. - Long awaited
makeArrayM/makeArrayAandmapM/forM/imapM/iforM/traverseA/itraverseAalnog with corresponding functions allowing for supplying representation. - Deprecate
mapPandmapP_in favor ofmapIOandmapIO_, while making latter respect theComp. - Addition of a whole collection of mutable operators:
mapIO/mapIO_/imapIO/imapIO_/forIO/forIO_/iforIO/iforIO_createArray/createArrayST/createArrayST_generateArray/generateArrayIOunfoldlPrim/unfoldlPrim_makeArrayA,makeArrayAR
- Addition of cute synonyms:
(...)and(..:)
0.2.5
- Fix for
insertDimension#62
0.2.4.1
- Fix a bug in
zipfunctions, where resulting array size would not take into account the size of one of the input arrays.
0.2.4
- Addition of inner folds:
ifoldlInner,foldlInner,ifoldrInnerandfoldrInner - Addition of functions that can fold over any dimension (
foldlWithin,foldlWithin', etc.) - Addition of
ifoldMonoandifoldSemi, thus fixing: #54 - Improvement over manipulating index dimensions with addition of type level
Dimension ndata type and functions likegetDimension,dropDimension. - Addition of
insertDimand type levelinsertDimensionas well aspullOutDimandpullOutDimension - Add partial
extractFromTo'
0.2.3
- Addition of
Profunctorfunctions forStencil:lmapStencil,rmapStencilandbimapStencil - Addition of integration approximation:
Data.Massiv.Array.Numeric.Integral - Removed overlapping instances for
DWin favor of concrete instances. - Relaxed contraint restrictions on matrix multiplication
(|*|)and slightly improved performance with rewrite rules to avoid double transform.
0.2.2
- Addition of
withMArray,withMArrayST. - Improved preformance of matrix multiplication
0.2.1
-
Addition of
Strideand related functionscomputeWithStrideandcomputeWithStrideAs. -
Addition of
Window -
Addition of
loadArrayadnloadArrayWithStridewith default implementations that will become new loading functions in a subsequent release.loadArraywill replaceloadSandloadP, which will be deprecated in the next release and removed in the next major release. Some of this is discussed in #41 -
Addition of various conversion functions:
fromByteString,toByteStringandtoBuilderunwrapArray,evalArray,unwrapMutableArray,evalMutableArrayunwrapNormalFormArray,evalNormalFormArray,unwrapNormalFormMutableArray,evalNormalFormMutableArray
-
Fix:
Eqinstance forArray M ix e
0.2.0
- Fixed type signatures for
convertAsandconvertProxy - Added type constructors for
DWandDI Showinstance forDWarrays.- Addition of
unsafeBackpermuteDW. - Breaking changes:
- Create new
Data.Massiv.Array.Stencil.Unsafemodule and moveforStencilUnsafeinto it. - Rename of rank -> dimensions #25
- Removal
EqandOrdinstances forValue#19 - Move border resolution to
mapStencilfrommakeStencil.
- Removal
- Updated iterators
iterM,iterM_, etc. to have a separate step per dimension.
- Create new
0.1.6
SemigroupandMonoidinstance forValue.- Addition of
forStencilUnsafe. - Fix
minimumbehaving asmaximum. - Addition of
foldSemi.
0.1.5
- Fix inverted stencil index calculation #12
- Add support for cross-correlation.
0.1.4
- Addition of Monoidal folding
foldMono. - Expose
liftArray2.
0.1.3
- Addition of
withPtrandunsafeWithPtrfor Storable arrays - Addition of
computeInto. - Exposed
makeWindowedArray.
0.1.2
- Support for GHC-8.4 - instance of
CompforSemigroup - Brought back support for GHC-7.10
0.1.1
- Addition of experimental
mapM,imapM,forM,iforM,generateMandgenerateLinearMfunctions. Fixes #5 - Addition of
Ordinstances for some array representations.
0.1.0
- Initial Release