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:
[legend]
Collaboration diagram for nzmath.module.Submodule:
[legend]

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

 ishnf
 
 compo
 
 column
 
- Public Attributes inherited from nzmath.matrix.RingMatrix
 row
 
 coeff_ring
 
- Public Attributes inherited from nzmath.matrix.Matrix
 row
 
 column
 
 compo
 
 coeff_ring
 

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 module.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 23 of file module.py.

References nzmath.matrix.Matrix._initialize().

Member Function Documentation

◆ _HNF_solve()

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

Definition at line 154 of file module.py.

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,
  mat,
  ishnf = None 
)
A constructor class method, which creates Submodule from a
Matrix instance.

Definition at line 37 of file module.py.

◆ getGenerators()

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

Definition at line 47 of file module.py.

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

◆ intersectionOfSubmodules()

def nzmath.module.Submodule.intersectionOfSubmodules (   self,
  other 
)

◆ isContains()

def nzmath.module.Submodule.isContains (   self,
  other 
)
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 module.py.

◆ isEqual()

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

Definition at line 62 of file module.py.

References nzmath.module.Submodule.ishnf.

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

◆ isSubmodule()

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


Definition at line 53 of file module.py.

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

◆ linear_combination()

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

Definition at line 144 of file module.py.

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

◆ represent_element()

def nzmath.module.Submodule.represent_element (   self,
  other 
)
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 module.py.

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

◆ sumOfSubmodules()

def nzmath.module.Submodule.sumOfSubmodules (   self,
  other 
)

◆ 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 module.py.

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

nzmath.module.Submodule.column

Definition at line 104 of file module.py.

◆ compo

◆ ishnf

nzmath.module.Submodule.ishnf

Definition at line 34 of file module.py.

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


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