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.NVector

Contents

Description

  • This module provides convenient constructors that generate a n-vector (tensor with n upper indices with finite or infinite size).
  • Finitely-dimensional n-vectors provide much greater performance than infinitely-dimensional
Synopsis

Generators

fromIndices Source #

Arguments

:: Num a 
=> String

Indices names (one characted per index)

-> [Int]

Indices sizes

-> ([Int] -> a)

Generator function

-> Tensor a

Generated n-vector

Generate n-vector as function of its indices

const Source #

Arguments

:: Num a 
=> String

Indices names (one characted per index)

-> [Int]

Indices sizes

-> a

n-vector elements value

-> Tensor a

Generated n-vector

Generate n-vector with all components equal to v

randomDouble Source #

Arguments

:: ContGen d 
=> String

Indices names (one character per index)

-> [Int]

Indices sizes

-> d

Continuous probability distribution (as from Statistics.Distribution)

-> IO (Tensor Double)

Generated linear functional

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

Available probability distributions:

randomDoubleSeed Source #

Arguments

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

Index name (one character)

-> [Int]

Number of elements

-> d

Continuous probability distribution (as from Statistics.Distribution)

-> Int

Randomness seed

-> m (Tensor Double)

Generated n-vector

Generate n-vector with random real components with given probability distribution and given seed. The form is wrapped in a monad.

Available probability distributions:

randomInt Source #

Arguments

:: DiscreteGen d 
=> String

Indices names (one character per index)

-> [Int]

Indices sizes

-> d

Discrete probability distribution (as from Statistics.Distribution)

-> IO (Tensor Int)

Generated n-vector

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

Available probability distributions:

randomIntSeed Source #

Arguments

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

Index name (one character)

-> [Int]

Number of elements

-> d

Discrete probability distribution (as from Statistics.Distribution)

-> Int

Randomness seed

-> m (Tensor Int)

Generated n-vector

Generate n-vector with random integer components with given probability distribution and given seed. The form is wrapped in a monad.

Available probability distributions: