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 __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)

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)

_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.

## ◆ __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

 def nzmath.module.Module.__add__ ( self, other )
```return self + other (as module)
```

Definition at line 325 of file module.py.

## ◆ __contains__()

 def nzmath.module.Module.__contains__ ( self, other )
```Check whether other is an element of self or not
```

Definition at line 289 of file module.py.

## ◆ __eq__()

 def nzmath.module.Module.__eq__ ( self, other )
```Check whether self == other or not (as module)
```

Definition at line 276 of file module.py.

References nzmath.module.Module.change_base_module().

## ◆ __mul__()

 def nzmath.module.Module.__mul__ ( self, other )
```return self * other (as ideal computation)
```

Definition at line 352 of file module.py.

## ◆ __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.

## ◆ __repr__()

 def nzmath.module.Module.__repr__ ( self )
```formal representation
```

Definition at line 259 of file module.py.

## ◆ __str__()

 def nzmath.module.Module.__str__ ( self )
```simple representation
```

Definition at line 268 of file module.py.

## ◆ _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.

## ◆ _module_mul()

 def nzmath.module.Module._module_mul ( self, other )
private
```return self * other as the multiplication of modules
```

Definition at line 436 of file module.py.

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

## ◆ _rational_mul()

 def nzmath.module.Module._rational_mul ( self, other )
private
```return other * self, assuming other is a rational element
```

Definition at line 369 of file module.py.

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

## ◆ _scalar_mul()

 def nzmath.module.Module._scalar_mul ( self, other )
private
```return other * self, assuming other is a scalar
(i.e. an element of self.number_field)
```

Definition at line 393 of file module.py.

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

## ◆ _simplify()

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

Definition at line 242 of file module.py.

## ◆ change_base_module()

 def nzmath.module.Module.change_base_module ( self, other_base )
```change base_module to other_base_module
(i.e. represent with respect to base_module)
```

Definition at line 603 of file module.py.

## ◆ copy()

 def nzmath.module.Module.copy ( self )

## ◆ 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.

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

## ◆ intersect()

 def nzmath.module.Module.intersect ( self, other )
```return intersection of self and other
```

Definition at line 515 of file module.py.

## ◆ issubmodule()

 def nzmath.module.Module.issubmodule ( self, other )
```Check self is submodule of other.
```

Definition at line 545 of file module.py.

## ◆ issupermodule()

 def nzmath.module.Module.issupermodule ( self, other )
```Check other is supermodule of self.
```

Definition at line 556 of file module.py.

## ◆ 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.

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.

## ◆ 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.

## ◆ __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.

## ◆ number_field

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