NZMATH
1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
![]() ![]() |
Public Member Functions | |
def | __init__ (self, size, scalars) |
def | __eq__ (self, other) |
def | __hash__ (self) |
def | __repr__ (self) |
def | __str__ (self) |
def | getInstance (cls, size, scalars) |
def | unitMatrix (self) |
def | zeroMatrix (self) |
def | createElement (self, compo) |
def | getCharacteristic (self) |
def | issubring (self, other) |
def | issuperring (self, other) |
def | getCommonSuperring (self, other) |
![]() | |
def | __init__ (self) |
def | __ne__ (self, other) |
Public Attributes | |
size | |
scalars | |
Properties | |
one = property(_getOne, None, None, "multiplicative unit") | |
zero = property(_getZero, None, None, "additive unit") | |
Private Member Functions | |
def | _getOne (self) |
def | _getZero (self) |
Private Attributes | |
__class__ | |
_one | |
_zero | |
Static Private Attributes | |
dictionary | _instances = {} |
def nzmath.matrix.MatrixRing.__init__ | ( | self, | |
size, | |||
scalars | |||
) |
def nzmath.matrix.MatrixRing.__eq__ | ( | self, | |
other | |||
) |
self == other
Reimplemented from nzmath.ring.Ring.
Definition at line 1604 of file matrix.py.
Referenced by nzmath.poly.multivar.TermIndices.__ne__(), nzmath.poly.ring.PolynomialRing.__ne__(), nzmath.quad.ReducedQuadraticForm.__ne__(), nzmath.ring.Ring.__ne__(), nzmath.poly.formalsum.FormalSumContainerInterface.__ne__(), nzmath.poly.array.ArrayPoly.__ne__(), nzmath.real.RealField.__ne__(), nzmath.ring.Ideal.__ne__(), and nzmath.prime.FactoredInteger.__ne__().
def nzmath.matrix.MatrixRing.__hash__ | ( | self | ) |
Reimplemented from nzmath.ring.Ring.
Definition at line 1612 of file matrix.py.
References nzmath.matrix.MatrixRing.scalars, and nzmath.matrix.MatrixRing.size.
def nzmath.matrix.MatrixRing.__repr__ | ( | self | ) |
Definition at line 1615 of file matrix.py.
References nzmath.matrix.MatrixRing.scalars, and nzmath.matrix.MatrixRing.size.
def nzmath.matrix.MatrixRing.__str__ | ( | self | ) |
Definition at line 1618 of file matrix.py.
References nzmath.matrix.MatrixRing.scalars, and nzmath.matrix.MatrixRing.size.
|
private |
getter for one (unit matrix)
Definition at line 1641 of file matrix.py.
References nzmath.imaginary.ComplexField._one, nzmath.algfield.NumberField._one, nzmath.intresidue.IntegerResidueClassRing._one, nzmath.finitefield.FinitePrimeField._one, nzmath.finitefield.ExtendedField._one, and nzmath.matrix.MatrixRing._one.
|
private |
Return zero matrix.
Definition at line 1657 of file matrix.py.
References nzmath.imaginary.ComplexField._zero, nzmath.intresidue.IntegerResidueClassRing._zero, nzmath.algfield.NumberField._zero, nzmath.finitefield.FinitePrimeField._zero, nzmath.finitefield.ExtendedField._zero, and nzmath.matrix.MatrixRing._zero.
def nzmath.matrix.MatrixRing.createElement | ( | self, | |
compo | |||
) |
Return a newly created matrix from 'compo'. 'compo' must be a list of n*n components in the scalar ring, where n = self.size.
Reimplemented from nzmath.ring.Ring.
Definition at line 1667 of file matrix.py.
References nzmath.matrix.createMatrix(), nzmath.matrix.MatrixRing.scalars, and nzmath.matrix.MatrixRing.size.
Referenced by nzmath.finitefield.FiniteField.random_element(), and nzmath.finitefield.FiniteField.TonelliShanks().
def nzmath.matrix.MatrixRing.getCharacteristic | ( | self | ) |
Return the characteristic of the ring.
Reimplemented from nzmath.ring.Ring.
Definition at line 1676 of file matrix.py.
References nzmath.matrix.MatrixRing.scalars.
def nzmath.matrix.MatrixRing.getCommonSuperring | ( | self, | |
other | |||
) |
Return common super ring of self and another ring.
Reimplemented from nzmath.ring.Ring.
Definition at line 1703 of file matrix.py.
References nzmath.matrix.MatrixRing.scalars, and nzmath.matrix.MatrixRing.size.
def nzmath.matrix.MatrixRing.getInstance | ( | cls, | |
size, | |||
scalars | |||
) |
Return the cached instance of the specified matrix ring. If the specified ring is not cached, it is created, cached and returned. The method is a class method.
Definition at line 1622 of file matrix.py.
References nzmath.finitefield.FinitePrimeField._instances, nzmath.intresidue.IntegerResidueClassRing._instances, and nzmath.matrix.MatrixRing._instances.
def nzmath.matrix.MatrixRing.issubring | ( | self, | |
other | |||
) |
Report whether another ring contains the ring as a subring.
Reimplemented from nzmath.ring.Ring.
Definition at line 1682 of file matrix.py.
References nzmath.matrix.MatrixRing.scalars, and nzmath.matrix.MatrixRing.size.
Referenced by nzmath.ring.Ring.getCommonSuperring(), nzmath.rational.RationalField.getCommonSuperring(), and nzmath.rational.IntegerRing.getCommonSuperring().
def nzmath.matrix.MatrixRing.issuperring | ( | self, | |
other | |||
) |
Report whether the ring is a superring of another ring.
Reimplemented from nzmath.ring.Ring.
Definition at line 1692 of file matrix.py.
References nzmath.matrix.MatrixRing.scalars, and nzmath.matrix.MatrixRing.size.
Referenced by nzmath.ring.Ring.getCommonSuperring(), nzmath.poly.ring.PolynomialRing.getCommonSuperring(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables.getCommonSuperring(), nzmath.poly.ring.RationalFunctionField.getCommonSuperring(), nzmath.rational.RationalField.getCommonSuperring(), nzmath.rational.IntegerRing.getCommonSuperring(), nzmath.real.RealField.issubring(), and nzmath.poly.ring.RationalFunctionField.issuperring().
def nzmath.matrix.MatrixRing.unitMatrix | ( | self | ) |
Return the unit matrix.
Definition at line 1635 of file matrix.py.
References nzmath.imaginary.ComplexField.one, nzmath.intresidue.IntegerResidueClassRing.one, nzmath.algfield.NumberField.one, nzmath.finitefield.FinitePrimeField.one, nzmath.finitefield.ExtendedField.one, and nzmath.matrix.MatrixRing.one.
def nzmath.matrix.MatrixRing.zeroMatrix | ( | self | ) |
Return the zero matrix.
Definition at line 1651 of file matrix.py.
References nzmath.imaginary.ComplexField.zero, nzmath.intresidue.IntegerResidueClassRing.zero, nzmath.algfield.NumberField.zero, nzmath.finitefield.FinitePrimeField.zero, nzmath.finitefield.ExtendedField.zero, and nzmath.matrix.MatrixRing.zero.
|
private |
Definition at line 1608 of file matrix.py.
Referenced by nzmath.imaginary.Complex.__add__(), nzmath.vector.Vector.__add__(), nzmath.real.Real.__add__(), nzmath.poly.multivar.TermIndices.__add__(), nzmath.intresidue.IntegerResidueClass.__add__(), nzmath.module.Module.__add__(), nzmath.ring.QuotientFieldElement.__add__(), nzmath.ring.Ideal.__add__(), nzmath.ring.ResidueClass.__add__(), nzmath.poly.multivar.BasicPolynomial.__call__(), nzmath.imaginary.Complex.__div__(), nzmath.intresidue.IntegerResidueClass.__div__(), nzmath.quad.ReducedQuadraticForm.__eq__(), nzmath.real.RealField.__eq__(), nzmath.poly.multivar.TermIndices.__hash__(), nzmath.poly.ring.PolynomialRing.__hash__(), nzmath.rational.Rational.__hash__(), nzmath.poly.multivar.BasicPolynomial.__hash__(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables.__hash__(), nzmath.poly.multiutil.OrderProvider.__init__(), nzmath.poly.termorder.TermOrderInterface.__init__(), nzmath.poly.uniutil.OrderProvider.__init__(), nzmath.poly.uniutil.DivisionProvider.__init__(), nzmath.poly.multiutil.RingElementProvider.__init__(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.__init__(), nzmath.poly.uniutil.VariableProvider.__init__(), nzmath.poly.uniutil.RingElementProvider.__init__(), nzmath.vector.Vector.__mod__(), nzmath.quad.ReducedQuadraticForm.__mul__(), nzmath.intresidue.IntegerResidueClass.__mul__(), nzmath.vector.Vector.__mul__(), nzmath.imaginary.Complex.__mul__(), nzmath.real.Real.__mul__(), nzmath.factor.misc.FactoredInteger.__mul__(), nzmath.poly.multivar.TermIndices.__mul__(), nzmath.ring.QuotientFieldElement.__mul__(), nzmath.ring.Ideal.__mul__(), nzmath.ring.ResidueClass.__mul__(), nzmath.prime.FactoredInteger.__mul__(), nzmath.rational.Integer.__mul__(), nzmath.vector.Vector.__neg__(), nzmath.intresidue.IntegerResidueClass.__neg__(), nzmath.imaginary.Complex.__neg__(), nzmath.ring.QuotientFieldElement.__neg__(), nzmath.imaginary.Complex.__pos__(), nzmath.intresidue.IntegerResidueClass.__pos__(), nzmath.ring.ResidueClass.__pos__(), nzmath.quad.ReducedQuadraticForm.__pow__(), nzmath.factor.misc.FactoredInteger.__pow__(), nzmath.permute.Permute.__pow__(), nzmath.imaginary.Complex.__pow__(), nzmath.intresidue.IntegerResidueClass.__pow__(), nzmath.ring.QuotientFieldElement.__pow__(), nzmath.finitefield.ExtendedFieldElement.__pow__(), nzmath.prime.FactoredInteger.__pow__(), nzmath.real.Real.__radd__(), nzmath.imaginary.Complex.__rdiv__(), nzmath.intresidue.IntegerResidueClass.__rdiv__(), nzmath.algfield.NumberField.__repr__(), nzmath.poly.ratfunc.RationalFunction.__repr__(), nzmath.poly.ring.PolynomialRing.__repr__(), nzmath.real.RealField.__repr__(), nzmath.imaginary.ComplexField.__repr__(), nzmath.finitefield.FinitePrimeField.__repr__(), nzmath.module.Module.__repr__(), nzmath.poly.ring.PolynomialIdeal.__repr__(), nzmath.rational.Rational.__repr__(), nzmath.poly.multiutil.RingPolynomial.__repr__(), nzmath.poly.univar.BasicPolynomial.__repr__(), nzmath.poly.formalsum.DictFormalSum.__repr__(), nzmath.algfield.BasicAlgNumber.__repr__(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables.__repr__(), nzmath.poly.ring.RationalFunctionField.__repr__(), nzmath.poly.formalsum.ListFormalSum.__repr__(), nzmath.finitefield.ExtendedFieldElement.__repr__(), nzmath.poly.multiutil.PolynomialIdeal.__repr__(), nzmath.algfield.MatAlgNumber.__repr__(), nzmath.finitefield.ExtendedField.__repr__(), nzmath.module.Ideal_with_generator.__repr__(), nzmath.poly.uniutil.RingPolynomial.__repr__(), nzmath.vector.Vector.__rmul__(), nzmath.real.Real.__rmul__(), nzmath.rational.Integer.__rmul__(), nzmath.imaginary.Complex.__rsub__(), nzmath.real.Real.__rsub__(), nzmath.intresidue.IntegerResidueClass.__rsub__(), nzmath.ring.QuotientFieldElement.__rsub__(), nzmath.real.Real.__rtruediv__(), nzmath.ring.QuotientFieldElement.__rtruediv__(), nzmath.vector.Vector.__sub__(), nzmath.imaginary.Complex.__sub__(), nzmath.real.Real.__sub__(), nzmath.poly.multivar.TermIndices.__sub__(), nzmath.intresidue.IntegerResidueClass.__sub__(), nzmath.ring.QuotientFieldElement.__sub__(), nzmath.ring.ResidueClass.__sub__(), nzmath.quad.ReducedQuadraticForm.__truediv__(), nzmath.vector.Vector.__truediv__(), nzmath.real.Real.__truediv__(), nzmath.ring.QuotientFieldElement.__truediv__(), nzmath.module.Module._module_mul(), nzmath.finitefield.ExtendedFieldElement._op(), nzmath.module.Module._rational_mul(), nzmath.module.Module._scalar_mul(), nzmath.module.Module.change_base_module(), nzmath.poly.multivar.BasicPolynomial.combine_similar_terms(), nzmath.imaginary.Complex.conjugate(), nzmath.poly.univar.PolynomialInterface.construct_with_default(), nzmath.poly.formalsum.DictFormalSum.construct_with_default(), nzmath.poly.multivar.BasicPolynomial.construct_with_default(), nzmath.poly.formalsum.ListFormalSum.construct_with_default(), nzmath.vector.Vector.copy(), nzmath.factor.misc.FactoredInteger.copy(), nzmath.imaginary.Complex.copy(), nzmath.module.Module.copy(), nzmath.prime.FactoredInteger.copy(), nzmath.module.Ideal_with_generator.copy(), nzmath.poly.multivar.BasicPolynomial.erase_variable(), nzmath.poly.multiutil.PseudoDivisionProvider.exact_division(), nzmath.poly.multivar.TermIndices.gcd(), nzmath.poly.ring.PolynomialRing.getCommonSuperring(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables.getCommonSuperring(), nzmath.module.Module.intersect(), nzmath.quad.ReducedQuadraticForm.inverse(), nzmath.imaginary.Complex.inverse(), nzmath.intresidue.IntegerResidueClass.inverse(), nzmath.ring.QuotientFieldElement.inverse(), nzmath.finitefield.ExtendedFieldElement.inverse(), nzmath.module.Module.issubmodule(), nzmath.module.Module.issupermodule(), nzmath.poly.multivar.TermIndices.lcm(), nzmath.poly.termorder.TermOrderInterface.leading_coefficient(), nzmath.poly.termorder.TermOrderInterface.leading_term(), nzmath.prime.TestPrime.next(), nzmath.poly.multivar.TermIndices.pop(), nzmath.poly.univar.BasicPolynomial.square(), and nzmath.poly.multiutil.NestProvider.unnest().
|
staticprivate |
Definition at line 1591 of file matrix.py.
Referenced by nzmath.poly.ring.PolynomialRing.getInstance(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables.getInstance(), nzmath.poly.ring.RationalFunctionField.getInstance(), and nzmath.matrix.MatrixRing.getInstance().
|
private |
Definition at line 1646 of file matrix.py.
Referenced by nzmath.poly.ring.PolynomialRing._get_one(), nzmath.poly.ring.RationalFunctionField._get_one(), nzmath.real.RealField._getOne(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables._getOne(), nzmath.ring.ResidueClassRing._getOne(), nzmath.rational.RationalField._getOne(), nzmath.rational.IntegerRing._getOne(), and nzmath.matrix.MatrixRing._getOne().
|
private |
Definition at line 1662 of file matrix.py.
Referenced by nzmath.poly.ring.PolynomialRing._get_zero(), nzmath.poly.ring.RationalFunctionField._get_zero(), nzmath.real.RealField._getZero(), nzmath.poly.multiutil.PolynomialRingAnonymousVariables._getZero(), nzmath.ring.ResidueClassRing._getZero(), nzmath.rational.RationalField._getZero(), nzmath.rational.IntegerRing._getZero(), and nzmath.matrix.MatrixRing._getZero().
nzmath.matrix.MatrixRing.scalars |
Definition at line 1602 of file matrix.py.
Referenced by nzmath.matrix.MatrixRing.__hash__(), nzmath.matrix.MatrixRing.__repr__(), nzmath.matrix.MatrixRing.__str__(), nzmath.matrix.MatrixRing.createElement(), nzmath.matrix.MatrixRing.getCharacteristic(), nzmath.matrix.MatrixRing.getCommonSuperring(), nzmath.matrix.MatrixRing.issubring(), and nzmath.matrix.MatrixRing.issuperring().
nzmath.matrix.MatrixRing.size |
Definition at line 1601 of file matrix.py.
Referenced by nzmath.prime.Zeta.__add__(), nzmath.prime.Zeta.__eq__(), nzmath.prime.Zeta.__getitem__(), nzmath.prime.Zeta.__hash__(), nzmath.matrix.MatrixRing.__hash__(), nzmath.prime.Zeta.__len__(), nzmath.prime.Zeta.__lshift__(), nzmath.prime.Zeta.__mod__(), nzmath.prime.Zeta.__mul__(), nzmath.prime.Zeta.__pos__(), nzmath.prime.Zeta.__pow__(), nzmath.matrix.MatrixRing.__repr__(), nzmath.prime.Zeta.__setitem__(), nzmath.matrix.MatrixRing.__str__(), nzmath.prime.Zeta._pow_mod(), nzmath.matrix.MatrixRing.createElement(), nzmath.matrix.MatrixRing.getCommonSuperring(), nzmath.matrix.MatrixRing.issubring(), nzmath.matrix.MatrixRing.issuperring(), and nzmath.prime.Zeta.promote().
|
static |
Definition at line 1649 of file matrix.py.
Referenced by nzmath.ring.Field.gcd(), nzmath.finitefield.FiniteField.Legendre(), nzmath.finitefield.FiniteField.order(), nzmath.finitefield.FiniteField.sqrt(), nzmath.finitefield.FiniteField.TonelliShanks(), and nzmath.matrix.MatrixRing.unitMatrix().
|
static |
Definition at line 1665 of file matrix.py.
Referenced by nzmath.ring.Field.gcd(), and nzmath.matrix.MatrixRing.zeroMatrix().