summaryrefslogtreecommitdiff
path: root/packages/base/src/Data/Packed
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Data/Packed')
-rw-r--r--packages/base/src/Data/Packed/IO.hs2
-rw-r--r--packages/base/src/Data/Packed/Numeric.hs8
2 files changed, 4 insertions, 6 deletions
diff --git a/packages/base/src/Data/Packed/IO.hs b/packages/base/src/Data/Packed/IO.hs
index db03d5f..94fb30a 100644
--- a/packages/base/src/Data/Packed/IO.hs
+++ b/packages/base/src/Data/Packed/IO.hs
@@ -149,6 +149,8 @@ apparentCols s = f . dropWhile null . map words . lines <$> readFile s
149 f [] = 0 149 f [] = 0
150 f (x:_) = length x 150 f (x:_) = length x
151 151
152
153-- | load a matrix from an ASCII file formatted as a 2D table.
152loadMatrix :: FilePath -> IO (Matrix Double) 154loadMatrix :: FilePath -> IO (Matrix Double)
153loadMatrix f = do 155loadMatrix f = do
154 v <- vectorScan f 156 v <- vectorScan f
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs
index 6036e8c..d130ecd 100644
--- a/packages/base/src/Data/Packed/Numeric.hs
+++ b/packages/base/src/Data/Packed/Numeric.hs
@@ -84,7 +84,7 @@ linspace n (a,b) = addConstant a $ scale s $ fromList $ map fromIntegral [0 .. n
84class Contraction a b c | a b -> c 84class Contraction a b c | a b -> c
85 where 85 where
86 infixl 7 <.> 86 infixl 7 <.>
87 {- | Matrix product, matrix vector product, and dot product 87 {- | Matrix product, matrix - vector product, and dot product
88 88
89Examples: 89Examples:
90 90
@@ -223,11 +223,7 @@ instance Container Matrix e => Build (Int,Int) (e -> e -> e) Matrix e
223 223
224-------------------------------------------------------------------------------- 224--------------------------------------------------------------------------------
225 225
226{- | alternative operator for '(\<.\>)' 226-- | alternative unicode symbol (25c7) for the contraction operator '(\<.\>)'
227
228x25c7, white diamond
229
230-}
231(◇) :: Contraction a b c => a -> b -> c 227(◇) :: Contraction a b c => a -> b -> c
232infixl 7 ◇ 228infixl 7 ◇
233(◇) = (<.>) 229(◇) = (<.>)