summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Numeric')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra.hs12
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Devel.hs2
2 files changed, 9 insertions, 5 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra.hs b/packages/base/src/Numeric/LinearAlgebra.hs
index c97f415..0f8efa4 100644
--- a/packages/base/src/Numeric/LinearAlgebra.hs
+++ b/packages/base/src/Numeric/LinearAlgebra.hs
@@ -1,3 +1,5 @@
1{-# LANGUAGE FlexibleContexts #-}
2
1----------------------------------------------------------------------------- 3-----------------------------------------------------------------------------
2{- | 4{- |
3Module : Numeric.LinearAlgebra 5Module : Numeric.LinearAlgebra
@@ -119,7 +121,7 @@ module Numeric.LinearAlgebra (
119 schur, 121 schur,
120 122
121 -- * LU 123 -- * LU
122 lu, luPacked, 124 lu, luPacked, luFact, luPacked',
123 125
124 -- * Matrix functions 126 -- * Matrix functions
125 expm, 127 expm,
@@ -134,7 +136,7 @@ module Numeric.LinearAlgebra (
134 Seed, RandDist(..), randomVector, rand, randn, gaussianSample, uniformSample, 136 Seed, RandDist(..), randomVector, rand, randn, gaussianSample, uniformSample,
135 137
136 -- * Misc 138 -- * Misc
137 meanCov, rowOuters, pairwiseD2, unitary, peps, relativeError, haussholder, optimiseMult, udot, nullspaceSVD, orthSVD, ranksv, gaussElim, gaussElim_1, gaussElim_2, 139 meanCov, rowOuters, pairwiseD2, unitary, peps, relativeError, haussholder, optimiseMult, udot, nullspaceSVD, orthSVD, ranksv, gaussElim, luST, magnit,
138 ℝ,ℂ,iC, 140 ℝ,ℂ,iC,
139 -- * Auxiliary classes 141 -- * Auxiliary classes
140 Element, Container, Product, Numeric, LSDiv, 142 Element, Container, Product, Numeric, LSDiv,
@@ -142,7 +144,6 @@ module Numeric.LinearAlgebra (
142 RealOf, ComplexOf, SingleOf, DoubleOf, 144 RealOf, ComplexOf, SingleOf, DoubleOf,
143 IndexOf, 145 IndexOf,
144 Field, 146 Field,
145-- Normed,
146 Transposable, 147 Transposable,
147 CGState(..), 148 CGState(..),
148 Testable(..) 149 Testable(..)
@@ -155,13 +156,14 @@ import Numeric.Vector()
155import Internal.Matrix 156import Internal.Matrix
156import Internal.Container hiding ((<>)) 157import Internal.Container hiding ((<>))
157import Internal.Numeric hiding (mul) 158import Internal.Numeric hiding (mul)
158import Internal.Algorithms hiding (linearSolve,Normed,orth) 159import Internal.Algorithms hiding (linearSolve,Normed,orth,luPacked')
159import qualified Internal.Algorithms as A 160import qualified Internal.Algorithms as A
160import Internal.Util 161import Internal.Util
161import Internal.Random 162import Internal.Random
162import Internal.Sparse((!#>)) 163import Internal.Sparse((!#>))
163import Internal.CG 164import Internal.CG
164import Internal.Conversion 165import Internal.Conversion
166import Internal.ST(mutable)
165 167
166{- | infix synonym of 'mul' 168{- | infix synonym of 'mul'
167 169
@@ -236,3 +238,5 @@ nullspace m = nullspaceSVD (Left (1*eps)) m (rightSV m)
236-- | return an orthonormal basis of the range space of a matrix. See also 'orthSVD'. 238-- | return an orthonormal basis of the range space of a matrix. See also 'orthSVD'.
237orth m = orthSVD (Left (1*eps)) m (leftSV m) 239orth m = orthSVD (Left (1*eps)) m (leftSV m)
238 240
241luPacked' x = mutable (luST (magnit 0)) x
242
diff --git a/packages/base/src/Numeric/LinearAlgebra/Devel.hs b/packages/base/src/Numeric/LinearAlgebra/Devel.hs
index 84763fe..f572656 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Devel.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Devel.hs
@@ -44,7 +44,7 @@ module Numeric.LinearAlgebra.Devel(
44 -- ** Mutable Matrices 44 -- ** Mutable Matrices
45 STMatrix, newMatrix, thawMatrix, freezeMatrix, runSTMatrix, 45 STMatrix, newMatrix, thawMatrix, freezeMatrix, runSTMatrix,
46 readMatrix, writeMatrix, modifyMatrix, liftSTMatrix, 46 readMatrix, writeMatrix, modifyMatrix, liftSTMatrix,
47 axpy,scal,swap, extractRect, mutable, 47 axpy,scal,swap, extractMatrix, setMatrix, mutable, rowOpST,
48 -- ** Unsafe functions 48 -- ** Unsafe functions
49 newUndefinedVector, 49 newUndefinedVector,
50 unsafeReadVector, unsafeWriteVector, 50 unsafeReadVector, unsafeWriteVector,