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.module.Module Class Reference
Inheritance diagram for nzmath.module.Module:
[legend]
Collaboration diagram for nzmath.module.Module:
[legend]

Public Member Functions

def __init__ (self, pair_mat_repr, number_field, base=None, ishnf=False)
 
def toHNF (self)
 
def __repr__ (self)
 
def __str__ (self)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __contains__ (self, other)
 
def __add__ (self, other)
 
def __mul__ (self, other)
 
def __pow__ (self, other)
 
def copy (self)
 
def intersect (self, other)
 
def issubmodule (self, other)
 
def issupermodule (self, other)
 
def represent_element (self, other)
 
def change_base_module (self, other_base)
 
def index (self)
 
def smallest_rational (self)
 

Public Attributes

 number_field
 
 base
 
 denominator
 
 mat_repr
 

Private Member Functions

def _simplify (self)
 
def _rational_mul (self, other)
 
def _scalar_mul (self, other)
 
def _module_mul (self, other)
 
def _base_multiplication (self)
 

Private Attributes

 _base_multiply
 

Static Private Attributes

def __rmul__ = __mul__
 

Detailed Description

for computing module with HNF over a number field.
A module is a finitely generated sub Z-module.
(Note that we do not assume rank of a module is deg(number_field).)

Definition at line 195 of file module.py.

Constructor & Destructor Documentation

◆ __init__()

def nzmath.module.Module.__init__ (   self,
  pair_mat_repr,
  number_field,
  base = None,
  ishnf = False 
)
pair_mat_repr: generators represented with respect to base_module
       1: [[deg(number_field))-integral tuple/vector], denominator]
       2: [integral matrix whose the number of row is deg(number_field), 
              denominator]
       3: rational matrix whose the number of row is deg(number_field)
number_field:  an instance of NumberField
base:          a base module represented with respect to Z[theta]
       1: [deg(number_field)-rational tuple/vector], which represents basis
       2: deg(number_field)-square non-singular rational matrix
ishnf:         if hnf_repr is already HNF-form, set True

Reimplemented in nzmath.module.Ideal.

Definition at line 201 of file module.py.

Member Function Documentation

◆ __add__()

◆ __contains__()

def nzmath.module.Module.__contains__ (   self,
  other 
)

◆ __eq__()

◆ __mul__()

def nzmath.module.Module.__mul__ (   self,
  other 
)

◆ __ne__()

def nzmath.module.Module.__ne__ (   self,
  other 
)

Definition at line 286 of file module.py.

◆ __pow__()

def nzmath.module.Module.__pow__ (   self,
  other 
)
self ** other (based on ideal multiplication)

Reimplemented in nzmath.module.Ideal.

Definition at line 474 of file module.py.

References nzmath.factor.misc.FactoredInteger.copy(), nzmath.imaginary.Complex.copy(), nzmath.matrix.Matrix.copy(), and nzmath.module.Module.copy().

◆ __repr__()

◆ __str__()

def nzmath.module.Module.__str__ (   self)

◆ _base_multiplication()

def nzmath.module.Module._base_multiplication (   self)
private
return [base[i] * base[j]] (as a numberfield element)
this is a precomputation for computing _module_mul

Definition at line 494 of file module.py.

References nzmath.module.Module.base, and nzmath.module.Module.number_field.

Referenced by nzmath.module.Ideal._precompute_for_different(), and nzmath.module.Module._scalar_mul().

◆ _module_mul()

◆ _rational_mul()

◆ _scalar_mul()

◆ _simplify()

def nzmath.module.Module._simplify (   self)
private
simplify self.denominator

Definition at line 242 of file module.py.

References nzmath.module._toIntegerMatrix(), nzmath.module.Module.denominator, and nzmath.module.Module.mat_repr.

◆ change_base_module()

◆ copy()

◆ index()

def nzmath.module.Module.index (   self)
return order of a residue group over base_module 
(i.e. [base_module : module] or [module : base_module] ** (-1))

Definition at line 629 of file module.py.

References nzmath.module.Module.base, nzmath.module.Module.copy(), nzmath.module.Module.denominator, nzmath.module.Module.mat_repr, and nzmath.bigrange.range().

Referenced by nzmath.module.Ideal.norm().

◆ intersect()

◆ issubmodule()

def nzmath.module.Module.issubmodule (   self,
  other 
)

◆ issupermodule()

def nzmath.module.Module.issupermodule (   self,
  other 
)

◆ represent_element()

def nzmath.module.Module.represent_element (   self,
  other 
)
represent other as a linear combination with generators of self
if other not in self, return False
Note that we do not assume self.mat_repr is HNF

Definition at line 565 of file module.py.

References nzmath.module.Module.base, nzmath.module.Module.denominator, nzmath.module.Module.mat_repr, and nzmath.bigrange.range().

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

◆ smallest_rational()

def nzmath.module.Module.smallest_rational (   self)
return the Z-generator of intersection of self and rational field

Definition at line 651 of file module.py.

References nzmath.module._toIntegerMatrix(), nzmath.module.Module.base, nzmath.module.Module.copy(), nzmath.module.Module.denominator, and nzmath.module.Module.mat_repr.

◆ toHNF()

def nzmath.module.Module.toHNF (   self)
transform mat_repr to hnf form

Definition at line 253 of file module.py.

References nzmath.module.Module.mat_repr.

Member Data Documentation

◆ __rmul__

def nzmath.module.Module.__rmul__ = __mul__
staticprivate

Definition at line 367 of file module.py.

◆ _base_multiply

nzmath.module.Module._base_multiply
private

Definition at line 501 of file module.py.

◆ base

◆ denominator

nzmath.module.Module.denominator

Definition at line 230 of file module.py.

Referenced by nzmath.rational.Rational.__abs__(), nzmath.rational.Rational.__add__(), nzmath.ring.QuotientFieldElement.__add__(), nzmath.round2.ModuleWithDenominator.__add__(), nzmath.poly.ratfunc.RationalFunction.__call__(), nzmath.module.Module.__contains__(), nzmath.rational.Rational.__eq__(), nzmath.ring.QuotientFieldElement.__eq__(), nzmath.rational.Rational.__hash__(), nzmath.ring.QuotientFieldElement.__hash__(), nzmath.poly.ratfunc.RationalFunction.__init__(), nzmath.rational.Rational.__long__(), nzmath.rational.Rational.__mul__(), nzmath.ring.QuotientFieldElement.__mul__(), nzmath.round2.ModuleWithDenominator.__mul__(), nzmath.rational.Rational.__neg__(), nzmath.ring.QuotientFieldElement.__neg__(), nzmath.rational.Rational.__pos__(), nzmath.rational.Rational.__pow__(), nzmath.ring.QuotientFieldElement.__pow__(), nzmath.rational.Rational.__radd__(), nzmath.poly.ratfunc.RationalFunction.__repr__(), nzmath.module.Module.__repr__(), nzmath.rational.Rational.__repr__(), nzmath.rational.Rational.__rmul__(), nzmath.rational.Rational.__rsub__(), nzmath.ring.QuotientFieldElement.__rsub__(), nzmath.rational.Rational.__rtruediv__(), nzmath.ring.QuotientFieldElement.__rtruediv__(), nzmath.poly.ratfunc.RationalFunction.__str__(), nzmath.module.Module.__str__(), nzmath.rational.Rational.__str__(), nzmath.rational.Rational.__sub__(), nzmath.ring.QuotientFieldElement.__sub__(), nzmath.rational.Rational.__truediv__(), nzmath.ring.QuotientFieldElement.__truediv__(), nzmath.round2.ModuleWithDenominator.__truediv__(), nzmath.rational.Rational._init_by_float_float(), nzmath.rational.Rational._init_by_float_int(), nzmath.rational.Rational._init_by_float_Rational(), nzmath.rational.Rational._init_by_int_float(), nzmath.rational.Rational._init_by_int_int(), nzmath.rational.Rational._init_by_int_Rational(), nzmath.rational.Rational._init_by_Rational_float(), nzmath.rational.Rational._init_by_Rational_int(), nzmath.rational.Rational._init_by_Rational_Rational(), nzmath.module.Module._rational_mul(), nzmath.rational.Rational._reduce(), nzmath.module.Module._scalar_mul(), nzmath.module.Module._simplify(), nzmath.module.Module.change_base_module(), nzmath.rational.Rational.compare(), nzmath.module.Module.copy(), nzmath.rational.Rational.decimalString(), nzmath.round2.ModuleWithDenominator.determinant(), nzmath.rational.Rational.expand(), nzmath.round2.ModuleWithDenominator.get_polynomials(), nzmath.round2.ModuleWithDenominator.get_rationals(), nzmath.module.Module.index(), nzmath.ring.QuotientFieldElement.inverse(), nzmath.module.Module.represent_element(), nzmath.module.Module.smallest_rational(), nzmath.rational.Rational.toFloat(), and nzmath.rational.Rational.trim().

◆ mat_repr

◆ number_field


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