ј      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk l m n o p q r s t u v w x yz{|}~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$portable (uses FFI) provisionalAlberto Ruiz <aruiz@um.es>444portable (uses FFI) provisionalAlberto Ruiz <aruiz@um.es> description of GSL error codes clear the fpu  splitEvery 3 [1..9] == [[1,2,3],[4,5,6],[7,8,9]]1obtains the common value of a property of a list common value with " adaptable" 1 Formatting tool postfix function application (flip ($)) specialized fromIntegral  Aerror codes for the auxiliary functions required by the wrappers check the error code &Error capture and conversion to Maybe   portable (uses FFI) provisionalAlberto Ruiz <aruiz@um.es>.Number of elements creates a Vector from a list: > fromList [2,3,5,7] 4 |> [2.0,3.0,5.0,7.0]'extracts the Vector elements to a list > toList (linspace 5 (1,10)) [1.0,3.25,5.5,7.75,10.0]An alternative to $ with explicit dimension. The input F list is explicitly truncated if it is too long, so it may safely 1 be used, for instance, with infinite lists. >This is the format used in the instances for Show (Vector a). 1access to Vector elements without range checking /access to Vector elements with range checking. 5takes a number of consecutive elements from a Vector  > subVector 2 3 (fromList [1..10]) 3 |> [3.0,4.0,5.0]index of the starting element number of elements to extract source result Reads a vector position: > fromList [0..9] @> 7 7.02creates a new Vector by joining a list of Vectors > join [fromList [1..5], constant 1 3] %8 |> [1.0,2.0,3.0,4.0,5.0,1.0,1.0,1.0]3Extract consecutive subvectors of the given sizes.  > takesV [3,4] (linspace 10 (1,10)) [3 |> [1.0,2.0,3.0],4 |> [4.0,5.0,6.0,7.0]]Ztransforms a complex vector into a real vector with alternating real and imaginary parts Ytransforms a real vector into a complex vector with alternating real and imaginary parts map on Vectors zipWith for Vectors unzipWith for Vectors  monadic map over Vectors  the monad m must be strict !monadic map over Vectors "Tmonadic map over Vectors with the zero-indexed index passed to the mapping function  the monad m must be strict #Tmonadic map over Vectors with the zero-indexed index passed to the mapping function $%ULoads a vector from an ASCII file (the number of elements must be known in advance). &TSaves the elements of a vector, with a given format (%f, %e, %g), to an ASCII file. 'ULoads a vector from a binary file (the number of elements must be known in advance). (1Saves the elements of a vector to a binary file. * !"#$%&'(# !"#$%&'(portable (uses FFI) provisionalAlberto Ruiz <aruiz@um.es>d)*>normal distribution with mean zero and standard deviation one +uniform distribution in [0,1)       !"#$%&'()*+,-sum of elements .sum of elements /sum of elements 0sum of elements 1product of elements 2product of elements 3product of elements 4product of elements 5 dot product 6 dot product 7 dot product 8 dot product 9Vobtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc. :Vobtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc. ;;obtains different functions of a vector: only norm1, norm2 <;obtains different functions of a vector: only norm1, norm2 =(map of real vectors with given function >+map of complex vectors with given function ?(map of real vectors with given function @(map of real vectors with given function A(map of real vectors with given function B+map of complex vectors with given function C(map of real vectors with given function D+map of complex vectors with given function E&elementwise operation on real vectors F)elementwise operation on complex vectors G&elementwise operation on real vectors H)elementwise operation on complex vectors ,Obtains a vector of pseudorandom elements from the the mt19937 generator in GSL, with a given seed. Use randomIO to get a random seed. seed  distribution  vector size G)*+     -./0123456789:;<=>?@ABCDEFGH,G)+**+          -./0123456789:;<=>?@ABCDEFGH,portable (uses FFI) provisionalAlberto Ruiz <aruiz@um.es>6-Supported matrix elements. 'This class provides optimized internal + operations for selected element types. - It provides unoptimised defaults for any I type, + so you can create instances simply as:  instance Element Foo. J(r0,c0) starting position  (rt,ct) dimensions of submatrix KLM.@Matrix representation suitable for GSL and LAPACK computations. 6The elements are stored in a continuous memory array. NOPQRS/01TUVWXYZ[\]^2345Matrix transpose. 6789*Creates a vector by concatenation of rows > flatten (ident 3) )9 |> [1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0]:the inverse of Data.Packed.Matrix.fromLists ;(Create a matrix from a list of vectors. + All vectors must have the same dimension, 6 or dimension 1, which is are automatically expanded. <3extracts the rows of a matrix as a list of vectors =4Creates a matrix from a list of vectors, as columns >7Creates a list of vectors from the columns of a matrix ?Reads a matrix position. @ACreates a matrix from a vector by grouping the elements in rows with the desired number of columns. (GNU-Octave groups by columns. To do it you can define reshapeF r = trans . reshape r (where r is the desired number of rows.) > reshape 4 ( [1..12]) (3><4)  [ 1.0, 2.0, 3.0, 4.0  , 5.0, 6.0, 7.0, 8.0  , 9.0, 10.0, 11.0, 12.0 ]BBapplication of a vector function on the flattened matrix elements CDapplication of a vector function on the flattened matrices elements _`abcdefD$Extracts a submatrix from a matrix. (r0,c0) starting position  (rt,ct) dimensions of submatrix  input matrix result E"Saves a matrix as 2D ASCII table. format (%f, %g, %e) *-JKL.NOPQRS/0123456789:;<=>?g@AhBCDEijklmn"-JKLJKL.PNQRSQRONOPQRS/100123456789:;<=>?@ABCDEportable provisionalAlberto Ruiz <aruiz@um.es> F,Structures that may contain complex numbers opqrsGSupported real types t-Supported single-double precision type pairs uvwDcreates a complex vector from vectors with real and imaginary parts xthe inverse of  toComplex yz{|}~FopqrsGFopqrsopqrsGportable provisionalAlberto Ruiz <aruiz@um.es>  !"#$%&'(-JKL.NOPQRS/0123456789:;<=>?g@AhBCDEijklmnportable provisionalAlberto Ruiz <aruiz@um.es>"HIJKLMNOPQRSTUVWXYZ[\]^_`abcHIJKLMNOPQRSTUVWXYZ[\]^_`abcIVJQLSTOPHcW_Y`a\]UMNKRbZ[X^HIJKLMNOPQRSTUVWXYZ[\]^_`abcuses ffi provisional!Alberto Ruiz (aruiz at um dot es)Vconversion of Haskell functions into function pointers that can be used in the C side 'type: 0 central, 1 forward, 2 backward initial step size  function $point where the derivative is taken result and error d'Adaptive central difference algorithm, gsl_deriv_central. For example: " > let deriv = derivCentral 0.01  > deriv sin (pi/4) ,(0.7071067812000676,1.0600063101654055e-10)  > cos (pi/4) 0.7071067811865476 initial step size  function $point where the derivative is taken result and absolute error e'Adaptive forward difference algorithm, gsl_deriv_forwardX. The function is evaluated only at points greater than x, and never at x itself. The derivative is returned in result and an estimate of its absolute error is returned in abserr. This function should be used if f(x) has a discontinuity at x, or is undefined for values less than x. A backward derivative can be obtained using a negative step. initial step size  function $point where the derivative is taken result and absolute error f(Adaptive backward difference algorithm, gsl_deriv_backward. initial step size  function $point where the derivative is taken result and absolute error defdefdefuses ffi provisional!Alberto Ruiz (aruiz at um dot es)Vconversion of Haskell functions into function pointers that can be used in the C side gNumerical integration using gsl_integration_qags9 (adaptive integration with singularities). For example: >% let quad = integrateQAGS 1E-9 1000 ># let f a x = x**(-0.5) * log (a*x) > quad (f 1) 0 1 *(-3.999999999999974,4.871658632055187e-13)precision (e.g. 1E-9) (size of auxiliary workspace (e.g. 1000) 0function to be integrated on the interval (a,b) a b $result of the integration and error hNumerical integration using gsl_integration_qngA (useful for fast integration of smooth functions). For example: > let quad = integrateQNG 1E-6 > quad (\x -> 4/(1+x*x)) 0 1 )(3.141592653589793,3.487868498008632e-14)precision (e.g. 1E-9) 0function to be integrated on the interval (a,b) a b $result of the integration and error ghhgghuses ffi provisional!Alberto Ruiz (aruiz at um dot es)iFast 1D Fourier transform of a  ( ) using gsl_fft_complex_forward6. It uses the same scaling conventions as GNU Octave. > fft ( [1,2,3,4]) Dvector (4) [10.0 :+ 0.0,(-2.0) :+ 2.0,(-2.0) :+ 0.0,(-2.0) :+ (-2.0)]jThe inverse of i, using gsl_fft_complex_inverse. ijijij uses ffi provisional!Alberto Ruiz (aruiz at um dot es)k0Solution of general polynomial equations, using gsl_poly_complex_solve. For example, ( the three solutions of x^3 + 8 = 0  > polySolve [8,0,0,1] [(-1.9999999999999998) :+ 0.0,  1.0 :+ 1.732050807568877,  1.0 :+ (-1.732050807568877)]@The example in the GSL manual: To find the roots of x^5 -1 = 0: > polySolve [-1, 0, 0, 0, 0, 1] .[(-0.8090169943749475) :+ 0.5877852522924731, 0(-0.8090169943749475) :+ (-0.5877852522924731), +0.30901699437494734 :+ 0.9510565162951536, .0.30901699437494734 :+ (-0.9510565162951536),  1.0 :+ 0.0]kkkVconversion of Haskell functions into function pointers that can be used in the C side   uses ffi provisional!Alberto Ruiz (aruiz at um dot es)lStepping functions mM=2 implicit Gear method. nM=1 implicit Gear method. o]Implicit Bulirsch-Stoer method of Bader and Deuflhard. This algorithm requires the Jacobian. p3Implicit 4th order Runge-Kutta at Gaussian points. q3Implicit 2nd order Runge-Kutta at Gaussian points. r2Embedded Runge-Kutta Prince-Dormand (8,9) method. s.Embedded Runge-Kutta Cash-Karp (4, 5) method. t_Embedded Runge-Kutta-Fehlberg (4, 5) method. This method is a good general-purpose integrator. u4th order (classical) Runge-Kutta. The error estimate is obtained by halving the step-size. For more efficient estimate of the error, use t. v$Embedded Runge-Kutta (2, 3) method. w A version of xQ with reasonable default parameters and system of equations defined using lists.  xdot(t,x) initial conditions desired solution times  solution x9Evolution of the system with adaptive step-size control. initial step size (absolute tolerance for the state vector (relative tolerance for the state vector  xdot(t,x) optional jacobian initial conditions desired solution times  solution lmnopqrstuvwx wxlvutsrqponm l vutsrqponmmnopqrstuvwx provisionalAlberto Ruiz <aruiz@um.es>2creates a matrix from a vertical list of matrices 4creates a matrix from a horizontal list of matrices yCCreates a matrix from blocks given as a list of lists of matrices.  Single row/:column components are automatically expanded to match the %corresponding common row and column: > let disp = putStr . dispf 2 >. let vector xs = fromList xs :: Vector Double > let diagl = diag . vector > let rowm = asRow . vector  >+ disp $ fromBlocks [[ident 5, 7, rowm[10,20]], [3, diagl[1,2,3], 0]]  8x10 1 0 0 0 0 7 7 7 10 20 0 1 0 0 0 7 7 7 10 20 0 0 1 0 0 7 7 7 10 20 0 0 0 1 0 7 7 7 10 20 0 0 0 0 1 7 7 7 10 20 3 3 3 3 3 1 0 0 0 0 3 3 3 3 3 0 2 0 0 0 3 3 3 3 3 0 0 3 0 0zReverse rows {Reverse columns |'creates a rectangular diagonal matrix:  > diagRect 7 (fromList [10,20,30]) 4 5 :: Matrix Double (4><5)  [ 10.0, 7.0, 7.0, 7.0, 7.0  , 7.0, 20.0, 7.0, 7.0, 7.0  , 7.0, 7.0, 30.0, 7.0, 7.0  , 7.0, 7.0, 7.0, 7.0, 7.0 ]}0extracts the diagonal from a rectangular matrix ~ An easy way to create a matrix:  > (2><3)[1..6] (2><3)  [ 1.0, 2.0, 3.0  , 4.0, 5.0, 6.0 ]GThis is the format produced by the instances of Show (Matrix a), which can also be used for input. 7The input list is explicitly truncated, so that it can Csafely be used with lists that are too long (like infinite lists).  Example: > (2><3)[1..] (2><3)  [ 1.0, 2.0, 3.0  , 4.0, 5.0, 6.0 ]9Creates a matrix with the first n rows of another matrix 4Creates a copy of a matrix without the first n rows <Creates a matrix with the first n columns of another matrix 7Creates a copy of a matrix without the first n columns  Creates a ., from a list of lists (considered as rows). > fromLists [[1,2],[3,4],[5,6]] (3><2)  [ 1.0, 2.0  , 3.0, 4.0  , 5.0, 6.0 ]%creates a 1-row matrix from a vector (creates a 1-column matrix from a vector Fcreates a Matrix of the specified size using the supplied function to  to map the row/(column position to the value at that row/column position.  > buildMatrix 3 4 (\*(r,c) -> fromIntegral r * fromIntegral c) (3><4)  [ 0.0, 0.0, 0.0, 0.0, 0.0  , 0.0, 1.0, 2.0, 3.0, 4.0  , 0.0, 2.0, 4.0, 6.0, 8.0]Hilbert matrix of order N: hilb n = buildMatrix n n (\(i,j)->1/%(fromIntegral i + fromIntegral j +1))Urearranges the rows of a matrix according to the order given in a list of integers. Lcreates matrix by repetition of a matrix a given number of rows and columns (> repmat (ident 2) 2 3 :: Matrix Double (4><6)  [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0  , 0.0, 1.0, 0.0, 1.0, 0.0, 1.0  , 1.0, 0.0, 1.0, 0.0, 1.0, 0.0  , 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 ] A version of Cm which automatically adapt matrices with a single row or column to match the dimensions of the other matrix. KPartition a matrix into blocks with the given numbers of rows and columns. / The remaining rows and columns are discarded. QFully partition a matrix into blocks of the same size. If the dimensions are not ? a multiple of the given size the last blocks will be smaller.  ghci> mapMatrixWithIndexM_ (\(i,j) v -> printf " m[%.0f,%.0f] = %.f\n" i j v :: IO()) ((2><3)[1 :: Double ..]) m[0,0] = 1 m[0,1] = 2 m[0,2] = 3 m[1,0] = 4 m[1,1] = 5 m[1,2] = 6 ghci> mapMatrixWithIndexM (\>(i,j) v -> Just $ 100*v + 10*i + j) (ident 3:: Matrix Double) Just (3><3)  [ 100.0, 1.0, 2.0  , 10.0, 111.0, 12.0  , 20.0, 21.0, 122.0 ] ghci> mapMatrixWithIndex (\7(i,j) v -> 100*v + 10*i + j) (ident 3:: Matrix Double) (3><3)  [ 100.0, 1.0, 2.0  , 10.0, 111.0, 12.0  , 20.0, 21.0, 122.0 ](-.2359:;<=>?ABCDyz{|}~(.-23~5A9:?;<=>yz{D|}BCyz{|}~ uses ffi provisional!Alberto Ruiz (aruiz at um dot es)!Minimization without derivatives .desired precision of the solution (size test) %maximum number of iterations allowed  sizes of the initial search box function to minimize starting point &solution vector and optimization path 2Minimization without derivatives (vector version) .desired precision of the solution (size test) %maximum number of iterations allowed  sizes of the initial search box function to minimize starting point &solution vector and optimization path Minimization with derivatives. 2desired precision of the solution (gradient test) %maximum number of iterations allowed size of the first trial step (tol (precise meaning depends on method) function to minimize  gradient starting point &solution vector and optimization path /Minimization with derivatives (vector version) 2desired precision of the solution (gradient test) %maximum number of iterations allowed size of the first trial step (tol (precise meaning depends on method) function to minimize  gradient starting point &solution vector and optimization path   uses ffi provisional!Alberto Ruiz (aruiz at um dot es)NNonlinear multidimensional root finding using algorithms that do not require 8 any derivative information to be supplied by the user. @ Any derivatives needed are approximated by finite differences. maximum residual %maximum number of iterations allowed function to minimize starting point &solution vector and optimization path UNonlinear multidimensional root finding using both the function and its derivatives. maximum residual %maximum number of iterations allowed function to minimize  Jacobian starting point &solution vector and optimization path  provisionalAlberto Ruiz <aruiz@um.es>Hcreates a Vector of the specified length using the supplied function to 2 to map the index to the value at that index. > buildVector 4 fromIntegral 4 |> [0.0,1.0,2.0,3.0]zip for Vectors unzip for Vectors  !"#$$ !"#portable provisionalAlberto Ruiz <aruiz@um.es> /014678@@8 /10467 portable (uses FFI) provisional!Alberto Ruiz (aruiz at um dot es)WMatrix product based on BLAS's dgemm. Matrix product based on BLAS's zgemm. Matrix product based on BLAS's sgemm. Matrix product based on BLAS's cgemm. &Full SVD of a real matrix using LAPACK's dgesvd. &Full SVD of a real matrix using LAPACK's dgesdd. )Full SVD of a complex matrix using LAPACK's zgesvd. )Full SVD of a complex matrix using LAPACK's zgesdd. 'Thin SVD of a real matrix, using LAPACK's dgesvd with jobu == jobvt == 'S'. *Thin SVD of a complex matrix, using LAPACK's zgesvd with jobu == jobvt == 'S'. 'Thin SVD of a real matrix, using LAPACK's dgesdd with jobz == 'S'. *Thin SVD of a complex matrix, using LAPACK's zgesdd with jobz == 'S'. .Singular values of a real matrix, using LAPACK's dgesvd with jobu == jobvt == 'N'. 1Singular values of a complex matrix, using LAPACK's zgesvd with jobu == jobvt == 'N'. .Singular values of a real matrix, using LAPACK's dgesdd with jobz == 'N'. 1Singular values of a complex matrix, using LAPACK's zgesdd with jobz == 'N'. MSingular values and all right singular vectors of a real matrix, using LAPACK's dgesvd with jobu == 'N' and jobvt == 'A'. PSingular values and all right singular vectors of a complex matrix, using LAPACK's zgesvd with jobu == 'N' and jobvt == 'A'. LSingular values and all left singular vectors of a real matrix, using LAPACK's dgesvd with jobu == 'A' and jobvt == 'N'. OSingular values and all left singular vectors of a complex matrix, using LAPACK's zgesvd with jobu == 'A' and jobvt == 'N'. LEigenvalues and right eigenvectors of a general complex matrix, using LAPACK's zgeev. H The eigenvectors are the columns of v. The eigenvalues are not sorted. 5Eigenvalues of a general complex matrix, using LAPACK's zgeev with jobz == 'N'. ! The eigenvalues are not sorted. IEigenvalues and right eigenvectors of a general real matrix, using LAPACK's dgeev. H The eigenvectors are the columns of v. The eigenvalues are not sorted. 2Eigenvalues of a general real matrix, using LAPACK's dgeev with jobz == 'N'. ! The eigenvalues are not sorted. KEigenvalues and right eigenvectors of a symmetric real matrix, using LAPACK's dsyev. ( The eigenvectors are the columns of v. 5 The eigenvalues are sorted in descending order (use  for ascending order).  in ascending order NEigenvalues and right eigenvectors of a hermitian complex matrix, using LAPACK's zheev. ( The eigenvectors are the columns of v. 5 The eigenvalues are sorted in descending order (use  for ascending order).  in ascending order 4Eigenvalues of a symmetric real matrix, using LAPACK's dsyev with jobz == 'N'. 1 The eigenvalues are sorted in descending order. 7Eigenvalues of a hermitian complex matrix, using LAPACK's zheev with jobz == 'N'. 1 The eigenvalues are sorted in descending order. Solve a real linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition, based on LAPACK's dgesv6. For underconstrained or overconstrained systems use  or  . See also . Solve a complex linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition, based on LAPACK's zgesv6. For underconstrained or overconstrained systems use  or  . See also . wSolves a symmetric positive definite system of linear equations using a precomputed Cholesky factorization obtained by . wSolves a Hermitian positive definite system of linear equations using a precomputed Cholesky factorization obtained by . Least squared error solution of an overconstrained real linear system, or the minimum norm solution of an underconstrained system, using LAPACK's dgels!. For rank-deficient systems use . Least squared error solution of an overconstrained complex linear system, or the minimum norm solution of an underconstrained system, using LAPACK's zgels!. For rank-deficient systems use . hMinimum norm solution of a general real linear least squares problem Ax=B using the SVD, based on LAPACK's dgelss6. Admits rank-deficient systems but it is slower than . The effective rank of A is determined by treating as zero those singular valures which are less than rcond times the largest singular value. If rcond == Nothing machine precision is used. rcond coefficient matrix right hand sides (as columns) solution vectors (as columns) kMinimum norm solution of a general complex linear least squares problem Ax=B using the SVD, based on LAPACK's zgelss6. Admits rank-deficient systems but it is slower than . The effective rank of A is determined by treating as zero those singular valures which are less than rcond times the largest singular value. If rcond == Nothing machine precision is used. rcond coefficient matrix right hand sides (as columns) solution vectors (as columns) TCholesky factorization of a complex Hermitian positive definite matrix, using LAPACK's zpotrf. QCholesky factorization of a real symmetric positive definite matrix, using LAPACK's dpotrf. TCholesky factorization of a complex Hermitian positive definite matrix, using LAPACK's zpotrf ( version). QCholesky factorization of a real symmetric positive definite matrix, using LAPACK's dpotrf ( version). /QR factorization of a real matrix, using LAPACK's dgeqr2. 2QR factorization of a complex matrix, using LAPACK's zgeqr2. >Hessenberg factorization of a square real matrix, using LAPACK's dgehrd. AHessenberg factorization of a square complex matrix, using LAPACK's zgehrd. 9Schur factorization of a square real matrix, using LAPACK's dgees. <Schur factorization of a square complex matrix, using LAPACK's zgees. 7LU factorization of a general real matrix, using LAPACK's dgetrf. :LU factorization of a general complex matrix, using LAPACK's zgetrf. @Solve a real linear system from a precomputed LU decomposition (), using LAPACK's dgetrs. @Solve a real linear system from a precomputed LU decomposition (), using LAPACK's zgetrs. 444uses ffi provisional!Alberto Ruiz (aruiz at um dot es)@ !"#$-.2359:;<=>?ABCDyz{|}~portable provisionalAlberto Ruiz <aruiz@um.es>J%Matrix product and related functions matrix product dot (inner) product @sum of absolute value of elements (differs in complex case from norm1) "sum of absolute value of elements euclidean norm element of maximum magnitude :Basic element-by-element functions for numeric containers )create a structure with a single element complex conjugate 7scale the element by element reciprocal of the object: scaleRecip 2 (fromList [5,i]#) == 2 |> [0.4 :+ 0.0,0.0 :+ (-2.0)]"element by element multiplication element by element division Fcannot implement instance Functor because of Element class constraint !constant structure of given size $create a structure using a function Hilbert matrix of order N: hilb n = build (n,n) (\i j -> 1/(i+j+1))indexing function index of min element  index of max element  value of min element  value of max element  'the sum of elements (faster than using fold)  +the product of elements (faster than using fold) #A more efficient implementation of cmap (\x -> if x>0 then 1 else 0) #> step $ linspace 5 (-1,1::Double)  5 |> [0.0,0.0,0.0,1.0,1.0]Element by element version of /case compare a b of {LT -> l; EQ -> e; GT -> g}. >Arguments with any dimension = 1 are automatically expanded:  > cond ((1><4)[1..]) ((3><1)[1..] ) 0 100 ((3><4)[1..]) :: Matrix Double  (3><4)  [ 100.0, 2.0, 3.0, 4.0  , 0.0, 100.0, 7.0, 8.0  , 0.0, 0.0, 100.0, 12.0 ]a b l e g result 1Find index of elements which satisfy a predicate '> find (>0) (ident 3 :: Matrix Double)  [(0,0),(1,1),(2,2)],Create a structure from an association list > assoc 5 0 [(2,7),(1,3)] :: Vector Double  5 |> [0.0,3.0,7.0,0.0,0.0]size default value association list result ,Modify a structure using an update function *> accum (ident 5) (+) [((1,1),5),((0,3),3)] :: Matrix Double  (5><5)  [ 1.0, 0.0, 0.0, 3.0, 0.0  , 0.0, 6.0, 0.0, 0.0, 0.0  , 0.0, 0.0, 1.0, 0.0, 0.0  , 0.0, 0.0, 0.0, 1.0, 0.0  , 0.0, 0.0, 0.0, 0.0, 1.0 ]initial structure update function association list result Outer product of two vectors. >  [1,2,3] `outer`  [5,2,3] (3><3)  [ 5.0, 2.0, 3.0  , 10.0, 4.0, 6.0  , 15.0, 6.0, 9.0 ]#Kronecker product of two matrices.  m1=(2><3)  [ 1.0, 2.0, 0.0  , 0.0, -1.0, 3.0 ] m2=(4><3)  [ 1.0, 2.0, 3.0  , 4.0, 5.0, 6.0  , 7.0, 8.0, 9.0  , 10.0, 11.0, 12.0 ] > kronecker m1 m2 (8><9) ; [ 1.0, 2.0, 3.0, 2.0, 4.0, 6.0, 0.0, 0.0, 0.0 ; , 4.0, 5.0, 6.0, 8.0, 10.0, 12.0, 0.0, 0.0, 0.0 ; , 7.0, 8.0, 9.0, 14.0, 16.0, 18.0, 0.0, 0.0, 0.0 ; , 10.0, 11.0, 12.0, 20.0, 22.0, 24.0, 0.0, 0.0, 0.0 ; , 0.0, 0.0, 0.0, -1.0, -2.0, -3.0, 3.0, 6.0, 9.0 ; , 0.0, 0.0, 0.0, -4.0, -5.0, -6.0, 12.0, 15.0, 18.0 ; , 0.0, 0.0, 0.0, -7.0, -8.0, -9.0, 21.0, 24.0, 27.0 ; , 0.0, 0.0, 0.0, -10.0, -11.0, -12.0, 30.0, 33.0, 36.0 ] !conjugate transpose "/Creates a square matrix with a given diagonal. #/creates the identity matrix of given dimension Lyz{|}~FG      !"#<           !"#portable provisional6Vivian McPhail <haskell.vivian.mcphail <at> gmail.com>$IProvide optimal association order for a chain of matrix multiplications $ and apply the multiplications. #The algorithm is the well-known O(n^!3) dynamic programming algorithm 4 that builds a pyramid of optimal associations.  ! m1, m2, m3, m4 :: Matrix Double  m1 = (10><15) [1..]  m2 = (15><20) [1..]  m3 = (20><5) [1..]  m4 = (5><10) [1..]   >>> optimiseMult [m1,m2,m3,m4]  will perform ((m1  (m2  m3))  m4) 2The naive left-to-right multiplication would take 4500 scalar multiplications 'whereas the optimised version performs 2750) scalar multiplications. The complexity in this case is 32 (= 4^3/C2) * (2 comparisons, 3 scalar multiplications, 3 scalar additions, ?5 lookups, 2 updates) + a constant (= three table allocations) $$uses ffi provisional!Alberto Ruiz (aruiz at um dot es)L%&'()*+,Class used to define generic linear algebra computations for both real and complex matrices. Only double precision is supported in this version (we can )transform single precision objects using  and ). -#Full singular value decomposition. . A version of - which returns only the min (rows m) (cols m) singular vectors of m. If (u,s,v) = thinSVD m then m == u < > diag s < > trans v. /Singular values only. 0 A version of -H which returns an appropriate diagonal matrix with the singular values. If (u,d,v) = fullSVD m then m == u <> d < > trans v. 1 Similar to .U, returning only the nonzero singular values and the corresponding singular vectors. 20Singular values and all right singular vectors. 30Singular values and all right singular vectors. 6RObtains the LU decomposition of a matrix in a compact data structure suitable for 7. 7mSolution of a linear system (for several right hand sides) from the precomputed LU factorization obtained by 6. 8Solve a linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition. For underconstrained or overconstrained systems use ; or :.  It is similar to 7 . 6, but  linearSolve1 raises an error if called on a singular system. 9vSolve a symmetric or Hermitian positive definite linear system using a precomputed Cholesky decomposition obtained by H. :Minimum norm solution of a general linear least squares problem Ax=B using the SVD. Admits rank-deficient systems but it is slower than ;g. The effective rank of A is determined by treating as zero those singular valures which are less than O# times the largest singular value. ;Least squared error solution of an overconstrained linear system, or the minimum norm solution of an underconstrained system. For rank-deficient systems use :. <9Eigenvalues and eigenvectors of a general square matrix. If  (s,v) = eig m then m < > v == v <> diag s =(Eigenvalues of a general square matrix. > Similar to @l without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. ? Similar to Al without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. @NEigenvalues and Eigenvectors of a complex hermitian or real symmetric matrix. If (s,v) = eigSH m then m == v < > diag s < > ctrans v A=Eigenvalues of a complex hermitian or real symmetric matrix. BQR factorization. If  (q,r) = qr m then m == q <> r0, where q is unitary and r is upper triangular. CRQ factorization. If  (r,q) = rq m then m == r <> q0, where q is unitary and r is upper triangular. DHessenberg factorization. If (p,h) = hess m then m == p <> h < > ctrans p, where p is unitary V and h is in upper Hessenberg form (it has zero entries below the first subdiagonal). ESchur factorization. If (u,s) = schur m then m == u <> s < > ctrans u, where u is unitary \ and s is a Shur matrix. A complex Schur matrix is upper triangular. A real Schur matrix is ! upper triangular in 2x2 blocks. "GAnything that the Jordan decomposition can do, the Schur decomposition  can do better!" (Van Loan) F Similar to GV, but instead of an error (e.g., caused by a matrix not positive definite) it returns . G Similar to Hm, without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. HMCholesky factorization of a positive definite hermitian or symmetric matrix. If  c = chol m then c is upper triangular and m == ctrans c <> c. INJoint computation of inverse and logarithm of determinant of a square matrix. 0(inverse, (log abs det, sign or phase of det)) JLDeterminant of a square matrix. To avoid possible overflow or underflow use I. K/Explicit LU factorization of a general matrix. If (l,u,p,s) = lu m then m == p <> l <> u, where l is lower triangular, ] u is upper triangular, p is a permutation matrix and s is the signature of the permutation. L%Inverse of a square matrix. See also I. M#Pseudoinverse of a general matrix. 5Numeric rank of a matrix from the SVD decomposition. numeric zero (e.g. 1*O) input matrix m sv of m  rank of m N3Numeric rank of a matrix from its singular values. numeric zero (e.g. 1*O)  maximum dimension of the matrix singular values  rank of m O#The machine precision of a Double: eps = 2.22044604925031e-16! (the value used by GNU-Octave). P!1 + 0.5*peps == 1, 1 + 0.6*peps /= 1 QThe imaginary unit: i = 0.0 :+ 1.0 R6The nullspace of a matrix from its SVD decomposition. Left "numeric" zero (eg. 1*O),  or Right " theoretical" matrix rank. input matrix m 2 of m /list of unitary vectors spanning the nullspace S$The nullspace of a matrix. See also R. relative tolerance in O units (e.g., use 3 to get 3*O)  input matrix /list of unitary vectors spanning the nullspace TRThe nullspace of a matrix, assumed to be one-dimensional, with machine precision. VWXYZReciprocal of the 2-norm condition number of a matrix, computed from the singular values. Z0Number of linearly independent rows or columns. [DGeneric matrix functions for diagonalizable matrices. For instance: logm = matFunc log\NMatrix exponential. It uses a direct translation of Algorithm 11.3.1 in Golub & Van Loan, + based on a scaled Pade approximation. ][Matrix square root. Currently it uses a simple iterative algorithm described in Wikipedia. jIt only works with invertible matrices that have a real solution. For diagonalizable matrices you can try  matFunc sqrt.  m = (2><2) [4,9  ,0,4] :: Matrix Double >sqrtm m (2><2)  [ 2.0, 2.25  , 0.0, 2.0 ]^<Approximate number of common digits in the maximum element. _>Generalized symmetric positive definite eigensystem Av = lBv, F for A and B symmetric, B positive definite (conditions not checked). A B ;%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_;,879;:LMJIZY-0.1/32<@>=A?_BCHGFDEK6\][STR%&'+*)(^OPQVWXUN458%&&'+*)(()*+,-./01236789:;<=>?@ABCDEFGHIJKLMNOPQRSTVWXYZ[\]^_ provisionalAlberto Ruiz <aruiz@um.es>`IObtains a matrix whose rows are pseudorandom samples from a multivariate  Gaussian distribution. seed number of rows  mean vector covariance matrix result aIObtains a matrix whose rows are pseudorandom samples from a multivariate  uniform distribution. seed number of rows ranges for each column result bCCompute mean vector and covariance matrix of the rows of a matrix. )*+,`ab`abportable provisionalAlberto Ruiz <aruiz@um.es> cZCreates a string from a matrix given a separator and a function to show each entry. Using Gthis function the user can easily define any desired display function:  import Text.Printf(printf) disp = putStr . format " " (printf "%.2f")dShow a matrix with " autoscaling"' and a given number of decimal places. disp = putStr . disps 2  > disp $ 120 * (3><4) [1..] 3x4 E3  0.12 0.24 0.36 0.48  0.60 0.72 0.84 0.96  1.08 1.20 1.32 1.44 e5Show a matrix with a given number of decimal places. disp = putStr . dispf 3  > disp (1/ 3 + ident 4) 4x4 1.333 0.333 0.333 0.333 0.333 1.333 0.333 0.333 0.333 0.333 1.333 0.333 0.333 0.333 0.333 1.333 f5Show a vector using a function for showing matrices. disp = putStr . vecdisp (e 2)  > disp (linspace 10 (0,1)) A10 |> 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00 g,Tool to display matrices with latex syntax. type of braces: "matrix", "bmatrix", "pmatrix", etc. AFormatted matrix, with elements separated by spaces and newlines =Pretty print a complex number with at most n decimal digits. h=Pretty print a complex matrix with at most n decimal digits. i<reads a matrix from a string containing a table of numbers. j=obtains the number of rows and columns in an ASCII data file  (provisionally using unix's wc). k;Loads a matrix from an ASCII file formatted as a 2D table. l]Loads a matrix from an ASCII file (the number of rows and columns must be known in advance). %&'(Ecdefghijkl cdefghijklportable provisionalAlberto Ruiz <aruiz@um.es>mn:Matrix-matrix, matrix-vector, and vector-matrix products. o:creates a vector with a given number of equal components: > constant 2 7 !7 |> [2.0,2.0,2.0,2.0,2.0,2.0,2.0]p4Creates a real vector containing a range of values:  > linspace 5 (-3,7) 5 |> [-3.0,-0.5,2.0,4.5,7.0]/Logarithmic spacing can be defined as follows: )logspace n (a,b) = 10 ** linspace n (a,b)q Dot product: u <.> v = dot u v r:least squares solution of a linear system, similar to the \ operator of Matlab/"Octave (based on linearSolveSVD). yz{|}~ !"#$%&'()*+,-.2359:;<=>?ABCDEFGyz{|}~      !"#$`abcdefghijklmnopqr_op"#!     $qmnr)+*,`abFGedhfgckElji%&'( mnnopqr portable provisionalAlberto Ruiz <aruiz@um.es>!portable provisionalAlberto Ruiz <aruiz@um.es>uses gnuplot and ImageMagick provisional!Alberto Ruiz (aruiz at um dot es) slFrom vectors x and y, it generates a pair of matrices to be used as x and y arguments for matrix functions. t4Draws a 3D surface representation of a real matrix.  / > mesh $ build (10,10) (\\i j -> i + (j-5)^2) NIn certain versions you can interactively rotate the graphic using the mouse. umDraws the surface represented by the function f in the desired ranges and number of points, internally using t.  > let f x y = cos (x + y) " > splot f (0,pi) (0,2*pi) 50 v-plots several vectors against the first one ? > let t = linspace 100 (-3,3) in mplot [t, sin t, exp (-t^2)] wTDraws a list of functions over a desired range and with a desired number of points + > plot [sin, cos, sin.(3*)] (0,2*pi) 1000 xSDraws a parametric curve. For instance, to draw a spiral we can do something like: > > parametricPlot (\t->(t * sin t, t * cos t)) (0,10*pi) 1000 y"writes a matrix to pgm image file zQimshow shows a representation of a matrix as a gray level image using ImageMagick' s display. {|} stuvwxyz{|} vwxutsyz{|} stuvwxyz{|}"uses ffi provisional!Alberto Ruiz (aruiz at um dot es)yz{|}~ !"#$%&'()*+,-.2359:;<=>?ABCDEFGyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr#portable provisional!Alberto Ruiz (aruiz at um dot es)     $     !"#$%&'(      $portable provisional!Alberto Ruiz (aruiz at um dot es))*+,3)*,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\)**,uses ffi provisional!Alberto Ruiz (aruiz at um dot es) ~This is an unscaled version of the lmder algorithm. The elements of the diagonal scaling matrix D are set to 1. This algorithm may be useful in circumstances where the scaled version of lmder converges too slowly, or the function is already scaled appropriately. Interface to gsl_multifit_fdfsolver_lmsder. This is a robust and efficient version of the Levenberg-Marquardt algorithm as implemented in the scaled lmder routine in minpack. Minpack was written by Jorge J. More, Burton S. Garbow and Kenneth E. Hillstrom. ]2Nonlinear multidimensional least-squares fitting. absolute tolerance relative tolerance %maximum number of iterations allowed function to be minimized  Jacobian starting point &solution vector and optimization path Higher level interface to   . The optimization function and ] Jacobian are automatically built from a model f vs x = y and its derivatives, and a list of ( instances (x, (y,sigma)) to be fitted. absolute tolerance relative tolerance %maximum number of iterations allowed (model, derivatives)  instances starting point ((solution, error) and optimization path Higher level interface to   . The optimization function and ] Jacobian are automatically built from a model f vs x = y and its derivatives, and a list of  instances (x,y) to be fitted. absolute tolerance relative tolerance %maximum number of iterations allowed (model, derivatives)  instances starting point solution and optimization path ^DModel-to-residual for association pairs with sigma, to be used with . _Associated derivative for ^. `9Model-to-residual for association pairs, to be used with . It is equivalent  to ^ with all sigmas = 1. aAssociated derivative for `. ~~~uses -fffi and -fglasgow-exts provisional!Alberto Ruiz (aruiz at um dot es)VThis action removes the GSL default error handler (which aborts the program), so that N GSL errors can be handled by Haskell (using Control.Exception) and ghci doesn' t abort. Byz{|}~defghijklmnopqrstuvwx~portable provisional!Alberto Ruiz (aruiz at um dot es)bcdefghijklaapply a test to successive elements of a vector, evaluates to true iff test passes for all pairs Bsuccessive_ :: Storable a => (a -> a -> Bool) -> Vector a -> Bool woperate on successive elements of a vector and return the resulting vector, whose length 1 less than that of the input Psuccessive :: (Storable a, Storable b) => (a -> a -> b) -> Vector a -> Vector b 9All tests must pass with a maximum dimension of about 20 A (some tests may fail with bigger sizes due to precision loss). maximum dimension Performance measurements. m%&'%&(%&)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    %&  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~nnnnnnnnnnop                                          n      !"#$n%&'(#)#*#+#,#-#-#.#.#/#/#0#0#1#2#2#3#3#4#4#5#6#7#8#9#:#;#<#=#>#?#@#A#B#C#D#E#F#G#H#I$J$K$5$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z$[$\$]$^$_$`$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$y$z${$|}~5hmatrix-0.12.0.2Data.Packed.DevelopmentData.Packed.VectorNumeric.ContainerData.Packed.MatrixData.Packed.STNumeric.GSL.DifferentiationNumeric.GSL.IntegrationNumeric.GSL.FourierNumeric.GSL.PolynomialsNumeric.GSL.ODENumeric.GSL.MinimizationNumeric.GSL.RootNumeric.LinearAlgebra.LAPACK Numeric.LinearAlgebra.Algorithms Graphics.PlotNumeric.GSL.Fitting Numeric.GSLNumeric.LinearAlgebra.TestsData.Packed.Internal.SignaturesData.Packed.Internal.CommonData.Packed.Internal.VectorNumeric.GSL.VectorData.Packed.Internal.MatrixNumeric.ConversionData.Packed.InternalNumeric.GSL.Internal Data.PackedNumeric.ContainerBoot Numeric.ChainData.Packed.Random Numeric.IONumeric.MatrixNumeric.VectorNumeric.LinearAlgebra%Numeric.LinearAlgebra.Tests.Instances&Numeric.LinearAlgebra.Tests.Properties vector-0.9Data.Vector.StorableunsafeToForeignPtrunsafeFromForeignPtrVector//app1app2app3app4app5app6app7app8app9app10checkdimvec createVectorfromListtoList|> subVector@>jointakesV mapVector zipVectorWithunzipVectorWith foldVectorfoldVectorWithIndexfoldLoop foldVectorG mapVectorM mapVectorM_mapVectorWithIndexMmapVectorWithIndexM_mapVectorWithIndex fscanfVector fprintfVector freadVector fwriteVectorRandDistGaussianUniform randomVectorElementMatrix MatrixOrder ColumnMajorRowMajorrowscolsorderOftranscmatfmatmatflattentoListsfromRowstoRows fromColumns toColumns@@> createMatrixreshape liftMatrix liftMatrix2 subMatrix saveMatrix Complexable RealElementSTMatrixSTVector thawVectorunsafeThawVector runSTVectorunsafeReadVectorunsafeWriteVector modifyVector liftSTVector freezeVectorunsafeFreezeVector readVector writeVectornewUndefinedVector newVector thawMatrixunsafeThawMatrix runSTMatrixunsafeReadMatrixunsafeWriteMatrix modifyMatrix liftSTMatrixunsafeFreezeMatrix freezeMatrix readMatrix writeMatrixnewUndefinedMatrix newMatrix derivCentral derivForward derivBackward integrateQAGS integrateQNGfftifft polySolve ODEMethodGear2Gear1BSimpRK4impRK2impRK8pdRKckRKf45RK4RK2odeSolve odeSolveV fromBlocksflipudfliprldiagRecttakeDiag><takeRowsdropRows takeColumns dropColumns fromListsasRowasColumn buildMatrix fromArray2D extractRowsrepmatliftMatrix2AutotoBlocks toBlocksEverymapMatrixWithIndexM_mapMatrixWithIndexMmapMatrixWithIndex mapMatrixMinimizeMethodDSteepestDescent VectorBFGS2 VectorBFGS ConjugatePR ConjugateFRMinimizeMethod NMSimplex2 NMSimplexminimizeNMSimplexminimizeConjugateGradientminimizeVectorBFGS2minimize minimizeV minimizeD minimizeVD RootMethodJGNewtonNewtonHybridJHybridsJ RootMethodBroydenDNewtonHybridHybridsrootrootJ buildVector zipVector unzipVector multiplyR multiplyC multiplyF multiplyQsvdRsvdRdsvdCsvdCdthinSVDRthinSVDC thinSVDRd thinSVDCdsvRsvCsvRdsvCdrightSVRrightSVCleftSVRleftSVCeigCeigOnlyCeigReigOnlyReigSeigS'eigHeigH'eigOnlySeigOnlyH linearSolveR linearSolveC cholSolveR cholSolveClinearSolveLSRlinearSolveLSClinearSolveSVDRlinearSolveSVDCcholHcholSmbCholHmbCholSqrRqrChessRhessCschurRschurCluRluClusRlusCkonst'build'DoubleOfSingleOf ComplexOfRealOfConvertrealcomplexsingledouble toComplex fromComplexProductmultiplydotabsSumnorm1norm2normInf Containerscalarconjscale scaleRecip addConstantaddsubmuldivideequalarctan2cmapkonstbuildatIndexminIndexmaxIndex minElement maxElement sumElements prodElementsstepcondfindassocaccumIndexOfmXmmXvvXmouter kronecker.**/<|><-> vectorMin vectorMaxvectorMaxIndexvectorMinIndexctransdiagident optimiseMultNormedpnormNormType FrobeniusPNorm2PNorm1InfinityFieldsvdthinSVDsingularValuesfullSVD compactSVDrightSVleftSVfulleconomyluPackedluSolve linearSolve cholSolvelinearSolveSVD linearSolveLSeig eigenvalueseigSH'eigenvaluesSH'eigSH eigenvaluesSHqrrqhessschurmbCholSHcholSHcholinvlndetdetluinvpinvranksvepspepsi nullspaceSVD nullspacePrec nullVectorpinvTol haussholderunpackQR unpackHessrcondrankmatFuncexpmsqrtm relativeErrorgeigSH'gaussianSample uniformSamplemeanCovformatdispsdispfvecdisp latexFormatdispcffileDimensions loadMatrixfromFileMul<>constantlinspace<.><\>meshdommeshsplotmplotplotparametricPlot matrixToPGMimshowgnuplotX gnuplotpdf gnuplotWin FittingMethodLevenbergMarquardtLevenbergMarquardtScaled nlFittingfitModelScaledfitModelsetErrorHandlerOffqCheckrunTestsfindNaN runBenchmarksTMMCVMTMCVMTCVMTVCVTCMCVTQMQMQMTQMQMTQMTQVFTQVQVQVTQVQVTQVTCVVTCVCVCVTCVCVTCVTCMCMCMTCMCMVCMTCMVCMTVCMTCMCM TCMCMCVCMTMCMCVCMTCMCVCMTCVCMTCMTMMVMTMVMTMMVTMVTVVMTVMTMMMTMVMMTVMMTMMTMTFMFMFMTFMFMTFMTVVVTVVTVTFFFTVFTFVTFFTFPCPQPDPFAdapt10Adapt9Adapt8Adapt7Adapt6Adapt5Adapt4Adapt3Adapt2Adapt1Adapt gsl_strerrorfinit splitEverycommon compatdimtablefi errorCodembCatchgsl_vector_fwritegsl_vector_freadgsl_vector_fprintfgsl_vector_fscanfc_condDc_condFc_stepDc_stepFc_double2floatc_float2doubleinlinePerformIOat'atasReal asComplex float2DoubleV double2FloatVstepFstepDcondFcondD cloneVector unsafeWithsafeFunCodeSMinMinIdxMaxMaxIdxAbsSumNorm2 FunCodeVVATan2PowDivSubAdd FunCodeSVPowVSPowSVNegate AddConstantRecipScaleFunCodeVSqrtSignLogExpATanhACoshASinhTanhCoshSinhATanACosASinAbsTanCosSinc_random_vector c_vectorZipQ c_vectorZipF c_vectorZipC c_vectorZipRc_vectorMapValQc_vectorMapValFc_vectorMapValCc_vectorMapValR c_vectorMapQ c_vectorMapF c_vectorMapC c_vectorMapR c_toScalarQ c_toScalarC c_toScalarF c_toScalarRc_dotCc_dotQc_dotRc_dotFc_prodCc_prodQc_prodRc_prodFc_sumCc_sumQc_sumRc_sumFsumFsumRsumQsumCprodFprodRprodQprodCdotFdotRdotQdotC toScalarR toScalarF toScalarC toScalarQ vectorMapR vectorMapC vectorMapF vectorMapQ vectorMapValR vectorMapValC vectorMapValF vectorMapValQ vectorZipR vectorZipC vectorZipF vectorZipQbaseForeign.StorableStorable subMatrixD transdata constantDMtMFfdatMCirowsicolscdatmatrix_fprintf cconstantP cconstantC cconstantQ cconstantR cconstantFctransPctransCctransQctransRctransFcompat transdata' transdataP constantF constantR constantQ constantC constantPmatrixFromVector singleton conformMs conformVs conformMTo conformVTosizeshSize toComplex' fromComplex'comp'single'double' Precision double2FloatG float2DoubleG toComplexV fromComplexV Data.Complexphase magnitudepolarcismkPolar conjugateimagPartrealPart:+ComplexioReadVioWriteVioReadMioWriteMmkfunc_derivderivGenc_integrate_qngc_integrate_qagsc_fftghc-prim GHC.TypesDouble c_polySolve polySolve'mkDoubleVecMatfun mkVecMatfunmkDoubleVecVecfun mkVecVecfunmkVecfunivaux_vTovaux_vTomcreateV createMIOode_cjoinVert joinHorizcompat' c_minimizeD c_minimizec_rootjc_rootchunkchunksTQTWzgetrsdgetrszgetrfdgetrfzgeesdgeeszgehrddgehrdzgeqr2dgeqr2dpotrfzpotrfzgelssdgelsszgelsdgelszpotrsdpotrszgesvdgesvzheevdsyevzgeevdgeevzgesdddgesddzgesvddgesvdcgemmcsgemmczgemmcdgemmceigRaux Data.MaybeMaybe ContainerOf'Konst ContainerOfBoundsOfBuildJoinablejoinHjoinV ElementOfArgOf c_conjugateC c_conjugateQ conjugateQ conjugateCIndexesCostSizesMatricesupdatenewWorkSpaceCostnewWorkSpaceIndexesmatricesToSizeschain chain_cost chain_cost' minimum_cost smaller_cost chain_parenm1m2m3m4svd'thinSVD'sv' luPacked'luSolve' linearSolve' cholSolve'linearSolveSVD'linearSolveLS'eig'eigSH''eigOnly eigOnlySHcholSH' mbCholSH'qr'hess'schur'NothingrankSVDgolubeps showComplexZMFMCMRM ConsistentPosDefSqWCWCArbitraryFieldHerRotSqtrivialshrinkListElementwise shrinkPairrMcMfMzMrHercHerrRotcRotrSqcSqrWCcWCrSqWCcSqWCrPosDefcPosDefrConsistcConsistAprox:~dist|~|~:squareunitary hermitianwellCondpositiveDefinite upperTriangupperHessenbergzerosonesluPropinvProppinvPropdetProp nullspacePropbugPropsvdProp1 svdProp1a svdProp1bsvdProp2svdProp3svdProp4 svdProp5a svdProp5b svdProp6a svdProp6bsvdProp7eigProp eigSHPropeigProp2 eigSHProp2qrProprqProprqProp1rqProp2rqProp3hessProp schurProp1 schurProp2cholProp exactProp expmDiagProp multProp1 multProp2linearSolveProplinearSolveProp2subPropc_nlfitresMsresDsresMresDMaybeT runMaybeTStaterunStaterot state_get state_put evalState