vector-doublezip 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+14/−1 lines, 3 files
Files
- ChangeLog.md +4/−0
- Data/Vector/DoubleZip.hs +9/−0
- vector-doublezip.cabal +1/−1
ChangeLog.md view
@@ -3,3 +3,7 @@ ## 0.1.0.0 -- 2020-06-01 * First version. Released on an unsuspecting world.++## 0.2.0.0 -- 2020-06-24++* Second version. Added new conversion functions and explicit module dependency GHC.Float.
Data/Vector/DoubleZip.hs view
@@ -16,9 +16,12 @@ , evalFstFVM , evalSndFV , evalSndFVM+ , double42Float4+ , float42Double4 ) where import qualified Data.Vector as V+import GHC.Float (double2Float,float2Double) -- | Norms a tuples in a 'V.Vector' by their first elements so that the greatest by an absolute value first element is equal to 1 (or -1). If all the first -- elements are zeros then prints a warning message and exits successfully.@@ -71,3 +74,9 @@ zipped <- normSnd . V.zip v $ v1 return . V.zip zipped . V.unsafeSlice 1 (V.length v - 1) $ zipped | otherwise = return V.empty++double42Float4 :: ((Double,Double), (Double,Double)) -> ((Float,Float), (Float,Float))+double42Float4 ((x,y),(z,t)) = ((double2Float x,double2Float y),(double2Float z,double2Float t))++float42Double4 :: ((Float,Float), (Float,Float)) -> ((Double,Double), (Double,Double))+float42Double4 ((x,y),(z,t)) = ((float2Double x,float2Double y),(float2Double z,float2Double t))
vector-doublezip.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: vector-doublezip-version: 0.1.0.0+version: 0.2.0.0 synopsis: Some special functions to work with Vector (with zip). description: Uses normalizitions inside for the tuples. Can be used to generate a Vector of 2D function points. homepage: https://hackage.haskell.org/package/vector-doublezip