diff options
author | Alberto Ruiz <aruiz@um.es> | 2009-11-13 11:00:34 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2009-11-13 11:00:34 +0000 |
commit | d404bcf2859f6b4f94d34dec205895019ed564e8 (patch) | |
tree | 0866db6fd6220c741062d93daa75705d7a8204d3 /lib/Numeric/LinearAlgebra/Algorithms.hs | |
parent | e8939f7f7f9654bcf0ab9a0cd3720279117e2e29 (diff) |
explicit export lists in internal modules
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Algorithms.hs')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Algorithms.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs index 110619a..f749cc1 100644 --- a/lib/Numeric/LinearAlgebra/Algorithms.hs +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -310,8 +310,8 @@ pnormRV Infinity = vectorMax . vectorMapR Abs | |||
310 | --pnormRV _ = error "pnormRV not yet defined" | 310 | --pnormRV _ = error "pnormRV not yet defined" |
311 | 311 | ||
312 | pnormCV PNorm2 = norm2 . asReal | 312 | pnormCV PNorm2 = norm2 . asReal |
313 | pnormCV PNorm1 = norm1 . liftVector magnitude | 313 | pnormCV PNorm1 = norm1 . mapVector magnitude |
314 | pnormCV Infinity = vectorMax . liftVector magnitude | 314 | pnormCV Infinity = vectorMax . mapVector magnitude |
315 | --pnormCV _ = error "pnormCV not yet defined" | 315 | --pnormCV _ = error "pnormCV not yet defined" |
316 | 316 | ||
317 | pnormRM PNorm2 m = head (toList s) where (_,s,_) = svdR m | 317 | pnormRM PNorm2 m = head (toList s) where (_,s,_) = svdR m |
@@ -320,8 +320,8 @@ pnormRM Infinity m = vectorMax $ liftMatrix (vectorMapR Abs) m `mXv` constant 1 | |||
320 | --pnormRM _ _ = error "p norm not yet defined" | 320 | --pnormRM _ _ = error "p norm not yet defined" |
321 | 321 | ||
322 | pnormCM PNorm2 m = head (toList s) where (_,s,_) = svdC m | 322 | pnormCM PNorm2 m = head (toList s) where (_,s,_) = svdC m |
323 | pnormCM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (liftVector magnitude) m | 323 | pnormCM PNorm1 m = vectorMax $ constant 1 (rows m) `vXm` liftMatrix (mapVector magnitude) m |
324 | pnormCM Infinity m = vectorMax $ liftMatrix (liftVector magnitude) m `mXv` constant 1 (cols m) | 324 | pnormCM Infinity m = vectorMax $ liftMatrix (mapVector magnitude) m `mXv` constant 1 (cols m) |
325 | --pnormCM _ _ = error "p norm not yet defined" | 325 | --pnormCM _ _ = error "p norm not yet defined" |
326 | 326 | ||
327 | -- | Objects which have a p-norm. | 327 | -- | Objects which have a p-norm. |
@@ -489,7 +489,7 @@ diagonalize m = if rank v == n | |||
489 | -- | 489 | -- |
490 | matFunc :: Field t => (Complex Double -> Complex Double) -> Matrix t -> Matrix (Complex Double) | 490 | matFunc :: Field t => (Complex Double -> Complex Double) -> Matrix t -> Matrix (Complex Double) |
491 | matFunc f m = case diagonalize (complex m) of | 491 | matFunc f m = case diagonalize (complex m) of |
492 | Just (l,v) -> v `mXm` diag (liftVector f l) `mXm` inv v | 492 | Just (l,v) -> v `mXm` diag (mapVector f l) `mXm` inv v |
493 | Nothing -> error "Sorry, matFunc requires a diagonalizable matrix" | 493 | Nothing -> error "Sorry, matFunc requires a diagonalizable matrix" |
494 | 494 | ||
495 | -------------------------------------------------------------- | 495 | -------------------------------------------------------------- |