NZMATH  1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
  Fossies Dox: NZMATH-1.2.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

nzmath.finitefield.ExtendedField Class Reference
Inheritance diagram for nzmath.finitefield.ExtendedField:
[legend]
Collaboration diagram for nzmath.finitefield.ExtendedField:
[legend]

Public Member Functions

def __init__ (self, basefield, modulus)
 
def prime_extension (cls, characteristic, n_or_modulus)
 
def card (self)
 
def createElement (self, seed)
 
def __repr__ (self)
 
def __str__ (self)
 
def __hash__ (self)
 
def issuperring (self, other)
 
def issubring (self, other)
 
def __contains__ (self, elem)
 
def __eq__ (self, other)
 
def primitive_element (self)
 
- Public Member Functions inherited from nzmath.finitefield.FiniteField
def __init__ (self, characteristic)
 
def getCharacteristic (self)
 
def order (self, elem)
 
def random_element (self, *args)
 
def Legendre (self, element)
 
def TonelliShanks (self, element)
 
def sqrt (self, element)
 
- Public Member Functions inherited from nzmath.ring.Field
def __init__ (self)
 
def createElement (self, *args)
 
def isfield (self)
 
def gcd (self, a, b)
 
def getQuotientField (self)
 
- Public Member Functions inherited from nzmath.ring.CommutativeRing
def isdomain (self)
 
def isnoetherian (self)
 
def isufd (self)
 
def ispid (self)
 
def iseuclidean (self)
 
def registerModuleAction (self, action_ring, action)
 
def hasaction (self, action_ring)
 
def getaction (self, action_ring)
 
- Public Member Functions inherited from nzmath.ring.Ring
def getCommonSuperring (self, other)
 
def __ne__ (self, other)
 

Public Attributes

 basefield
 
 modulus
 
 degree
 
 char
 
- Public Attributes inherited from nzmath.finitefield.FiniteField
 char
 
- Public Attributes inherited from nzmath.ring.CommutativeRing
 properties
 

Properties

 one = property(_getOne, None, None, "multiplicative unit.")
 
 zero = property(_getZero, None, None, "additive unit.")
 

Private Member Functions

def _getOne (self)
 
def _getZero (self)
 

Static Private Member Functions

def _random_irriducible (char, degree)
 
def _small_irriducible (char, degree)
 
def _primitive_polynomial (char, degree)
 
def _scalar_mul (integer, fqelem)
 

Private Attributes

 _orderfactor
 
 _one
 
 _zero
 

Detailed Description

ExtendedField is a class for finite field, whose cardinality
q = p**n with a prime p and n>1. It is usually called F_q or GF(q).

Definition at line 538 of file finitefield.py.

Constructor & Destructor Documentation

◆ __init__()

def nzmath.finitefield.ExtendedField.__init__ (   self,
  basefield,
  modulus 
)
ExtendedField(basefield, modulus)

Create a field extension basefield[X]/(modulus(X)).

The modulus has to be an irreducible polynomial with
coefficients in the basefield.

Definition at line 543 of file finitefield.py.

Member Function Documentation

◆ __contains__()

def nzmath.finitefield.ExtendedField.__contains__ (   self,
  elem 
)

◆ __eq__()

◆ __hash__()

◆ __repr__()

◆ __str__()

def nzmath.finitefield.ExtendedField.__str__ (   self)

◆ _getOne()

def nzmath.finitefield.ExtendedField._getOne (   self)
private

◆ _getZero()

def nzmath.finitefield.ExtendedField._getZero (   self)
private

◆ _primitive_polynomial()

def nzmath.finitefield.ExtendedField._primitive_polynomial (   char,
  degree 
)
staticprivate
Return a primitive polynomial of self.degree.

REF: Lidl & Niederreiter, Introduction to finite fields and
     their applications.

Definition at line 639 of file finitefield.py.

References nzmath.finitefield.ExtendedField.degree.

Referenced by nzmath.finitefield.ExtendedField.prime_extension().

◆ _random_irriducible()

def nzmath.finitefield.ExtendedField._random_irriducible (   char,
  degree 
)
staticprivate
Return randomly chosen irreducible polynomial of self.degree.

Definition at line 598 of file finitefield.py.

◆ _scalar_mul()

def nzmath.finitefield.ExtendedField._scalar_mul (   integer,
  fqelem 
)
staticprivate
Return integer * (Fq element).

Definition at line 664 of file finitefield.py.

Referenced by nzmath.module.Module.__mul__().

◆ _small_irriducible()

def nzmath.finitefield.ExtendedField._small_irriducible (   char,
  degree 
)
staticprivate
Return an irreducible polynomial of self.degree with a small
number of non-zero coefficients.

Definition at line 613 of file finitefield.py.

References nzmath.bigrange.range().

◆ card()

◆ createElement()

◆ issubring()

◆ issuperring()

◆ prime_extension()

def nzmath.finitefield.ExtendedField.prime_extension (   cls,
  characteristic,
  n_or_modulus 
)
ExtendedField.prime_extension(p, n_or_modulus) creates a
finite field extended over prime field.

characteristic must be prime. n_or_modulus can be:
  1) an integer greater than 1, or
  2) a polynomial in a polynomial ring of F_p with degree
     greater than 1.

Definition at line 569 of file finitefield.py.

References nzmath.finitefield.ExtendedField._primitive_polynomial().

◆ primitive_element()

def nzmath.finitefield.ExtendedField.primitive_element (   self)
Return a primitive element of the field, i.e., a generator of
the multiplicative group.

Reimplemented from nzmath.finitefield.FiniteField.

Definition at line 769 of file finitefield.py.

References nzmath.finitefield.FiniteField._orderfactor, and nzmath.finitefield.ExtendedField.card().

Member Data Documentation

◆ _one

◆ _orderfactor

nzmath.finitefield.ExtendedField._orderfactor
private

Definition at line 776 of file finitefield.py.

◆ _zero

◆ basefield

nzmath.finitefield.ExtendedField.basefield

Definition at line 553 of file finitefield.py.

Referenced by nzmath.finitefield.ExtendedField.createElement().

◆ char

nzmath.finitefield.ExtendedField.char

Definition at line 720 of file finitefield.py.

◆ degree

◆ modulus

nzmath.finitefield.ExtendedField.modulus

Property Documentation

◆ one

◆ zero

nzmath.finitefield.ExtendedField.zero = property(_getZero, None, None, "additive unit.")
static

The documentation for this class was generated from the following file: