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.Submodule Class Reference
Inheritance diagram for nzmath.module.Submodule:
Collaboration diagram for nzmath.module.Submodule:

Public Member Functions

def __init__ (self, row, column, compo=0, coeff_ring=0, ishnf=None)
def fromMatrix (cls, mat, ishnf=None)
def getGenerators (self)
def isSubmodule (self, other)
def isEqual (self, other)
def isContains (self, other)
def toHNF (self)
def sumOfSubmodules (self, other)
def intersectionOfSubmodules (self, other)
def represent_element (self, other)
def linear_combination (self, coeff)
- Public Member Functions inherited from nzmath.matrix.RingMatrix
def __init__ (self, row, column, compo=0, coeff_ring=0)
def __add__ (self, other)
def __sub__ (self, other)
def __mul__ (self, other)
def __rmul__ (self, other)
def __mod__ (self, other)
def __pos__ (self)
def __neg__ (self)
def getCoefficientRing (self)
def toFieldMatrix (self)
def toSubspace (self, isbasis=None)
def hermiteNormalForm (self, non_zero=False)
def exthermiteNormalForm (self, non_zero=False)
def kernelAsModule (self)
- Public Member Functions inherited from nzmath.matrix.Matrix
def __getitem__ (self, index)
def __setitem__ (self, key, value)
def __eq__ (self, other)
def __hash__ (self)
def __ne__ (self, other)
def __nonzero__ (self)
def __contains__ (self, item)
def __repr__ (self)
def __str__ (self)
def __call__ (self, arg)
def map (self, function)
def reduce (self, function, initializer=None)
def copy (self)
def set (self, compo)
def setRow (self, m, arg)
def setColumn (self, n, arg)
def getRow (self, i)
def getColumn (self, j)
def swapRow (self, m1, m2)
def swapColumn (self, n1, n2)
def insertRow (self, i, arg)
def insertColumn (self, j, arg)
def extendRow (self, arg)
def extendColumn (self, arg)
def deleteRow (self, i)
def deleteColumn (self, j)
def transpose (self)
def getBlock (self, i, j, row, column=None)
def subMatrix (self, I, J=None)
def toMatrix (self, flag=True)

Public Attributes

- Public Attributes inherited from nzmath.matrix.RingMatrix
- Public Attributes inherited from nzmath.matrix.Matrix

Private Member Functions

def _HNF_solve (self, other)

Additional Inherited Members

- Static Public Attributes inherited from nzmath.matrix.RingMatrix
def HNF = hermiteNormalForm
def extHNF = exthermiteNormalForm

Detailed Description

Submodule is a class for submodules (typically, Z^n).
we assume that coeff_ring is PID.
(i.e. hermite normal form (HNF) for matrices exists.)

Definition at line 16 of file

Constructor & Destructor Documentation

◆ __init__()

def nzmath.module.Submodule.__init__ (   self,
  compo = 0,
  coeff_ring = 0,
  ishnf = None 
Submodule(row, column [,components, coeff_ring, ishnf])

Definition at line 23 of file

References nzmath.matrix.Matrix._initialize().

Member Function Documentation

◆ _HNF_solve()

def nzmath.module.Submodule._HNF_solve (   self,
return X over coeff_ring s.t. self * X = other,
where self is HNF, other is vector

Definition at line 154 of file

References nzmath.matrix.Matrix.coeff_ring, nzmath.matrix.Matrix.column, nzmath.lattice.LatticeElement.column, nzmath.bigrange.range(), nzmath.matrix.Matrix.row, and nzmath.lattice.LatticeElement.row.

Referenced by nzmath.module.Submodule.represent_element().

◆ fromMatrix()

def nzmath.module.Submodule.fromMatrix (   cls,
  ishnf = None 
A constructor class method, which creates Submodule from a
Matrix instance.

Definition at line 37 of file

◆ getGenerators()

def nzmath.module.Submodule.getGenerators (   self)
return (current) generator of self (i.e. essentially, self.compo)

Definition at line 47 of file

References nzmath.matrix.Matrix.column, nzmath.lattice.LatticeElement.column, and nzmath.bigrange.range().

◆ intersectionOfSubmodules()

def nzmath.module.Submodule.intersectionOfSubmodules (   self,

◆ isContains()

def nzmath.module.Submodule.isContains (   self,
determine whether other is in self or not.
if you want other to be represented as self, use represent_element.

Definition at line 85 of file

◆ isEqual()

def nzmath.module.Submodule.isEqual (   self,
determine self == other as module

Definition at line 62 of file

References nzmath.module.Submodule.ishnf.

Referenced by nzmath.module.Submodule.isSubmodule().

◆ isSubmodule()

def nzmath.module.Submodule.isSubmodule (   self,
Check self is in other as submodule

Definition at line 53 of file

References nzmath.module.Submodule.isEqual(), and nzmath.module.Submodule.sumOfSubmodules().

◆ linear_combination()

def nzmath.module.Submodule.linear_combination (   self,
return a vector corresponding a linear combination of (current) basis
with given Z-coefficients.

Definition at line 144 of file

References nzmath.matrix.Matrix.column, nzmath.lattice.LatticeElement.column, and nzmath.bigrange.range().

◆ represent_element()

def nzmath.module.Submodule.represent_element (   self,
represent other as a linear combination with hnf generators
if other not in self, return False
this method execute self.toHNF()

Definition at line 135 of file

References nzmath.module.Submodule._HNF_solve(), and nzmath.module.Submodule.toHNF().

◆ sumOfSubmodules()

def nzmath.module.Submodule.sumOfSubmodules (   self,

◆ toHNF()

def nzmath.module.Submodule.toHNF (   self)
Change matrix to HNF(hermite normal form)
Note that HNF do not always give basis of self
(i.e. HNF may be redundant)

Definition at line 93 of file

References nzmath.matrix.Matrix.coeff_ring, nzmath.matrix.RingMatrix.hermiteNormalForm(), nzmath.module.Submodule.ishnf, nzmath.matrix.Matrix.row, and nzmath.lattice.LatticeElement.row.

Referenced by nzmath.module.Submodule.represent_element().

Member Data Documentation

◆ column


Definition at line 104 of file

◆ compo

◆ ishnf


Definition at line 34 of file

Referenced by nzmath.module.Submodule.isEqual(), and nzmath.module.Submodule.toHNF().

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