{      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij k l m n o p q r s t u v w xyz{|}~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz$portable (uses FFI) provisionalAlberto Ruiz <aruiz@um.es>4{|}~4{|}~4{|}~portable (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>, FOne-dimensional array of objects stored in a contiguous memory block. offset of first element number of elements $foreign pointer to the memory block (Same convention as in Roman Leshchinskiy's vector package. 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 sum of elements product of elements  product of elements !product of elements "product of elements # dot product $ dot product % dot product & dot product 'Vobtains 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 /(map of real vectors with given function 0+map of complex vectors with given function 1(map of real vectors with given function 2+map of complex vectors with given function 3&elementwise operation on real vectors 4)elementwise operation on complex vectors 5&elementwise operation on real vectors 6)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()*      !"#$%&'()*+,-./0123456+G(*))*          !"#$%&'()*+,-./0123456+portable (uses FFI) provisionalAlberto Ruiz <aruiz@um.es>6789:;<=>?@A,Supported matrix elements. 'This class provides optimized internal + operations for selected element types. - It provides unoptimised defaults for any B type, + so you can create instances simply as:  instance Element Foo. C(r0,c0) starting position  (rt,ct) dimensions of submatrix DEF-@Matrix representation suitable for GSL and LAPACK computations. 6The elements are stored in a continuous memory array. GHIJKL./01234Matrix transpose. 5678*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]9the 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. ?@Creates 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 ]ABapplication of a vector function on the flattened matrix elements BDapplication of a vector function on the flattened matrices elements MNOPQRSTC$Extracts a submatrix from a matrix. (r0,c0) starting position  (rt,ct) dimensions of submatrix  input matrix result D"Saves a matrix as 2D ASCII table. format (%f, %g, %e) $,CDE-GHIJKL./0123456789:;<=>U?@VABCD",CDECDE-IGJKLJKHGHIJKL.0//0123456789:;<=>?@ABCDportable provisionalAlberto Ruiz <aruiz@um.es> E,Structures that may contain complex numbers WXYZ[FSupported real types \-Supported single-double precision type pairs ]^_Dcreates a complex vector from vectors with real and imaginary parts `the inverse of  toComplex abcdefghijEWXYZ[FEWXYZ[WXYZ[Fportable provisionalAlberto Ruiz <aruiz@um.es>{|}~   !"#$%&',CDE-GHIJKL./0123456789:;<=>U?@VABCDportable provisionalAlberto Ruiz <aruiz@um.es>"GkHlmnIJKLMNOPQRSTUopVWXYZ[\]^_`abGHIJKLMNOPQRSTUVWXYZ[\]^_`abHUIPKRSNOGbV^X_`[\TLMJQaYZW]GHIJKLMNOPQRSTUVWXYZ[\]^_`abuses ffi provisional!Alberto Ruiz (aruiz at um dot es)qVconversion of Haskell functions into function pointers that can be used in the C side rs'type: 0 central, 1 forward, 2 backward initial step size  function $point where the derivative is taken result and error c'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 d'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 e(Adaptive backward difference algorithm, gsl_deriv_backward. initial step size  function $point where the derivative is taken result and absolute error cdecdecdeuses ffi provisional!Alberto Ruiz (aruiz at um dot es)tuvVconversion of Haskell functions into function pointers that can be used in the C side fNumerical 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 gNumerical 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 fggffguses ffi provisional!Alberto Ruiz (aruiz at um dot es)whFast 1D Fourier transform of a   (j x) 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)]iThe inverse of h, using gsl_fft_complex_inverse. hihihi uses ffi provisional!Alberto Ruiz (aruiz at um dot es)yj0Solution 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]zjjj{|}~Vconversion of Haskell functions into function pointers that can be used in the C side  {|}~{|}~ uses ffi provisional!Alberto Ruiz (aruiz at um dot es)kStepping functions lM=2 implicit Gear method. mM=1 implicit Gear method. n]Implicit Bulirsch-Stoer method of Bader and Deuflhard. This algorithm requires the Jacobian. o3Implicit 4th order Runge-Kutta at Gaussian points. p3Implicit 2nd order Runge-Kutta at Gaussian points. q2Embedded Runge-Kutta Prince-Dormand (8,9) method. r.Embedded Runge-Kutta Cash-Karp (4, 5) method. s_Embedded Runge-Kutta-Fehlberg (4, 5) method. This method is a good general-purpose integrator. t4th order (classical) Runge-Kutta. The error estimate is obtained by halving the step-size. For more efficient estimate of the error, use s. u$Embedded Runge-Kutta (2, 3) method. v A version of wQ with reasonable default parameters and system of equations defined using lists.  xdot(t,x) initial conditions desired solution times  solution w9Evolution 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 klmnopqrstuvw vwkutsrqponml k utsrqponmllmnopqrstuvw provisionalAlberto Ruiz <aruiz@um.es>2creates a matrix from a vertical list of matrices 4creates a matrix from a horizontal list of matrices xCCreates 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 0yReverse rows zReverse 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 Bm 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. $,-12489:;<=>@ABCxyz{|}~$-,12}4@89>:;<=xyzC~{|ABxyz{|}~ 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> ./03567??7 .0/356 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);  !"#,-12489:;<=>@ABCxyz{|}~portable provisionalAlberto Ruiz <aruiz@um.es>E+the product of elements (faster than using fold) 'the sum of elements (faster than using fold) value of max element value of min element index of max element index of min element indexing function $create a structure using a function Hilbert matrix of order N: hilb n = build (n,n) (\i j -> 1/(i+j+1))!constant structure of given size Fcannot implement instance Functor because of Element class constraint element by element division "element by element multiplication 7scale the element by element reciprocal of the object: scaleRecip 2 (fromList [5,i]#) == 2 |> [0.4 :+ 0.0,0.0 :+ (-2.0)]complex conjugate )create a structure with a single element :Basic element-by-element functions for numeric containers element of maximum magnitude euclidean norm "sum of absolute value of elements @sum of absolute value of elements (differs in complex case from norm1) dot (inner) product matrix product %Matrix product and related functions      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 GabcdefghijEF     7     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)J !"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. & 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. ' Similar to $U, returning only the nonzero singular values and the corresponding singular vectors. (0Singular values and all right singular vectors. )0Singular values and all right singular vectors. ,RObtains the LU decomposition of a matrix in a compact data structure suitable for -. -mSolution of a linear system (for several right hand sides) from the precomputed LU factorization obtained by ,. .Solve a linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition. For underconstrained or overconstrained systems use 1 or 0.  It is similar to - . ,, but  linearSolve1 raises an error if called on a singular system. /vSolve a symmetric or Hermitian positive definite linear system using a precomputed Cholesky decomposition obtained by >. 0Minimum norm solution of a general linear least squares problem Ax=B using the SVD. Admits rank-deficient systems but it is slower than 1g. The effective rank of A is determined by treating as zero those singular valures which are less than D# times the largest singular value. 1Least squared error solution of an overconstrained linear system, or the minimum norm solution of an underconstrained system. For rank-deficient systems use 0. 29Eigenvalues and eigenvectors of a general square matrix. If  (s,v) = eig m then m < > v == v <> diag s 3(Eigenvalues of a general square matrix. 4 Similar to 6l without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. 5 Similar to 7l without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. 6NEigenvalues and Eigenvectors of a complex hermitian or real symmetric matrix. If (s,v) = eigSH m then m == v < > diag s < > ctrans v 7=Eigenvalues of a complex hermitian or real symmetric matrix. 8QR factorization. If  (q,r) = qr m then m == q <> r0, where q is unitary and r is upper triangular. 9RQ factorization. If  (r,q) = rq m then m == r <> q0, where q is unitary and r is upper triangular. :Hessenberg 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). ;Schur 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) < Similar to =V, but instead of an error (e.g., caused by a matrix not positive definite) it returns . = Similar to >m, without checking that the input matrix is hermitian or symmetric. It works with the upper triangular part. >MCholesky factorization of a positive definite hermitian or symmetric matrix. If  c = chol m then c is upper triangular and m == ctrans c <> c. ? Determinant of a square matrix. @/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. AInverse of a square matrix. B#Pseudoinverse of a general matrix. 5Numeric rank of a matrix from the SVD decomposition. numeric zero (e.g. 1*D) input matrix m sv of m  rank of m C3Numeric rank of a matrix from its singular values. numeric zero (e.g. 1*D)  maximum dimension of the matrix singular values  rank of m D#The machine precision of a Double: eps = 2.22044604925031e-16! (the value used by GNU-Octave). E!1 + 0.5*peps == 1, 1 + 0.6*peps /= 1 FThe imaginary unit: i = 0.0 :+ 1.0 G6The nullspace of a matrix from its SVD decomposition. Left "numeric" zero (eg. 1*D),  or Right " theoretical" matrix rank. input matrix m ( of m /list of unitary vectors spanning the nullspace H$The nullspace of a matrix. See also G. relative tolerance in D units (e.g., use 3 to get 3*D)  input matrix /list of unitary vectors spanning the nullspace IRThe nullspace of a matrix, assumed to be one-dimensional, with machine precision. KLMNZReciprocal of the 2-norm condition number of a matrix, computed from the singular values. O0Number of linearly independent rows or columns. PDGeneric matrix functions for diagonalizable matrices. For instance: logm = matFunc logQNMatrix exponential. It uses a direct translation of Algorithm 11.3.1 in Golub & Van Loan, + based on a scaled Pade approximation. R[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 ]S<Approximate number of common digits in the maximum element. 9 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS9".-/10AB?ON#&$'%)(26437589>=<:;@,QRPHIG! SDEFKLMJC*+6!  !"#$%&'(),-./0123456789:;<=>?@ABCDEFGHIKLMNOPQRS provisionalAlberto Ruiz <aruiz@um.es>TIObtains a matrix whose rows are pseudorandom samples from a multivariate  Gaussian distribution. seed number of rows  mean vector covariance matrix result UIObtains a matrix whose rows are pseudorandom samples from a multivariate  uniform distribution. seed number of rows ranges for each column result VCCompute mean vector and covariance matrix of the rows of a matrix. ()*+TUVTUVportable provisionalAlberto Ruiz <aruiz@um.es> WZCreates 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")XShow 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 Y5Show 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 Z5Show a vector using a function for showing matrices. disp = putStr . vecdisp (Y 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 [,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. \=Pretty print a complex matrix with at most n decimal digits. ]<reads a matrix from a string containing a table of numbers. ^=obtains the number of rows and columns in an ASCII data file  (provisionally using unix's wc). _;Loads a matrix from an ASCII file formatted as a 2D table. `]Loads a matrix from an ASCII file (the number of rows and columns must be known in advance). $%&'DWXYZ[\]^_` WXYZ[\]^_`portable provisionalAlberto Ruiz <aruiz@um.es>a:Matrix-matrix, matrix-vector, and vector-matrix products. b: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]c4Creates 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)d Dot product: u <.> v = dot u v e:least squares solution of a linear system, similar to the \ operator of Matlab/"Octave (based on linearSolveSVD). abcdefghij  !"#$%&'()*+,-12489:;<=>@ABCDEFxyz{|}~     TUVWXYZ[\]^_`abcdeYbc   dae (*)+TUVEFYX\Z[W_D`^]$%&' abcde portable provisionalAlberto Ruiz <aruiz@um.es>!portable provisionalAlberto Ruiz <aruiz@um.es>uses gnuplot and ImageMagick provisional!Alberto Ruiz (aruiz at um dot es) flFrom vectors x and y, it generates a pair of matrices to be used as x and y arguments for matrix functions. g4Draws 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. hmDraws the surface represented by the function f in the desired ranges and number of points, internally using g.  > let f x y = cos (x + y) " > splot f (0,pi) (0,2*pi) 50 i-plots several vectors against the first one ? > let t = linspace 100 (-3,3) in mplot [t, sin t, exp (-t^2)] jTDraws a list of functions over a desired range and with a desired number of points + > plot [sin, cos, sin.(3*)] (0,2*pi) 1000 kSDraws 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 l"writes a matrix to pgm image file mQimshow shows a representation of a matrix as a gray level image using ImageMagick' s display. nop fghijklmnop ijkhgflmnop fghijklmnop"uses ffi provisional!Alberto Ruiz (aruiz at um dot es)abcdefghij  !"#$%&'()*+,-12489:;<=>@ABCDEFxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde#portable provisional!Alberto Ruiz (aruiz at um dot es)$     $portable provisional!Alberto Ruiz (aruiz at um dot es)1 !"#$%&'()*+,-./0123456789:;<=>?@ABCuses ffi provisional!Alberto Ruiz (aruiz at um dot es) DqrThis 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. sInterface 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. t2Nonlinear 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 uHigher level interface to t s . 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 vHigher level interface to t r . 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 EDModel-to-residual for association pairs with sigma, to be used with v. FAssociated derivative for E. G9Model-to-residual for association pairs, to be used with v. It is equivalent  to E with all sigmas = 1. HAssociated derivative for G. qrstuvtqsruvqsrrstuvuses -fffi and -fglasgow-exts provisional!Alberto Ruiz (aruiz at um dot es)wVThis 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. Babcdefghijcdefghijklmnopqrstuvwqrstuvwwwportable provisional!Alberto Ruiz (aruiz at um dot es) IJKLMNOPQRSyaapply 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 zPerformance measurements. xyzxyzyzT%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~fffffffffflm                                          f   f  ######################### #!#"###$#%#&#'#(#)#*#+#,#-#.#/#0$1$2$$3$4$5$6$7$8$9$:$;$<$=$>$?$@$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$[$\$]$^$_$`$abcdefgghiijklmnohmatrix-0.10.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//app1app2app3app4app5app6app7app8app9app10checkVectorunsafeToForeignPtrunsafeFromForeignPtrdimvec createVectorfromListtoList|> subVector@>jointakesV mapVector zipVectorWithunzipVectorWith foldVectorfoldVectorWithIndexfoldLoop foldVectorG mapVectorM mapVectorM_mapVectorWithIndexMmapVectorWithIndexM_ 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 toBlocksEveryMinimizeMethodDSteepestDescent 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 cholSolveClinearSolveLSRlinearSolveLSClinearSolveSVDRlinearSolveSVDCcholHcholSmbCholHmbCholSqrRqrChessRhessCschurRschurCluRluClusRlusCIndexOf prodElements sumElements maxElement minElementmaxIndexminIndexatIndexbuildkonstcmaparctan2equaldividemulsubadd addConstant scaleRecipscaleconjscalar ContainernormInfnorm2norm1absSumdotmultiplyProduct fromComplex toComplexdoublesinglecomplexrealConvertRealOf ComplexOfSingleOfDoubleOfbuild'konst'mXmmXvvXmouter kronecker.**/<|><-> vectorMin vectorMaxvectorMaxIndexvectorMinIndexctransdiagident optimiseMultNormedpnormNormType FrobeniusPNorm2PNorm1InfinityFieldsvdthinSVDsingularValuesfullSVD compactSVDrightSVleftSVfulleconomyluPackedluSolve linearSolve cholSolvelinearSolveSVD linearSolveLSeig eigenvalueseigSH'eigenvaluesSH'eigSH eigenvaluesSHqrrqhessschurmbCholSHcholSHcholdetluinvpinvranksvepspepsi nullspaceSVD nullspacePrec nullVectorpinvTol haussholderunpackQR unpackHessrcondrankmatFuncexpmsqrtm relativeErrorgaussianSample uniformSamplemeanCovformatdispsdispfvecdisp latexFormatdispcffileDimensions loadMatrixfromFile<>constantlinspace<.><\>meshdommeshsplotmplotplotparametricPlot matrixToPGMimshowgnuplotX gnuplotpdf gnuplotWin FittingMethodLevenbergMarquardtLevenbergMarquardtScaled nlFittingfitModelScaledfitModelsetErrorHandlerOffqCheckrunTests runBenchmarksTMMCVMTMCVMTCVMTVCVTCMCVTQMQMQMTQMQMTQMTQVFTQVQVQVTQVQVTQVTCVVTCVCVCVTCVCVTCVTCMCMCMTCMCMVCMTCMVCMTVCMTCMCM TCMCMCVCMTMCMCVCMTCMCVCMTCVCMTCMTMMVMTMVMTMMVTMVTVVMTVMTMMMTMVMMTVMMTMMTMTFMFMFMTFMFMTFMTVVVTVVTVTFFFTVFTFVTFFTFPCPQPDPF gsl_strerrorfinitAdapt10Adapt9Adapt8Adapt7Adapt6Adapt5Adapt4Adapt3Adapt2Adapt1Adapt splitEverycommon compatdimtablefi errorCodembCatchgsl_vector_fwritegsl_vector_freadgsl_vector_fprintfgsl_vector_fscanfc_double2floatc_float2doubleVioffidimfptrinlinePerformIOat'atasReal asComplex float2DoubleV double2FloatV cloneVector unsafeWithsafec_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_sumFFunCodeSMinMinIdxMaxMaxIdxAbsSumNorm2 FunCodeVVATan2PowDivMulSubAdd FunCodeSVPowVSPowSVNegate AddConstantRecipScaleFunCodeVSqrtSignLogExpATanhACoshASinhTanhCoshSinhATanACosASinAbsTanCosSinsumFsumRsumQsumCprodFprodRprodQprodCdotFdotRdotQdotC toScalarR toScalarF toScalarC toScalarQ vectorMapR vectorMapC vectorMapF vectorMapQ vectorMapValR vectorMapValC vectorMapValF vectorMapValQ vectorZipR vectorZipC vectorZipF vectorZipQmatrix_fprintf cconstantP cconstantC cconstantQ cconstantR cconstantFctransPctransCctransQctransRctransFbaseForeign.StorableStorable subMatrixD transdata constantDMtMFfdatMCirowsicolscdatcompat transdata' transdataP constantF constantR constantQ constantC constantPmatrixFromVector singleton 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_rootchunkchunkszgetrsdgetrszgetrfdgetrfzgeesdgeeszgehrddgehrdzgeqr2dgeqr2dpotrfzpotrfzgelssdgelsszgelsdgelszpotrsdpotrszgesvdgesvzheevdsyevzgeevdgeevzgesdddgesddzgesvddgesvdcgemmcsgemmczgemmcdgemmcTQTWeigRaux Data.MaybeMaybeArgOf ElementOfjoinVjoinHJoinableBuildBoundsOf ContainerOfKonst ContainerOf' 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 nullspacePropsvdProp1 svdProp1a svdProp1bsvdProp2svdProp3svdProp4 svdProp5a svdProp5b svdProp6a svdProp6bsvdProp7eigProp eigSHPropeigProp2 eigSHProp2qrProprqProprqProp1rqProp2rqProp3hessProp schurProp1 schurProp2cholProp expmDiagProp multProp1 multProp2linearSolveProplinearSolveProp2subPropc_nlfitresMsresDsresMresDMaybeT runMaybeTStaterunStaterot state_get state_put evalState