multilinear-0.2.2.1: Comprehensive and efficient (multi)linear algebra implementation.

Copyright(c) Artur M. Brodzki 2018
LicenseBSD3
Maintainerartur@brodzki.org
Stabilityexperimental
PortabilityWindows/POSIX
Safe HaskellNone
LanguageHaskell2010

Multilinear.Matrix

Contents

Description

  • This module provides convenient constructors that generates a matrix (finitely- or infinite-dimensional)
  • Finitely-dimensional matrices provide much greater performance than infinitely-dimensional
Synopsis

Generators

fromIndices Source #

Arguments

:: Num a 
=> String

Indices names (one character per index, first character: rows index, second character: columns index)

-> Int

Number of matrix rows

-> Int

Number of matrix columns

-> (Int -> Int -> a)

Generator function - returns a matrix component at i,j

-> Tensor a

Generated matrix

Generate matrix as function of its indices

const Source #

Arguments

:: Num a 
=> String

Indices names (one character per index, first character: rows index, second character: columns index)

-> Int

Number of matrix rows

-> Int

Number of matrix columns

-> a

Value of matrix components

-> Tensor a

Generated matrix

Generate matrix with all components equal to v

randomDouble Source #

Arguments

:: ContGen d 
=> String

Indices names (one character per index, first character: rows index, second character: columns index)

-> Int

Number of matrix rows

-> Int

Number of matrix columns

-> d

Continuous probability distribution (as from Statistics.Distribution)

-> IO (Tensor Double)

Generated matrix

Generate matrix with random real components with given probability distribution. The matrix is wrapped in the IO monad.

Available probability distributions:

randomDoubleSeed Source #

Arguments

:: (ContGen d, PrimMonad m) 
=> String

Indices names (one character per index, first character: rows index, second character: columns index)

-> Int

Number of matrix rows

-> Int

Number of matrix columns

-> d

Continuous probability distribution (as from Statistics.Distribution)

-> Int

Randomness seed

-> m (Tensor Double)

Generated matrix

Generate matrix with random real components with given probability distribution and given seed. The matrix is wrapped in the a monad.

Available probability distributions:

randomInt Source #

Arguments

:: DiscreteGen d 
=> String

Indices names (one character per index, first character: rows index, second character: columns index)

-> Int

Number of matrix rows

-> Int

Number of matrix columns

-> d

Discrete probability distribution (as from Statistics.Distribution)

-> IO (Tensor Int)

Generated matrix

Generate matrix with random integer components with given probability distribution. The matrix is wrapped in the IO monad.

Available probability distributions:

randomIntSeed Source #

Arguments

:: (DiscreteGen d, PrimMonad m) 
=> String

Indices names (one character per index, first character: rows index, second character: columns index)

-> Int

Number of matrix rows

-> Int

Number of matrix columns

-> d

Discrete probability distribution (as from Statistics.Distribution)

-> Int

Randomness seed

-> m (Tensor Int)

Generated matrix

Generate matrix with random integer components with given probability distribution. and given seed. The matrix is wrapped in a monad.

Available probability distributions: