From 717c680a4b65a2226b0dd6fc13f7c63e7bc0431d Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Sat, 13 Jun 2015 19:18:16 +0200 Subject: setRect, general luPacked' based on luST --- packages/base/src/Numeric/LinearAlgebra.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'packages/base/src/Numeric/LinearAlgebra.hs') 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 @@ +{-# LANGUAGE FlexibleContexts #-} + ----------------------------------------------------------------------------- {- | Module : Numeric.LinearAlgebra @@ -119,7 +121,7 @@ module Numeric.LinearAlgebra ( schur, -- * LU - lu, luPacked, + lu, luPacked, luFact, luPacked', -- * Matrix functions expm, @@ -134,7 +136,7 @@ module Numeric.LinearAlgebra ( Seed, RandDist(..), randomVector, rand, randn, gaussianSample, uniformSample, -- * Misc - meanCov, rowOuters, pairwiseD2, unitary, peps, relativeError, haussholder, optimiseMult, udot, nullspaceSVD, orthSVD, ranksv, gaussElim, gaussElim_1, gaussElim_2, + meanCov, rowOuters, pairwiseD2, unitary, peps, relativeError, haussholder, optimiseMult, udot, nullspaceSVD, orthSVD, ranksv, gaussElim, luST, magnit, ℝ,ℂ,iC, -- * Auxiliary classes Element, Container, Product, Numeric, LSDiv, @@ -142,7 +144,6 @@ module Numeric.LinearAlgebra ( RealOf, ComplexOf, SingleOf, DoubleOf, IndexOf, Field, --- Normed, Transposable, CGState(..), Testable(..) @@ -155,13 +156,14 @@ import Numeric.Vector() import Internal.Matrix import Internal.Container hiding ((<>)) import Internal.Numeric hiding (mul) -import Internal.Algorithms hiding (linearSolve,Normed,orth) +import Internal.Algorithms hiding (linearSolve,Normed,orth,luPacked') import qualified Internal.Algorithms as A import Internal.Util import Internal.Random import Internal.Sparse((!#>)) import Internal.CG import Internal.Conversion +import Internal.ST(mutable) {- | infix synonym of 'mul' @@ -236,3 +238,5 @@ nullspace m = nullspaceSVD (Left (1*eps)) m (rightSV m) -- | return an orthonormal basis of the range space of a matrix. See also 'orthSVD'. orth m = orthSVD (Left (1*eps)) m (leftSV m) +luPacked' x = mutable (luST (magnit 0)) x + -- cgit v1.2.3