galois-field-0.4.0: Galois field library

PrimeField

Synopsis

Documentation

data PrimeField (p :: Nat) Source #

Prime fields GF(p) for p prime.

Instances
 Eq (PrimeField p) Source # Instance detailsDefined in PrimeField Methods(==) :: PrimeField p -> PrimeField p -> Bool #(/=) :: PrimeField p -> PrimeField p -> Bool # KnownNat p => Fractional (PrimeField p) Source # Instance detailsDefined in PrimeField Methods(/) :: PrimeField p -> PrimeField p -> PrimeField p #recip :: PrimeField p -> PrimeField p # KnownNat p => Num (PrimeField p) Source # Instance detailsDefined in PrimeField Methods(+) :: PrimeField p -> PrimeField p -> PrimeField p #(-) :: PrimeField p -> PrimeField p -> PrimeField p #(*) :: PrimeField p -> PrimeField p -> PrimeField p #negate :: PrimeField p -> PrimeField p #abs :: PrimeField p -> PrimeField p #signum :: PrimeField p -> PrimeField p # Source # Instance detailsDefined in PrimeField Methodscompare :: PrimeField p -> PrimeField p -> Ordering #(<) :: PrimeField p -> PrimeField p -> Bool #(<=) :: PrimeField p -> PrimeField p -> Bool #(>) :: PrimeField p -> PrimeField p -> Bool #(>=) :: PrimeField p -> PrimeField p -> Bool #max :: PrimeField p -> PrimeField p -> PrimeField p #min :: PrimeField p -> PrimeField p -> PrimeField p # Source # Instance detailsDefined in PrimeField MethodsshowsPrec :: Int -> PrimeField p -> ShowS #show :: PrimeField p -> String #showList :: [PrimeField p] -> ShowS # Source # Instance detailsDefined in PrimeField Associated Typestype Rep (PrimeField p) :: Type -> Type # Methodsfrom :: PrimeField p -> Rep (PrimeField p) x #to :: Rep (PrimeField p) x -> PrimeField p # KnownNat p => Random (PrimeField p) Source # Instance detailsDefined in PrimeField MethodsrandomR :: RandomGen g => (PrimeField p, PrimeField p) -> g -> (PrimeField p, g) #random :: RandomGen g => g -> (PrimeField p, g) #randomRs :: RandomGen g => (PrimeField p, PrimeField p) -> g -> [PrimeField p] #randoms :: RandomGen g => g -> [PrimeField p] #randomRIO :: (PrimeField p, PrimeField p) -> IO (PrimeField p) # KnownNat p => Arbitrary (PrimeField p) Source # Instance detailsDefined in PrimeField Methodsshrink :: PrimeField p -> [PrimeField p] # Source # Instance detailsDefined in PrimeField Methods(.&.) :: PrimeField p -> PrimeField p -> PrimeField p #(.|.) :: PrimeField p -> PrimeField p -> PrimeField p #xor :: PrimeField p -> PrimeField p -> PrimeField p #shift :: PrimeField p -> Int -> PrimeField p #rotate :: PrimeField p -> Int -> PrimeField p #bit :: Int -> PrimeField p #setBit :: PrimeField p -> Int -> PrimeField p #clearBit :: PrimeField p -> Int -> PrimeField p #testBit :: PrimeField p -> Int -> Bool #bitSize :: PrimeField p -> Int #isSigned :: PrimeField p -> Bool #shiftL :: PrimeField p -> Int -> PrimeField p #unsafeShiftL :: PrimeField p -> Int -> PrimeField p #shiftR :: PrimeField p -> Int -> PrimeField p #unsafeShiftR :: PrimeField p -> Int -> PrimeField p #rotateL :: PrimeField p -> Int -> PrimeField p #rotateR :: PrimeField p -> Int -> PrimeField p #popCount :: PrimeField p -> Int # KnownNat p => GcdDomain (PrimeField p) Source # Instance detailsDefined in PrimeField Methodsdivide :: PrimeField p -> PrimeField p -> Maybe (PrimeField p) #gcd :: PrimeField p -> PrimeField p -> PrimeField p #lcm :: PrimeField p -> PrimeField p -> PrimeField p #coprime :: PrimeField p -> PrimeField p -> Bool # KnownNat p => Euclidean (PrimeField p) Source # Instance detailsDefined in PrimeField MethodsquotRem :: PrimeField p -> PrimeField p -> (PrimeField p, PrimeField p) #quot :: PrimeField p -> PrimeField p -> PrimeField p #rem :: PrimeField p -> PrimeField p -> PrimeField p #degree :: PrimeField p -> Natural # KnownNat p => Semiring (PrimeField p) Source # Instance detailsDefined in PrimeField Methodsplus :: PrimeField p -> PrimeField p -> PrimeField p #times :: PrimeField p -> PrimeField p -> PrimeField p # KnownNat p => Ring (PrimeField p) Source # Instance detailsDefined in PrimeField Methodsnegate :: PrimeField p -> PrimeField p # KnownNat p => Pretty (PrimeField p) Source # Instance detailsDefined in PrimeField Methodspretty :: PrimeField p -> Doc #prettyList :: [PrimeField p] -> Doc # Source # Instance detailsDefined in PrimeField Methodsdeg :: PrimeField p -> Int Source #qr :: PrimeField p -> Bool Source #quad :: PrimeField p -> PrimeField p -> PrimeField p -> Maybe (PrimeField p) Source #rnd :: MonadRandom m => m (PrimeField p) Source #sr :: PrimeField p -> Maybe (PrimeField p) Source # KnownNat p => Field (PrimeField p) Source # Instance detailsDefined in PrimeField Methodsdivide :: PrimeField p -> PrimeField p -> PrimeField p Source #minus :: PrimeField p -> PrimeField p -> PrimeField p Source # type Rep (PrimeField p) Source # Instance detailsDefined in PrimeField type Rep (PrimeField p) = D1 (MetaData "PrimeField" "PrimeField" "galois-field-0.4.0-728POA9oIqrGokqiBM9ptF" True) (C1 (MetaCons "PF" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)))

Embed field element to integers.