Hoogle Search

Within LTS Haskell 24.69 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. package matrix

    A native implementation of matrix operations. Matrix library. Basic operations and some algorithms. . Usage examples are included in the API reference generated by Haddock. . If you want to use GSL, BLAS and LAPACK, hmatrix (http://hackage.haskell.org/package/hmatrix) is the way to go.

  2. module Data.Matrix

    Matrix datatype and operations. Every provided example has been tested. Run cabal test for further tests.

  3. data Matrix a

    matrix Data.Matrix

    Type of matrices. Elements can be of any type. Rows and columns are indexed starting by 1. This means that, if m :: Matrix a and i,j :: Int, then m ! (i,j) is the element in the i-th row and j-th column of m.

  4. forceMatrix :: Matrix a -> Matrix a

    matrix Data.Matrix

    O(rows*cols). Similar to force. It copies the matrix content dropping any extra memory. Useful when using submatrix from a big matrix.

  5. getMatrixAsVector :: Matrix a -> Vector a

    matrix Data.Matrix

    O(rows*cols). Transform a Matrix to a Vector of size rows*cols. This is equivalent to get all the rows of the matrix using getRow and then append them, but far more efficient.

  6. matrix :: Int -> Int -> ((Int, Int) -> a) -> Matrix a

    matrix Data.Matrix

    O(rows*cols). Generate a matrix from a generator function. Example of usage:

    (  1  0 -1 -2 )
    (  3  2  1  0 )
    (  5  4  3  2 )
    matrix 4 4 $ \(i,j) -> 2*i - j = (  7  6  5  4 )
    

  7. minorMatrix :: Int -> Int -> Matrix a -> Matrix a

    matrix Data.Matrix

    O(rows*cols). Remove a row and a column from a matrix. Example:

    ( 1 2 3 )
    ( 4 5 6 )   ( 1 3 )
    minorMatrix 2 2 ( 7 8 9 ) = ( 7 9 )
    

  8. multStrassenMixed :: Num a => Matrix a -> Matrix a -> Matrix a

    matrix Data.Matrix

    Mixed Strassen's matrix multiplication.

  9. permMatrix :: Num a => Int -> Int -> Int -> Matrix a

    matrix Data.Matrix

    O(rows*cols). Permutation matrix.

    permMatrix n i j =
    i     j       n
    1 ( 1 0 ... 0 ... 0 ... 0 0 )
    2 ( 0 1 ... 0 ... 0 ... 0 0 )
    (     ...   ...   ...     )
    i ( 0 0 ... 0 ... 1 ... 0 0 )
    (     ...   ...   ...     )
    j ( 0 0 ... 1 ... 0 ... 0 0 )
    (     ...   ...   ...     )
    ( 0 0 ... 0 ... 0 ... 1 0 )
    n ( 0 0 ... 0 ... 0 ... 0 1 )
    
    When i == j it reduces to identity n.

  10. prettyMatrix :: Show a => Matrix a -> String

    matrix Data.Matrix

    Display a matrix as a String using the Show instance of its elements.

Page 181 of many | Previous | Next