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

## Public Member Functions

def __init__ (self, row, column, compo=0, coeff_ring=0)

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)

row

column

compo

coeff_ring

## Private Member Functions

def _initialize (self, row, column, compo=0, coeff_ring=0)

def _selectMatrix (self)

__class__

## Detailed Description

```Matrix is a class for matrices.
```

Definition at line 7 of file matrix.py.

## ◆ __init__()

 def nzmath.matrix.Matrix.__init__ ( self, row, column, compo = `0`, coeff_ring = `0` )
```Matrix(row, column [,components, coeff_ring])
```

Definition at line 12 of file matrix.py.

## ◆ __call__()

 def nzmath.matrix.Matrix.__call__ ( self, arg )
```Return matrix applied __call__ to each elements.
```

Definition at line 206 of file matrix.py.

## ◆ __contains__()

 def nzmath.matrix.Matrix.__contains__ ( self, item )
```Check whether item == one of self's element.
```

Definition at line 176 of file matrix.py.

## ◆ __eq__()

 def nzmath.matrix.Matrix.__eq__ ( self, other )
```Check self == other.
self == 0 means whether self == zeromatrix or not.
```

Definition at line 134 of file matrix.py.

## ◆ __getitem__()

 def nzmath.matrix.Matrix.__getitem__ ( self, index )
```M[i,j] : Return (i,j)-component of M.
M[i] <==> M.getColumn(i)
```

Definition at line 110 of file matrix.py.

## ◆ __hash__()

 def nzmath.matrix.Matrix.__hash__ ( self )

Definition at line 152 of file matrix.py.

## ◆ __ne__()

 def nzmath.matrix.Matrix.__ne__ ( self, other )
```Check self != other.
self != 0 means whether self != zeromatrix or not.
```

Definition at line 159 of file matrix.py.

## ◆ __nonzero__()

 def nzmath.matrix.Matrix.__nonzero__ ( self )
```Check self != zeromatrix
```

Definition at line 166 of file matrix.py.

## ◆ __repr__()

 def nzmath.matrix.Matrix.__repr__ ( self )

Definition at line 185 of file matrix.py.

## ◆ __setitem__()

 def nzmath.matrix.Matrix.__setitem__ ( self, key, value )
```M[i,j] = a   :   Substitute a for (i,j)-component of M.
M[i] = V <==> M.setColumn(i, V)
```

Definition at line 122 of file matrix.py.

Referenced by nzmath.matrix.Matrix.__setitem__().

## ◆ __str__()

 def nzmath.matrix.Matrix.__str__ ( self )

Definition at line 193 of file matrix.py.

## ◆ _initialize()

 def nzmath.matrix.Matrix._initialize ( self, row, column, compo = `0`, coeff_ring = `0` )
private
```initialize matrix.
```

Reimplemented in nzmath.matrix.SquareMatrix, and nzmath.matrix.FieldMatrix.

Definition at line 19 of file matrix.py.

## ◆ _selectMatrix()

 def nzmath.matrix.Matrix._selectMatrix ( self )
private
```Select Matrix class.
```

Reimplemented in nzmath.matrix.FieldMatrix, and nzmath.matrix.RingMatrix.

Definition at line 95 of file matrix.py.

## ◆ deleteColumn()

 def nzmath.matrix.Matrix.deleteColumn ( self, j )
```deleteColumn(j) : deleted j-th column
```

Definition at line 400 of file matrix.py.

## ◆ deleteRow()

 def nzmath.matrix.Matrix.deleteRow ( self, i )
```deleteRow(i) : deleted i-th row
```

Definition at line 392 of file matrix.py.

## ◆ extendColumn()

 def nzmath.matrix.Matrix.extendColumn ( self, arg )
```extendColumn(new_column) : join new_column in horizontal way.
```

Definition at line 386 of file matrix.py.

## ◆ extendRow()

 def nzmath.matrix.Matrix.extendRow ( self, arg )
```extendRow(new_row) : join new_row in vertical way.
```

Definition at line 380 of file matrix.py.

## ◆ getBlock()

 def nzmath.matrix.Matrix.getBlock ( self, i, j, row, column = `None` )
```Return a block whose size is row*column, (1,1)-element is self[i,j].
```

Definition at line 420 of file matrix.py.

## ◆ getColumn()

 def nzmath.matrix.Matrix.getColumn ( self, j )
```getColumn(j) : Return j-th column in form of Matrix
```

Definition at line 302 of file matrix.py.

Referenced by nzmath.matrix.Matrix.__getitem__().

## ◆ getRow()

 def nzmath.matrix.Matrix.getRow ( self, i )
```getRow(i) : Return i-th row in form of Matrix
```

Definition at line 296 of file matrix.py.

References nzmath.matrix.Matrix.compo, and nzmath.lattice.LatticeElement.compo.

## ◆ insertColumn()

 def nzmath.matrix.Matrix.insertColumn ( self, j, arg )
```insertColumn(j, new_column) : added new_column
new_column can be a list or a Matrix
```

Definition at line 352 of file matrix.py.

Referenced by nzmath.matrix.Matrix.extendColumn().

## ◆ insertRow()

 def nzmath.matrix.Matrix.insertRow ( self, i, arg )
```insertRow(i, new_row) : added new_row
new_row can be a list or a Matrix
```

Definition at line 328 of file matrix.py.

Referenced by nzmath.matrix.Matrix.extendRow().

## ◆ map()

 def nzmath.matrix.Matrix.map ( self, function )
```Return matrix applied function to all self elements.
```

Definition at line 221 of file matrix.py.

Referenced by nzmath.matrix.RingMatrix.__neg__().

## ◆ reduce()

 def nzmath.matrix.Matrix.reduce ( self, function, initializer = `None` )
```Return value applied binomial function to all self elements.
```

Definition at line 230 of file matrix.py.

## ◆ set()

 def nzmath.matrix.Matrix.set ( self, compo )
```set(compo) : Substitute list for components
```

Definition at line 253 of file matrix.py.

## ◆ setColumn()

 def nzmath.matrix.Matrix.setColumn ( self, n, arg )
```setColumn(n, new_column) : new_column should be a list/Vector
```

Definition at line 279 of file matrix.py.

Referenced by nzmath.matrix.Matrix.__setitem__(), and nzmath.matrix.Matrix.setColumn().

## ◆ setRow()

 def nzmath.matrix.Matrix.setRow ( self, m, arg )
```setRow(m, new_row) : new_row should be a list/Vector
```

Definition at line 262 of file matrix.py.

Referenced by nzmath.matrix.Matrix.setRow().

## ◆ subMatrix()

 def nzmath.matrix.Matrix.subMatrix ( self, I, J = `None` )
```Return submatrix whose element is self[i, j] for i in I and j in J.
If I, J is not index(list or tuple) but integer,
return submatrix which deleted I-th row and J-th column from self.
```

Definition at line 433 of file matrix.py.

Referenced by nzmath.matrix.RingSquareMatrix.cofactor().

## ◆ swapColumn()

 def nzmath.matrix.Matrix.swapColumn ( self, n1, n2 )
```swapColumn(n1, n2) : Swap self's n1-th column and n2-th column.
```

Definition at line 319 of file matrix.py.

## ◆ swapRow()

 def nzmath.matrix.Matrix.swapRow ( self, m1, m2 )
```swapRow(m1, m2) : Swap self's m1-th row and m2-th row.
```

Definition at line 311 of file matrix.py.

References nzmath.matrix.Matrix.compo, and nzmath.lattice.LatticeElement.compo.

## ◆ toMatrix()

 def nzmath.matrix.Matrix.toMatrix ( self, flag = `True` )
```return the matrix (self)
(this method is for compatibility to vector)
```

Definition at line 453 of file matrix.py.

## ◆ transpose()

 def nzmath.matrix.Matrix.transpose ( self )
```Return transposed matrix of self.
```

Definition at line 410 of file matrix.py.

## ◆ row

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