xN9\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg h ij k l mn opqrstuvwxyz{|}~              !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[1 experimental%Patrick Perry <patperry@stanford.edu>4The base class for objects with shapes and indices  (i.e. Vector, Matrix, etc.). AGet the shape of the tensor. For vectors this is the dimension. # For matrices, this will be a pair (m,n) of the number of rows  and columns. .Get the range of valid indices in the tensor.  experimental%Patrick Perry <patperry@stanford.edu> A class for immutable tensors. 0Get the numer of elements stored in the tensor. AGet a new tensor by replacing the elements at the given indices. EGet the value at the given index, without doing any bounds-checking. Same as '()' but doesn't do any bounds-checking. 6Get the indices of the elements stored in the tensor. 'Get the elements stored in the tensor. Get the list of (index, element) pairs stored in the tensor. *Apply a function elementwise to a tensor. (Scale every element by the given value. !Add a constant to every element. >Get the value at the given index. Range-checks the argument.         experimental%Patrick Perry <patperry@stanford.edu>The base class for elements. &Get the complex conjugate of a value. Get the magnitude of a value. Get the l1 norm of a value.  Convert a double to an element. >Try to coerce a value to a double. This will fail unless the 4 complex part is zero (according to a comparison by (~==)).  experimental%Patrick Perry <patperry@stanford.edu>Multiplication side. Diagonal storage. #Lower or upper triangular storage. Transpose type.  !Matrix element storage order. "#$ Exchange RowMajor and ColMajor. % Exchange NoTrans and  ConjTrans. & Exchange Upper and Lower. ' Exchange LeftSide and  RigthSide.  !"#$%&'  !#""#$%&' experimental%Patrick Perry <patperry@stanford.edu> (/A base class for objects shaped like matrices. )>Creates a new matrix view that conjugates and transposes the  given matrix. *CA class for matrix types that use a matrix internally for storage,  Data.Matrix.Banded.Class for example. +6An associated type for the underlying matrix storage. ,BA class for matrices with an associated type for row, column, and  diagonal vector views. -8An associated type for a vector view into a matrix type a. @ Typically, the view will share the same storage as the matrix, : so that modifying an element in the view will affect the 6 corresponding element in the matrix, and vice versa. .&Get the number of rows in the matrix. /&Get the number of rows in the matrix. 0JIndicate whether or not a matrix has the same number of rows and columns. 1EIndicate whether or not the number of rows is less than or equal to  the number of columns. 2HIndicate whether or not the number of rows is greater than or equal to  the number of columns. 3 Replaces (m,n) with (n,m)  !"#$%&'()*+,-./0123()./0123,-*+!#" $%&' ())*++,--./0123 experimental%Patrick Perry <patperry@stanford.edu> 4EA triangular or trapezoidal view of an underlying matrix. The view H can either be of the upper or lower triangular part of the matrix, and H can optionally include or exclude the diagonal. If the diagonal enum  is Unit8, the diagonal entries of the underlying matrix are not # referenced, but are assumed to be 1&. The type arguments are as follows:  a: the underlyting matrix type.  np,: a phantom type for the shape of the view.  e": the element type of the matrix. 56Cast the phantom shape type. 7%Apply a function to the base matrix. 86Convert from a base matrix type to a triangular view. 93Convert from a triangular view to the base matrix. :)Get a lower triangular view of a matrix. ;=Get a lower triangular view of a matrix, with unit diagonal. <*Get an upper triangular view of a matrix. =>Get an upper triangular view of a matrix, with unit diagonal. 456789:;<= 4556789:;<= experimental%Patrick Perry <patperry@stanford.edu>\]^_`abcdefghijklmnopqrstu\^`bdfghijklmnopqrstu\^`bdfghijklmnopqrstu experimental%Patrick Perry <patperry@stanford.edu>vwxyz{|}~vwxyz{|}~vwxyz{|}~ experimental%Patrick Perry <patperry@stanford.edu>    experimental%Patrick Perry <patperry@stanford.edu>>%Types with vector-vector operations. >>  experimental%Patrick Perry <patperry@stanford.edu> ?%Types with matrix-vector operations.  ? ? ! experimental%Patrick Perry <patperry@stanford.edu> @-Types with matrix-matrix operations.  @ @  experimental%Patrick Perry <patperry@stanford.edu> >?@ >?@ experimental%Patrick Perry <patperry@stanford.edu>A&Class for modifiable mutable tensors. BEGet the maximum number of elements that can be stored in the tensor. C"Sets all stored elements to zero. D-Sets all stored elements to the given value. E2True if the value at a given index can be changed FCSet the value of the element at the given index, without doing any  range checking. GBModify the value of the element at the given index, without doing  any range checking. H1Replace each element by a function applied to it ISame as swapElem& but arguments are not range-checked. J2Replace every element with its complex conjugate. K6Scale every element in the vector by the given value. L*Add a value to every element in a vector. M%Class for mutable read-only tensors. N1Get the number of elements stored in the tensor. O9Get the value at the specified index, without doing any  range-checking. P4Returns a lazy list of the indices in the tensor. B Because of the laziness, this function should be used with care.  See also  getIndices'. Q7Returns a list of the indices in the tensor. See also  P. R5Returns a lazy list of the elements in the tensor. B Because of the laziness, this function should be used with care.  See also  getElems'. S8Returns a list of the elements in the tensor. See also  R. TAReturns a lazy list of the elements-index pairs in the tensor. B Because of the laziness, this function should be used with care.  See also  getAssocs' . UDReturns a list of the index-elements pairs in the tensor. See also  T. VGGets the value at the specified index after checking that the argument  is in bounds. W1Set the value of the element at the given index. X4Update the value of the element at the given index. Y7Swap the values stored at two positions in the tensor. ABCDEFGHIJKLMNOPQRSTUVWXYMNOPQRSTUVABCDEFGHIJKLWXYA BCDEFGHIJKLBCDEFGHIJKLMNOPQRSTUNOPQRSTUVWXY" experimental%Patrick Perry <patperry@stanford.edu># experimental%Patrick Perry <patperry@stanford.edu>#ZDense vectors in the , monad. The type arguments are as follows:  n1: a phantom type for the dimension of the vector  e>: the element type of the vector. Only certain element types  are supported. [%View an array in memory as a vector. offset length \<View an array in memory as a vector, with the given stride. stride offset length ] Execute an 3 action with a pointer to the first element in the  vector.      #Z[\]     #Z[\]     $ experimental%Patrick Perry <patperry@stanford.edu>e^4Vectors that can be created or modified in a monad. _Unsafely convert an  action that creates an Z into  an action in m that creates a vector. `@Creates a new vector of the given length. The elements will be  uninitialized. aBConvert an immutable vector to a mutable one by taking a complete  copy of it. bc%Vectors that can be read in a monad. dCast the vector to an Z , perform an IO action, and  convert the IO" action to an action in the monad m. This  operation is very unsafe. eBConvert a mutable vector to an immutable one by taking a complete  copy of it. fg+Common functionality for all vector types. h*Get the dimension (length) of the vector. iBGet the memory stride (in elements) between consecutive elements. jAIndicate whether or not internally the vector stores the complex  conjugates of its elements. k3Get a view into the complex conjugate of a vector. l#Cast the shape type of the vector. m Unsafe cast from a vector to an Z. n<Immutable dense vectors. The type arguments are as follows:  n1: a phantom type for the dimension of the vector  e>: the element type of the vector. Only certain element types  are supported. oCCreates a new vector with the given association list. Unspecified ' indices will get initialized to zero. pECreates a new vector of the given dimension with the given elements. F If the list has length less than the passed-in dimenson, the tail of # the vector will be uninitialized. q.Create a zero vector of the specified length. r)Set every element in the vector to zero. sBCreate a vector with every element initialized to the same value. t/Set every element in the vector to a constant. unewBasisVector n i creates a vector of length n that is all zero  except for at position i, where it equal to one. v setBasis x i sets the ith coordinate of x to 1, and all other  coordinates to 06. If the vector has been scaled, it is possible that  readVector x i will not return exactly 1. See setElem. w-Creates a new vector by copying another one. xBCreates a new vector by copying another one. The returned vector C is gauranteed not to be a view into another vector. That is, the  returned vector will have isConj to be False. ycopyVector dst src replaces the values in dst with those in / source. The operands must be the same shape. z'Swap the values stored in two vectors. {subvectorView x o n creates a subvector view of x starting at index o  and having length n.  |subvectorViewWithStride s x o n creates a subvector view of x starting  at index o, having length n and stride s. }CGet a new vector with elements with the conjugates of the elements  of the given vector ~'Conjugate every element of the vector. ;Get a new vector by scaling the elements of another vector  by a given value. (Scale every element by the given value. <Get a new vector by shifting the elements of another vector  by a given value. &Add the given value to every element. getAddVector x y' creates a new vector equal to the sum x+y. The ( operands must have the same dimension. ! addVector y x replaces y with y+x. "getSubVector x y. creates a new tensor equal to the difference x-y. , The operands must have the same dimension. # subVector y x replaces y with y-x. $axpyVector alpha x y replaces y with  alpha * x + y. %getMulVector x y8 creates a new vector equal to the elementwise product  x*y-. The operands must have the same dimensino & mulVector y x replaces y with y*x. 'getDivVector x y0 creates a new vector equal to the elementwise  ratio x/y*. The operands must have the same shape. ( divVector y x replaces y with y/x. );Gets the sum of the absolute values of the vector entries. Gets the 2-norm of a vector. IGets the index and norm of the element with maximum magnitude. This is & undefined if any of the elements are NaN". It will throw an exception if # the dimension of the vector is 0. )Computes the dot product of two vectors. *ECreate a vector with the given dimension and elements. The elements G given in the association list must all have unique indices, otherwise  the result is undefined. +Same as (, but does not range-check the indices. ACreate a vector of the given dimension with elements initialized  to the values from the list. listVector n es is equivalent to  vector n (zip [0..(n-1)] es)', except that the result is undefined  if  length es is less than n. ,- zeroVector n creates a vector of dimension n with all values  set to zero. constantVector n e creates a vector of dimension n with all values  set to e. basisVector n i creates a vector of dimension n with zeros  everywhere but position i, where there is a one. subvector x o n creates a subvector of x starting at index o  and having length n. .subvectorWithStride s x o n creates a subvector of x starting  at index o, having length n and stride s. /01234567=Compute the sum of absolute values of entries in the vector.  Compute the 2-norm of a vector. FGet the index and norm of the element with absulte value. Not valid " if any of the vector entries are NaN. Raises an exception if the  vector has length 0. (Compute the dot product of two vectors. 89:;<=e^_`abcdefghijklmnopqrstuvwxyz{ |}~!"#$%&'()*+,-./0123456789:;<=e^_`ab_`abcdefdefghijklmhijklmnopqrstuvwxyz{ |}~!"#$%&'()*+,-./0123456789:;<=  experimental%Patrick Perry <patperry@stanford.edu> ghjklnnghjkl experimental%Patrick Perry <patperry@stanford.edu>JABCDEFGHIJKLMNOPQRSTUVWXY^_`abcdefghijklmopqrstuvwxyz{|}~1ghijklmcdef^_`abopqsurtvwxyz{|}~% experimental%Patrick Perry <patperry@stanford.edu>-Dense matrix in the , monad. The type arguments are as follows:  np>: a phantom type for the shape of the matrix. Most functions N will demand that this be specified as a pair. When writing a function + signature, you should always prefer IOMatrix (n,p) e to   IOMatrix np e.  e>: the element type of the matrix. Only certain element types  are supported. >%View an array in memory as a matrix. offset shape FView an array in memory as a matrix, with the given leading dimension  size. leading dimension size offset shape ?@ABCDEFGHIJKLM Perform an 3 action with a pointer to the first element of the  matrix. NHCreate a new matrix of given shape, but do not initialize the elements. OPQRSTUVWXYZ[\]^_`abcdef->?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef->>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef& experimental%Patrick Perry <patperry@stanford.edu>Dense vectors in the g, monad. The type arguments are as follows:  s&: the state variable argument for the g type  n1: a phantom type for the dimension of the vector  e>: the element type of the vector. Only certain element types  are supported. hFA safe way to create and work with a mutable vector before returning E an immutable vector for later perusal. This function avoids copying I the vector before returning it - it uses unsafeFreezeVector internally, 9 but this wrapper is a safe interface to that function. hhh  experimental%Patrick Perry <patperry@stanford.edu>LABCDEFGHIJKLMNOPQRSTUVWXY^_`abcdefghijklmopqrstuvwxyz{|}~ experimental%Patrick Perry <patperry@stanford.edu>NABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmopqrstuvwxyz{|}~Z[\]' experimental%Patrick Perry <patperry@stanford.edu>BA hermitian view of an underlying matrix. The view can either be J of the upper or lower triangular part of the matrix. The type arguments  are as follows:  a: the underlyting matrix type.  nn.: a phantom type for the shape of the matrix.  e": the element type of the matrix. Cast the phantom shape type. *Apply a function to the unerlying matrix. 7Convert from a base matrix type to a Herm matrix type. ?Convert from a Herm matrix type to a base matrix type. FConstruct a lower-triangular hermitian view into a matrix. This also - checks to see if the base matrix is square. GConstruct an upper-triangular hermitian view into a matrix. This also - checks to see if the base matrix is square.   experimental%Patrick Perry <patperry@stanford.edu>( experimental%Patrick Perry <patperry@stanford.edu>=A type class for mutable matrices with inverses. The member G functions of the type class do not perform any checks on the validity G of shapes or indices, so in general their safe counterparts should be  preferred. ijklmnopGA type class for mutable matrices associated with a monad. The member J functions of the type class do not perform any checks on the validity of D shapes or indices, so in general their safe counterparts should be  preferred. qrstuvwx/Get a lazy list the row vectors in the matrix. 5Get a lazy list of the column vectors in the matrix. ;Dense matrices that can be created or modified in a monad. @Creates a new matrix of the given shape. The elements will be  uninitialized. Unsafely convert an  action that creates an  into  an action in m that creates a matrix. BConvert an immutable matrix to a mutable one by taking a complete  copy of it. ,Dense matrices that can be read in a monad. Cast the matrix to an  , perform an IO action, and  convert the IO" action to an action in the monad m. This  operation is very unsafe. BConvert a mutable matrix to an immutable one by taking a complete  copy of it. 1Common functionality for all dense matrix types. #Cast the shape type of the matrix. yz{|BPossibly create a vector view of a matrix. This will fail if the B matrix is hermed or if the lda of the matrix is not equal to the  number of rows in the matrix. BPossibly create a matrix view of a row vector. This will fail if ! the stride of the vector is not 1 or the vector is conjugated. BPossibly create a matrix view of a column vector. This will fail $ if the stride of the vector is not 1" or the vector is not conjugated. @Possible create a matrix view of the vector. This will fail if ! the stride of the vector is not 1 or the vector is conjugated. E An error will be called if the vector does not have the same number $ of elements as the desired matrix.  Unsafe cast from a matrix to an . }>Immutable dense matrices. The type arguments are as follows:  np>: a phantom type for the shape of the matrix. Most functions N will demand that this be specified as a pair. When writing a function + signature, you should always prefer Matrix (n,p) e to   Matrix np e.  e>: the element type of the matrix. Only certain element types  are supported. ~CCreates a new matrix with the given association list. Unspecified ' indices will get initialized to zero. CCreate a new matrix with the given elements in column-major order. -Form a matrix from a list of column vectors. *Form a matrix from a list of row vectors. *Create a new matrix from a column vector. 'Create a new matrix from a row vector. -Create a zero matrix of the specified shape. )Set every element in the matrix to zero. 1Create a constant matrix of the specified shape. 7Set every element in the matrix to the given constant. FCreate a new matrix of the given shape with ones along the diagonal,  and zeros everywhere else. =Set diagonal elements to one and all other elements to zero. Get a copy of a matrix. @Get a copy of a matrix and make sure the returned matrix is not 7 a view. Specififially, the returned matrix will have  isHermMatrix  equal to False. copyMatrix dst src replaces the values in dst with those in / source. The operands must be the same shape. swapMatrix x y* swaps the values stored in two matrices. +Swap the elements in two rows of a matrix. .Swap the elements in two columns of a matrix. submatrixView a ij mn$ returns a view of the submatrix of a with element (0,0)  being element ij in a, and having shape mn. FDivide the rows of a matrix into two blocks and return views into the H blocks. The integer argument indicates how many rows should be in the  first block. IDivide the columns of a matrix into two blocks and return views into the K blocks. The integer argument indicates how many columns should be in the  first block. 6Get a list of vector views of the rows of the matrix. 9Get a list of vector views of the columns of the matrix. 0Get a vector view of the given row in a matrix. 3Get a vector view of the given column in a matrix. 5Get a vector view of the given diagonal in a matrix. AGet the given diagonal in a matrix. Negative indices correspond  to sub-diagonals. Same as  but not range-checked. %Conjugate every element of a matrix. CGet a new matrix with elements with the conjugates of the elements  of the given matrix. 4Scale every element of a matrix by the given value. ;Get a new matrix by scaling the elements of another matrix  by a given value. -Add a constant to every element in a matrix. <Get a new matrix by shifting the elements of another matrix  by a given value. 5Replace the first argument with the elementwise sum. getAddMatrix a b' creates a new matrix equal to the sum a+b. The $ operands must have the same shape. 5Replace the first argument with the elementwise sum. getSubMatrix a b. creates a new matrix equal to the difference a-b. The $ operands must have the same shape. axpyMatrix a x y replaces  y := a x + y. 9Replace the first argument with the elementwise product. getMulMatrix a b8 creates a new matrix equal to the elementwise product  a*b*. The operands must have the same shape. :Replace the first argument with the elementwise quotient. getDivMatrix a b5 creates a new matrix equal to the elementwise ratio  a/b*. The operands must have the same shape. gemv alpha a x beta y replaces y := alpha a * x + beta y. gemm alpha a b beta c replaces c := alpha a * b + beta c. KCreate a new matrix of the given size and initialize the given elements to 8 the given values. All other elements get set to zero. Same as & but does not do any bounds checking. @Create a new matrix with the given elements in row-major order. 7Create a matrix of the given shape from a list of rows :Create a matrix of the given shape from a list of columns  Get a matrix from a row vector. #Get a matrix from a column vector. IGet a matrix from the elements stored in columnwise order in the vector. 9Get a vector by concatenating the columns of the matrix. #Get a new zero of the given shape. 'Get a new constant of the given shape. EGet a new matrix of the given shape with ones along the diagonal and  zeroes everywhere else. submatrix a ij mn returns the submatrix of a with element (0,0)  being element ij in a, and having shape mn. FGet a the given diagonal in a matrix. Negative indices correspond to  sub-diagonals. Same as ! but index is not range-checked. GTake a unary elementwise vector operation and apply it to the elements  of a matrix. HTake a binary elementwise vector operation and apply it to the elements  of a pair of matrices. ijklmnopqrstuvwxyz{|}~ijklmnopijklmnop qrstuvwxqrstuvwx yz{|}yz{|}~~) experimental%Patrick Perry <patperry@stanford.edu>Get the given row in a matrix. "Get the given column in a matrix. 1Get a strict list the row vectors in the matrix. 7Get a strict list of the column vectors in the matrix. Scale and apply to a vector Scale and apply to a matrix  y := alpha a x + beta y c := alpha a b + beta cApply to a vector Apply to a matrix   x := alpha a x  b := alpha a b9Apply to a vector and store the result in another vector 9Apply to a matrix and store the result in another matrix  x := a x  b := a b'qrstuvwx experimental%Patrick Perry <patperry@stanford.edu>* experimental%Patrick Perry <patperry@stanford.edu>Return x such that a x = y. Return x such that  a x = alpha y.  Return b such that a b = c.  Return b such that  a b = alpha c.  Set  x := a^{-1} y.  Set  b := a^{-1} c.  Set x := a^{-1} (alpha y). Set b := a^{-1} (alpha c). Set  x := a^{-1} x. Set x := a^{-1} (alpha x). Set  b := a^{-1} b. Set b := a^{-1} (alpha b). ijklmnop            experimental%Patrick Perry <patperry@stanford.edu>             experimental%Patrick Perry <patperry@stanford.edu> !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXY<  experimental%Patrick Perry <patperry@stanford.edu> !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXY+ experimental%Patrick Perry <patperry@stanford.edu>Dense matrix in the g, monad. The type arguments are as follows:  s&: the state variable argument for the g type  np>: a phantom type for the shape of the matrix. Most functions N will demand that this be specified as a pair. When writing a function + signature, you should always prefer STMatrix s (n,p) e to  STMatrix s np e.  e>: the element type of the matrix. Only certain element types  are supported. FA safe way to create and work with a mutable matrix before returning E an immutable matrix for later perusal. This function avoids copying I the matrix before returning it - it uses unsafeFreezeMatrix internally, 9 but this wrapper is a safe interface to that function.  experimental%Patrick Perry <patperry@stanford.edu> !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXY, experimental%Patrick Perry <patperry@stanford.edu>BA type class for immutable matrices. The member functions of the C type class do not perform any checks on the validity of shapes or E indices, so in general their safe counterparts should be preferred. Get the given row in a matrix. "Get the given column in a matrix. *Get a list the row vectors in the matrix. -Get a list the column vectors in the matrix. #Matrix multiplication by a vector. #Matrix multiplication by a matrix. "Scale and multiply by a vector.   sapply k a x is equal to a < *> (k *> x), and often it is faster.  Scale and multiply by a matrix.  sapplyMat k a b is equal to a < **> (k *> b), and often it is faster.  experimental%Patrick Perry <patperry@stanford.edu>   experimental%Patrick Perry <patperry@stanford.edu>J  !"#$%&'()*+,-./0123- experimental%Patrick Perry <patperry@stanford.edu> ?A type class for immutable matrices with inverses. The member G functions of the type class do not perform any checks on the validity G of shapes or indices, so in general their safe counterparts should be  preferred. Solve for a vector.  Solve for a matrix. !Solve for a vector and scale.   ssolve k a y is equal to a <\ > (k *> y) but is often faster. "Solve for a matrix and scale.  ssolveMat k a c is equal to a <\\ > (k *> c) but is often faster.  !"  !" experimental%Patrick Perry <patperry@stanford.edu> !" !" experimental%Patrick Perry <patperry@stanford.edu>456789:;<=      !" 45897:;<=6. experimental%Patrick Perry <patperry@stanford.edu>=#Banded matrix in the , monad. The type arguments are as follows:  np>: a phantom type for the shape of the matrix. Most functions N will demand that this be specified as a pair. When writing a function + signature, you should always prefer IOBanded (n,p) e to   IOBanded np e.  e>: the element type of the matrix. Only certain element types  are supported. $ Execute an 3 action with a pointer to the first element in the  banded matrix. ICreate a new banded matrix of given shape and (lower,upper), bandwidths, % but do not initialize the elements. CCreate a zero banded matrix of the specified shape and bandwidths. GCreate a constant banded matrix of the specified shape and bandwidths. gbmv alpha a x beta y replaces y := alpha a * x + beta y gbmm alpha a b beta c replaces c := alpha a * b + beta c.      =#$     =# $     / experimental%Patrick Perry <patperry@stanford.edu>K%<Banded matrices that can be created or modified in a monad. &ACreates a new banded matrix of the given shape and bandwidths. % The elements will be uninitialized. 'Unsafely convert an  action that creates an # into  an action in m that creates a matrix. (AConvert an immutable banded matrix to a mutable one by taking a  complete copy of it. )*-Banded matrices that can be read in a monad. +Cast the banded matrix to an # , perform an IO action, and  convert the IO" action to an action in the monad m. This  operation is very unsafe. ,AConvert a mutable banded matrix to an immutable one by taking a  complete copy of it. -.2Common functionality for all banded matrix types. /8Get the number of lower diagonals in the banded matrix. 07Get the number of upper diagonals in the banded matrix 17Get the range of valid diagonals in the banded matrix.   bandwidthds a is equal to (numLower a, numUpper a). 2;Get the leading dimension of the underlying storage of the  banded matrix. 3<Indicate whether or not the banded matrix is transposed and  conjugated. 4*Cast the shape type of the banded matrix. 5?Get a matrix with the underlying storage of the banded matrix. 0 This will fail if the banded matrix is hermed. 6@Given a shape and bandwidths, possibly view the elements stored @ in a dense matrix as a banded matrix. This will if the matrix C storage is hermed. An error will be called if the number of rows A in the matrix does not equal the desired number of diagonals or C if the number of columns in the matrix does not equal the desired  number of columns. 7AView a vector as a banded matrix of the given shape. The vector < must have length equal to one of the specified dimensions. 8+View a vector as a diagonal banded matrix. 9?If the banded matrix has only a single diagonal, return a view ( into that diagonal. Otherwise, return Nothing. : Unsafe cast from a matrix to an #. ;?Immutable banded matrices. The type arguments are as follows:  np>: a phantom type for the shape of the matrix. Most functions N will demand that this be specified as a pair. When writing a function + signature, you should always prefer Banded (n,p) e to   Banded np e.  e>: the element type of the matrix. Only certain element types  are supported. <>Create a banded matrix with the given shape, bandwidths, and C associations. The indices in the associations list must all fall C in the bandwidth of the matrix. Unspecified elements will be set  to zero. =GCreate a banded matrix of the given shape and bandwidths by specifying H its diagonal elements. The lists must all have the same length, equal E to the number of elements in the main diagonal of the matrix. The C sub-diagonals are specified first, then the super-diagonals. In  subdiagonal i , the first i# elements of the list are ignored. >ECreate a zero banded matrix with the specified shape and bandwidths. ?GCreate a constant banded matrix of the specified shape and bandwidths. @.Set every element of a banded matrix to zero. A4Set every element of a banded matrix to a constant. B<Create a new banded matrix by taking a copy of another one. CGCopy the elements of one banded matrix into another. The two matrices ) must have the same shape and badwidths. DBGet a view of a diagonal of the banded matrix. This will fail if ( the index is outside of the bandwidth. EEGet a view into the partial row of the banded matrix, along with the 3 number of zeros to pad before and after the view. FHGet a view into the partial column of the banded matrix, along with the 3 number of zeros to pad before and after the view. G5Get a copy of the given diagonal of a banded matrix.  !"#$%&'()*+H>Create a banded matrix with the given shape, bandwidths, and C associations. The indices in the associations list must all fall C in the bandwidth of the matrix. Unspecified elements will be set  to zero. ,IGCreate a banded matrix of the given shape and bandwidths by specifying H its diagonal elements. The lists must all have the same length, equal E to the number of elements in the main diagonal of the matrix. The C sub-diagonals are specified first, then the super-diagonals. In  subdiagonal i , the first i# elements of the list are ignored. JECreate a zero banded matrix with the specified shape and bandwidths. KGCreate a constant banded matrix of the specified shape and bandwidths. LCCreate a banded matrix from a vector. The vector must have length 0 equal to one of the specified dimension sizes. M/Create a diagonal banded matrix from a vector. NBConvert a diagonal banded matrix to a vector. Fail if the banded # matrix has more than one diagonal OKGet a the given diagonal in a banded matrix. Negative indices correspond  to sub-diagonals. -./0K%&'()*+,-./0123456789:;<=>?@ABCDEFG !"#$%&'()*+H,IJKLMNO-./0K%&'()&'()*+,-+,-./0123456789:/0123456789:;<=>?@ABCDEFG !"#$%&'()*+H,IJKLMNO-./0 experimental%Patrick Perry <patperry@stanford.edu>G  !"#$%&'()*+,-./0123./01456;HIJKLMNO;./01456HIJKLMNO0 experimental%Patrick Perry <patperry@stanford.edu>1234P=Element types that can be tested with QuickCheck properties. Q@Inicates whether or not the value should be used in tests. For  5s, isTestElemElem e is defined as  1not (isNaN e || isInfinite e || isDenormalized e). R7Generate a list of elements suitable for testing with. SEGenerate a list of elements for testing that have no imaginary part. T1Get an appropriate dimension for a random vector U,Generate a random vector of the given size. 678V3Generate an appropriate shape for a random matrix. W-Generate a random matrix of the given shape. 9:;<=;Generate valid bandwidth for a given matrix dimension size X6Generate valid bandwidths for the given matrix shape. Y!Generate a random banded matrix. >?1234PQRSTU678VW9:;<=XY>?122344PQQRSTU678VW9:;<=XY>? experimental%Patrick Perry <patperry@stanford.edu> PQRSTUVWXY PQRSTUVWXY experimental%Patrick Perry <patperry@stanford.edu>p !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXY%&'()*+,-./0123456789:<=>?@ABCDEFG"./0123456789:*+,-%&'()<=>@?ABCEFDG experimental%Patrick Perry <patperry@stanford.edu>r !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXY#$%&'()*+,-./0123456789:<=>?@ABCDEFG#$1 experimental%Patrick Perry <patperry@stanford.edu>ZBanded matrix in the g, monad. The type arguments are as follows:  s&: the state variable argument for the g type  np>: a phantom type for the shape of the matrix. Most functions N will demand that this be specified as a pair. When writing a function + signature, you should always prefer STBanded s (n,p) e to  STBanded s np e.  e>: the element type of the matrix. Only certain element types  are supported. @[MA safe way to create and work with a mutable banded matrix before returning B an immutable one for later perusal. This function avoids copying I the matrix before returning it - it uses unsafeFreezeBanded internally, 9 but this wrapper is a safe interface to that function. Z@[Z@@[ experimental%Patrick Perry <patperry@stanford.edu>r !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXY%&'()*+,-./0123456789:<=>?@ABCDEFGZ[Z[A23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeffghijklmno p!qrstuvwxyz{|}~####$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%&&''''''''((((((((((((((((((((((((((((((((((((((((((((((((( ( ( ( ( ((((((((((((((((((( (!("(#($(%(&)')()))*)+),)-).)/)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/[/\/]/^/_/`/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/{/|/}/~/0000000300a0x11mk            !!!!!!!!!"""""""""" " " " " """""""""""""#### #!#"###$#%#&#'#(#)#*#+#,#-#.#/#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$[$\$]$^$_$`$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%{%|%}%~%%%%%%%%%%%%&(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))****+C,,,,,,----.S.......................... . . . . ...................... .!..".#.$.%/&/'/(/)/k/*/+/,/-/.///0/1/2/3/////// /!//"/#/$/4/5/6/7/809090:0:;0<0=00>0?00@0A0B0C1Dblas-0.7Data.Tensor.ClassData.Tensor.Class.ITensorData.Elem.BLASData.Matrix.ClassData.Matrix.TriData.Tensor.Class.MTensorData.Vector.Dense.IOData.Vector.Dense.ClassData.Vector.DenseData.Matrix.Dense.IOData.Vector.Dense.STData.Matrix.HermData.Matrix.Class.MSolveData.Matrix.Class.MMatrixData.Matrix.Dense.ClassData.Matrix.DenseData.Matrix.Dense.STData.Matrix.Class.IMatrixData.Matrix.Class.ISolveData.Matrix.Banded.IOData.Matrix.Banded.ClassData.Matrix.BandedTest.QuickCheck.BLASData.Matrix.Banded.STData.Elem.BLAS.Base BLAS.TypesData.Matrix.TriBase BLAS.CTypesData.Elem.BLAS.DoubleData.Elem.BLAS.ZomplexData.Elem.BLAS.Level1Data.Elem.BLAS.Level2Data.Elem.BLAS.Level3 BLAS.InternalData.Vector.Dense.IOBaseData.Vector.Dense.BaseData.Matrix.Dense.IOBaseData.Vector.Dense.STBaseData.Matrix.HermBaseData.Matrix.Dense.BaseData.Matrix.Class.MMatrixBaseData.Matrix.Class.MSolveBaseData.Matrix.Dense.STBaseData.Matrix.Class.IMatrixBaseData.Matrix.Class.ISolveBaseData.Matrix.Banded.IOBaseData.Matrix.Banded.BaseTest.QuickCheck.BLASBaseData.Matrix.Banded.STBaseShapedshapeboundsITensorsize//unsafeAt unsafeReplaceindiceselemsassocstmap*>shift!Elem conjugatenormnorm1fromReal maybeToRealSideEnum RightSideLeftSideDiagEnumNonUnitUnitUpLoEnumLowerUpper TransEnum ConjTransNoTrans OrderEnumColMajorRowMajor flipOrder flipTransflipUpLoflipSide MatrixShapedhermHasMatrixStorage MatrixStorage HasVectorView VectorViewnumRowsnumColsisSquareisFatisTall flipShapeTri coerceTrimapTri triFromBase triToBaselowerlowerUupperupperUBLAS1BLAS2BLAS3 WriteTensor getMaxSizesetZero setConstant canModifyElemunsafeWriteElemunsafeModifyElem modifyWithunsafeSwapElemsdoConjscaleByshiftBy ReadTensorgetSizeunsafeReadElem getIndices getIndices'getElems getElems' getAssocs getAssocs'readElem writeElem modifyElem swapElemsIOVectorvectorViewArrayvectorViewArrayWithStride withIOVector WriteVectorunsafeConvertIOVector newVector_ thawVectorunsafeThawVector ReadVectorunsafePerformIOWithVector freezeVectorunsafeFreezeVector BaseVectordimstrideisConjconj coerceVectorunsafeVectorToIOVectorVector newVector newListVector newZeroVector setZeroVectornewConstantVectorsetConstantVectornewBasisVectorsetBasisVector newCopyVectornewCopyVector' copyVector swapVector subvectorViewsubvectorViewWithStride getConjVector doConjVectorgetScaledVector scaleByVectorgetShiftedVector shiftByVector getAddVector addVector getSubVector subVector axpyVector getMulVector mulVector getDivVector divVector getSumAbsgetNorm2getWhichMaxAbsgetDotvector listVector zeroVectorconstantVector basisVector subvectorsubvectorWithStridesumAbsnorm2 whichMaxAbs<.>IOMatrixmatrixViewArraymatrixViewArrayWithLda withIOMatrixSTVector runSTVectorHerm coerceHermmapHerm hermFromBase hermToBasehermLhermUMSolveMMatrixgetRowsgetCols WriteMatrix newMatrix_unsafeConvertIOMatrix thawMatrixunsafeThawMatrix ReadMatrixunsafePerformIOWithMatrix freezeMatrixunsafeFreezeMatrix BaseMatrix ldaMatrix isHermMatrix coerceMatrixmaybeViewMatrixAsVectormaybeViewVectorAsRowmaybeViewVectorAsColmaybeViewVectorAsMatrixunsafeMatrixToIOMatrixMatrix newMatrix newListMatrix newColsMatrix newRowsMatrix newColMatrix newRowMatrix newZeroMatrix setZeroMatrixnewConstantMatrixsetConstantMatrixnewIdentityMatrixsetIdentityMatrix newCopyMatrixnewCopyMatrix' copyMatrix swapMatrixswapRowsswapCols submatrixView splitRowsAt splitColsAtrowViewscolViewsrowViewcolViewdiagViewgetDiag doConjMatrix getConjMatrix scaleByMatrixgetScaledMatrix shiftByMatrixgetShiftedMatrix addMatrix getAddMatrix subMatrix getSubMatrix axpyMatrix mulMatrix getMulMatrix divMatrix getDivMatrixmatrix listMatrix rowsMatrix colsMatrix matrixFromRow matrixFromColmatrixFromVectorvectorFromMatrix zeroMatrixconstantMatrixidentityMatrix submatrixdiaggetRowgetColgetRows'getCols' getSApply getSApplyMat doSApplyAdddoSApplyAddMatgetApply getApplyMat doSApply_ doSApplyMat_doApply doApplyMatdoApply_ doApplyMat_getSolve getSSolve getSolveMat getSSolveMatdoSolve doSolveMatdoSSolve doSSolveMatdoSolve_ doSSolve_ doSolveMat_ doSSolveMat_STMatrix runSTMatrixIMatrixrowcolrowscols<*><**>sapply sapplyMatISolve<\><\\>ssolve ssolveMatIOBanded withIOBanded WriteBanded newBanded_unsafeConvertIOBanded thawBandedunsafeThawBanded ReadBandedunsafePerformIOWithBanded freezeBandedunsafeFreezeBanded BaseBandednumLowernumUpper bandwidths ldaBanded isHermBanded coerceBandedmaybeMatrixStorageFromBandedmaybeBandedFromMatrixStorageviewVectorAsBandedviewVectorAsDiagBandedmaybeViewBandedAsVectorunsafeBandedToIOBandedBanded newBandednewListsBanded newZeroBandednewConstantBanded setZeroBandedsetConstantBanded newCopyBanded copyBandeddiagViewBanded rowViewBanded colViewBanded getDiagBandedbanded listsBanded zeroBandedconstantBandedbandedFromVectordiagBandedFromVectormaybeVectorFromBanded diagBandedTestElemisTestElemElemelements realElementsSTBanded runSTBanded CBLASSide CBLASDiag CBLASUpLo CBLASTrans CBLASOrderrowMajorcolMajor cblasOrdernoTranstrans conjTrans cblasTrans cblasUpLononUnitunit cblasDiagleftSide rightSide cblasSidedsyr2kdsyrkdtrsmdtrmmdsymmdgemmdsyr2dsyrdgerdsbmvdsymvdtbsvdtrsvdtbmvdtrmvdgbmvdgemvdrotmdrotmgdrotdrotgdaxpydcopydswapdscalidamaxdasumdnrm2ddotzher2kzherkzsyr2kzsyrkztrsmztrmmzhemmzsymmzgemmzher2zherzgerczgeruzhbmvzhemvztbsvztrsvztbmvztrmvzgbmvzgemvzdrotzrotgzaxpyzcopyzswapzscalizamaxzasumznrm2 zdotc_sub zdotu_subdotudotcnrm2asumiamaxscalswapcopyaxpyrotgrotvconjacxpyvmulvcmulvdivvcdivgemvgbmvtrmvtbmvtrsvtbsvhemvhbmvgerugercherher2gemmsymmhemmtrmmtrsmsyrksyr2kherkher2kbase Data.Complex:+Complexbzero_ clearArraybzeroinlinePerformIOcheckedSubvectorcheckedSubvectorWithStride checkVecVecOp checkedRow checkedCol checkedDiag diagStartdiagLencheckedSubmatrix checkMatMatOpcheckMatVecMultcheckMatMatMultcheckMatVecMultAddcheckMatMatMultAddcheckMatVecSolvcheckMatVecSolvTocheckMatMatSolvcheckMatMatSolvTo checkSquarecheckFat checkTall checkBinaryOpcheckTernaryOpghc-prim GHC.TypesIO dimIOVectorstrideIOVectorisConjIOVector conjIOVector%unsafeSubvectorViewWithStrideIOVector newIOVector_newCopyIOVector shapeIOVectorboundsIOVector sizeIOVectorgetSizeIOVectorgetMaxSizeIOVectorindicesIOVectorgetIndicesIOVectorgetIndicesIOVector'getElemsIOVectorgetElemsIOVector'getAssocsIOVectorgetAssocsIOVector'unsafeReadElemIOVectorcanModifyElemIOVectorunsafeWriteElemIOVectorunsafeModifyElemIOVectorunsafeSwapElemsIOVectormodifyWithIOVectorsetZeroIOVectorsetConstantIOVectordoConjIOVectorscaleByIOVectorshiftByIOVectorunsafeSubvectorViewWithStrideunsafeIOVectorToVectorfreezeIOVector thawIOVectorunsafeFreezeIOVectorunsafeThawIOVectorunsafeNewVectorunsafeCopyVectorunsafeSwapVectorunsafeSubvectorViewunsafeGetAddVectorunsafeAddVectorunsafeGetSubVectorunsafeSubVectorunsafeAxpyVectorunsafeGetMulVectorunsafeMulVectorunsafeGetDivVectorunsafeDivVector unsafeGetDot unsafeVector replaceVectorunsafeReplaceVectorunsafeSubvector sizeVector indicesVector elemsVector assocsVectorunsafeAtVector tmapVectortzipWithVector scaleVector shiftVectorcompareVectorWith vectorCall vectorCall2checkVectorOp2getUnaryVectorOpunsafeGetBinaryVectorOpnumRowsIOMatrixnumColsIOMatrixldaMatrixIOMatrixisHermIOMatrix hermIOMatrixunsafeSubmatrixViewIOMatrixunsafeRowViewIOMatrixunsafeColViewIOMatrixunsafeDiagViewIOMatrixmaybeViewVectorAsRowIOMatrixmaybeViewVectorAsColIOMatrixmaybeViewIOMatrixAsVectormaybeViewVectorAsIOMatrix liftIOMatrix liftIOMatrix2 newIOMatrix_newCopyIOMatrix shapeIOMatrixboundsIOMatrix sizeIOMatrixgetSizeIOMatrixgetMaxSizeIOMatrixindicesIOMatrixgetIndicesIOMatrixgetIndicesIOMatrix'getElemsIOMatrixgetElemsIOMatrix'getAssocsIOMatrixgetAssocsIOMatrix'unsafeReadElemIOMatrixcanModifyElemIOMatrixunsafeWriteElemIOMatrixunsafeModifyElemIOMatrixunsafeSwapElemsIOMatrixmodifyWithIOMatrixsetZeroIOMatrixsetConstantIOMatrixdoConjIOMatrixscaleByIOMatrixshiftByIOMatrixGHC.STST unsafeDoSolveunsafeDoSolveMatunsafeDoSSolveunsafeDoSSolveMatunsafeDoSolve_unsafeDoSSolve_unsafeDoSolveMat_unsafeDoSSolveMat_unsafeGetSApplyunsafeGetSApplyMatunsafeDoSApplyAddunsafeDoSApplyAddMatunsafeDoSApply_unsafeDoSApplyMat_ unsafeGetRow unsafeGetColunsafeSubmatrixViewunsafeDiagView unsafeRowView unsafeColViewunsafeIOMatrixToMatrixfreezeIOMatrix thawIOMatrixunsafeFreezeIOMatrixunsafeThawIOMatrixunsafeNewMatrixunsafeCopyMatrixunsafeSwapMatrixunsafeSwapRowsunsafeSwapColsunsafeSplitRowsAtunsafeSplitColsAtunsafeGetRowMatrixunsafeGetColMatrix unsafeGetDiagunsafeAddMatrixunsafeGetAddMatrixunsafeSubMatrixunsafeGetSubMatrixunsafeAxpyMatrixunsafeMulMatrixunsafeGetMulMatrixunsafeDivMatrixunsafeGetDivMatrixgetColsM getColsIO getColsSTgetRowsM getRowsIO getRowsSThemv'hemm'unsafeDoSApplyAddTriMatrixunsafeDoSApplyAddMatTriMatrixunsafeDoSApplyTriMatrixunsafeDoSApplyMatTriMatrixtoLowertoUpperunsafeDoSSolveTriMatrixunsafeDoSSolveMatTriMatrix unsafeMatrix replaceMatrixunsafeReplaceMatrixunsafeSubmatrix unsafeDiagunsafeAtMatrix indicesMatrix elemsMatrix assocsMatrix tmapMatrixtzipWithMatrixcompareMatrixWith liftMatrix liftMatrix2checkMatrixOp2getUnaryMatrixOpunsafeGetBinaryMatrixOp transMatrix indexOfMatrixunsafeGetApplyunsafeGetApplyMat unsafeDoApplyunsafeDoApplyMatunsafeDoApply_unsafeDoApplyMat_unsafeGetSolveunsafeGetSSolveunsafeGetSolveMatunsafeGetSSolveMat unsafeSApplyunsafeSApplyMat unsafeRow unsafeCol unsafeApplyunsafeApplyMat unsafeSolveunsafeSolveMat unsafeSSolveunsafeSSolveMat fptrIOBanded ptrIOBandednumRowsIOBandednumColsIOBandednumLowerIOBandednumUpperIOBanded ldaIOBandedisHermIOBanded hermIOBanded indexIOBandedhasStorageIOBandedwithIOBandedElemmaybeMatrixStorageFromIOBandedmaybeIOBandedFromMatrixStorageviewVectorAsIOBandedmaybeViewIOBandedAsVectorbandwidthsIOBandedcoerceIOBanded shapeIOBandedboundsIOBanded sizeIOBandedindicesIOBandedgetSizeIOBandedgetIndicesIOBandedgetIndicesIOBanded'getAssocsIOBandedgetAssocsIOBanded'getElemsIOBandedgetElemsIOBanded'unsafeReadElemIOBandedunsafeWriteElemIOBandedmodifyWithIOBandedcanModifyElemIOBanded newIOBanded_newZeroIOBandedsetZeroIOBandednewConstantIOBandedsetConstantIOBandednewCopyIOBandedunsafeCopyIOBandedunsafeRowViewIOBandedunsafeColViewIOBandedunsafeDiagViewIOBandedunsafeGetRowIOBandedunsafeGetColIOBandedgbmmhbmmtbmmtbmv'tbmm'tbsmtbsv'tbsm' transIOBandedunsafeDiagViewBandedunsafeRowViewBandedunsafeColViewBandedunsafeIOBandedToBandedfreezeIOBanded thawIOBandedunsafeFreezeIOBandedunsafeThawIOBandedunsafeNewBanded newBandedHelpunsafeCopyBandedunsafeGetDiagBandedunsafeGetRowBandedunsafeGetColBanded unsafeBandedunsafeDiagBandedlistsFromBandedcompareBandedHelpreplaceBandedHelp SubMatrix SubVectorDouble rawVector conjVector rawMatrix hermedMatrix rawSubMatrix bandwidth rawBanded hermedBanded