diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-06-26 16:57:58 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-06-26 16:57:58 +0000 |
commit | a749785e839d14fadc47ab4c6e94afdd167bdd21 (patch) | |
tree | 2b715bf233aa8e82137621a251b0edf0b32cdd67 /lib/Data/Packed/Matrix.hs | |
parent | 3019948b97ba1c177b21ab103823fabe561b3ffe (diff) |
tensor refactorization
Diffstat (limited to 'lib/Data/Packed/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Matrix.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Data/Packed/Matrix.hs b/lib/Data/Packed/Matrix.hs index 36bf32e..2033dc7 100644 --- a/lib/Data/Packed/Matrix.hs +++ b/lib/Data/Packed/Matrix.hs | |||
@@ -87,14 +87,14 @@ ident n = diag (constant 1 n) | |||
87 | r >< c = f where | 87 | r >< c = f where |
88 | f l | dim v == r*c = matrixFromVector RowMajor c v | 88 | f l | dim v == r*c = matrixFromVector RowMajor c v |
89 | | otherwise = error $ "inconsistent list size = " | 89 | | otherwise = error $ "inconsistent list size = " |
90 | ++show (dim v) ++"in ("++show r++"><"++show c++")" | 90 | ++show (dim v) ++" in ("++show r++"><"++show c++")" |
91 | where v = fromList l | 91 | where v = fromList l |
92 | 92 | ||
93 | (>|<) :: (Field a) => Int -> Int -> [a] -> Matrix a | 93 | (>|<) :: (Field a) => Int -> Int -> [a] -> Matrix a |
94 | r >|< c = f where | 94 | r >|< c = f where |
95 | f l | dim v == r*c = matrixFromVector ColumnMajor c v | 95 | f l | dim v == r*c = matrixFromVector ColumnMajor c v |
96 | | otherwise = error $ "inconsistent list size = " | 96 | | otherwise = error $ "inconsistent list size = " |
97 | ++show (dim v) ++"in ("++show r++"><"++show c++")" | 97 | ++show (dim v) ++" in ("++show r++"><"++show c++")" |
98 | where v = fromList l | 98 | where v = fromList l |
99 | 99 | ||
100 | ---------------------------------------------------------------- | 100 | ---------------------------------------------------------------- |