diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-05-27 20:21:47 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-05-27 20:21:47 +0200 |
commit | 53559833d2166010eed754027484fb8d5525e710 (patch) | |
tree | d1cd40e45e6062ef6bece255b20424f90091a910 /packages/base/src/Numeric/LinearAlgebra/Util.hs | |
parent | cf3c788f0c44577ac1a5365e8154200b53a36409 (diff) |
expose CSR
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Util.hs')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Util.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util.hs b/packages/base/src/Numeric/LinearAlgebra/Util.hs index 47b1090..aee21b8 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Util.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Util.hs | |||
@@ -37,6 +37,7 @@ module Numeric.LinearAlgebra.Util( | |||
37 | mnorm_1, mnorm_2, mnorm_0, mnorm_Inf, | 37 | mnorm_1, mnorm_2, mnorm_0, mnorm_Inf, |
38 | unitary, | 38 | unitary, |
39 | mt, | 39 | mt, |
40 | (~!~), | ||
40 | pairwiseD2, | 41 | pairwiseD2, |
41 | rowOuters, | 42 | rowOuters, |
42 | null1, | 43 | null1, |
@@ -65,6 +66,7 @@ import Numeric.Matrix() | |||
65 | import Numeric.Vector() | 66 | import Numeric.Vector() |
66 | import Numeric.LinearAlgebra.Random | 67 | import Numeric.LinearAlgebra.Random |
67 | import Numeric.LinearAlgebra.Util.Convolution | 68 | import Numeric.LinearAlgebra.Util.Convolution |
69 | import Control.Monad(when) | ||
68 | 70 | ||
69 | type ℝ = Double | 71 | type ℝ = Double |
70 | type ℕ = Int | 72 | type ℕ = Int |
@@ -385,3 +387,8 @@ vtrans p m | r == 0 = fromBlocks . map (map asColumn . takesV (replicate q p)) . | |||
385 | where | 387 | where |
386 | (q,r) = divMod (rows m) p | 388 | (q,r) = divMod (rows m) p |
387 | 389 | ||
390 | -------------------------------------------------------------------------------- | ||
391 | |||
392 | infixl 0 ~!~ | ||
393 | c ~!~ msg = when c (error msg) | ||
394 | |||