data-dispersal-1.0.0.2: Space-efficient and privacy-preserving data dispersal algorithms.

CopyrightPeter Robinson 2014
LicenseLGPL
MaintainerPeter Robinson <peter.robinson@monoid.at>
Stabilityexperimental
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Data.IDA.FiniteField

Description

Linear algebra computations in a finite prime field.

Synopsis

Documentation

newtype FField Source

Our finite prime field. All computations are performed in this field.

Constructors

FField 

Fields

number :: PrimeField (I (O (I (I (I (I (I (I (I (I Z))))))))))
 

prime :: Int Source

The size of the finite field

type FMatrix = Matrix FField Source

A matrix over the finite field.

dotProduct :: Num a => Vector a -> Vector a -> a Source

forwardSub :: Fractional a => Matrix a -> Vector a -> Vector a Source

Solves a linear equality system A x = b given by a lower triangular matrix via forward substitution.

backwardSub :: Fractional a => Matrix a -> Vector a -> Vector a Source

Solves a linear equality system A x = b given by an upper triangular matrix via backward substitution.

inverse :: (Ord a, Fractional a) => Matrix a -> Matrix a Source

Compute the inverse of matrix. Throws AssertionFailed if the matrix is not invertible.

vandermonde :: Int -> [FField] -> FMatrix Source

Construct a Vandermonde matrix. The i-th list element is the i-th seed of the geometric progression of the i-th row.

vmatrix :: Int -> Int -> FMatrix Source

Create an nxm Vandermonde matrix. O(n m).