linear-code-0.1.1: A simple library for linear codes (coding theory, error correction)

Copyright(c) Wanja Chresta 2018
LicenseGPL-3
Maintainerwanja dot hs at chrummibei dot ch
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Math.Algebra.Field.Instances

Contents

Description

Some important instances like Random and Bounded are missing from HaskellForMath's implementation of finite fiels. Here, orphan instances for these classes are added.

Orphan instances

IntegerAsType p => Bounded (Fp p) Source # 

Methods

minBound :: Fp p #

maxBound :: Fp p #

IntegerAsType p => Random (Fp p) Source # 

Methods

randomR :: RandomGen g => (Fp p, Fp p) -> g -> (Fp p, g)

random :: RandomGen g => g -> (Fp p, g)

randomRs :: RandomGen g => (Fp p, Fp p) -> g -> [Fp p]

randoms :: RandomGen g => g -> [Fp p]

randomRIO :: (Fp p, Fp p) -> IO (Fp p)

randomIO :: IO (Fp p)

(FinSet fp, Eq fp, Num fp, PolynomialAsType fp poly) => Bounded (ExtensionField fp poly) Source # 

Methods

minBound :: ExtensionField fp poly #

maxBound :: ExtensionField fp poly #

(FinSet fp, Ord fp, Num fp, PolynomialAsType fp poly) => Random (ExtensionField fp poly) Source # 

Methods

randomR :: RandomGen g => (ExtensionField fp poly, ExtensionField fp poly) -> g -> (ExtensionField fp poly, g)

random :: RandomGen g => g -> (ExtensionField fp poly, g)

randomRs :: RandomGen g => (ExtensionField fp poly, ExtensionField fp poly) -> g -> [ExtensionField fp poly]

randoms :: RandomGen g => g -> [ExtensionField fp poly]

randomRIO :: (ExtensionField fp poly, ExtensionField fp poly) -> IO (ExtensionField fp poly)

randomIO :: IO (ExtensionField fp poly)