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

Public Member Functions

def __init__ (self, coefficients, **kwds)
 
def __add__ (self, other)
 
def __sub__ (self, other)
 
def __mul__ (self, other)
 
def __rmul__ (self, other)
 
def __neg__ (self)
 
def __pos__ (self)
 
def square (self)
 
def __pow__ (self, index)
 
def __call__ (self, val)
 
def iterterms (self)
 
def itercoefficients (self)
 
def iterbases (self)
 
def __getitem__ (self, degree)
 
def __contains__ (self, degree)
 
def __len__ (self)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def __repr__ (self)
 
- Public Member Functions inherited from nzmath.poly.univar.PolynomialInterface
def ring_mul (self, other)
 
def scalar_mul (self, scale)
 
def term_mul (self, term)
 
def differentiate (self)
 
def upshift_degree (self, slide)
 
def downshift_degree (self, slide)
 
def terms_map (self, func)
 
def construct_with_default (self, terms)
 
- Public Member Functions inherited from nzmath.poly.formalsum.FormalSumContainerInterface
def __iter__ (self)
 
def __ne__ (self, other)
 
def __nonzero__ (self)
 
def terms (self)
 
def coefficients (self)
 
def bases (self)
 
def coefficients_map (self, func)
 
def bases_map (self, func)
 

Private Attributes

 _coefficients
 
 _init_kwds
 

Additional Inherited Members

- Public Attributes inherited from nzmath.poly.univar.PolynomialInterface
 number_of_variables
 

Detailed Description

Basic polynomial data type ignoring a variable name and the ring.

Definition at line 148 of file univar.py.

Constructor & Destructor Documentation

◆ __init__()

def nzmath.poly.univar.BasicPolynomial.__init__ (   self,
  coefficients,
**  kwds 
)
BasicPolynomial(coefficients)

coefficients can be any dict initial values.

Reimplemented from nzmath.poly.univar.PolynomialInterface.

Definition at line 152 of file univar.py.

Member Function Documentation

◆ __add__()

def nzmath.poly.univar.BasicPolynomial.__add__ (   self,
  other 
)

◆ __call__()

def nzmath.poly.univar.BasicPolynomial.__call__ (   self,
  val 
)

◆ __contains__()

def nzmath.poly.univar.BasicPolynomial.__contains__ (   self,
  degree 
)
Return True if there is a term of specified degree.
False otherwise.

Reimplemented from nzmath.poly.formalsum.FormalSumContainerInterface.

Definition at line 332 of file univar.py.

References nzmath.poly.univar.BasicPolynomial._coefficients, and nzmath.poly.multivar.BasicPolynomial._coefficients.

◆ __eq__()

def nzmath.poly.univar.BasicPolynomial.__eq__ (   self,
  other 
)

◆ __getitem__()

def nzmath.poly.univar.BasicPolynomial.__getitem__ (   self,
  degree 
)
Return the coefficient of specified degree.
If there is no term of degree, return 0.

Reimplemented from nzmath.poly.formalsum.FormalSumContainerInterface.

Definition at line 325 of file univar.py.

References nzmath.poly.univar.BasicPolynomial._coefficients, and nzmath.poly.multivar.BasicPolynomial._coefficients.

◆ __hash__()

def nzmath.poly.univar.BasicPolynomial.__hash__ (   self)

Reimplemented from nzmath.poly.univar.PolynomialInterface.

Definition at line 353 of file univar.py.

◆ __len__()

def nzmath.poly.univar.BasicPolynomial.__len__ (   self)
Return the number of data entries.

Reimplemented from nzmath.poly.formalsum.FormalSumContainerInterface.

Definition at line 339 of file univar.py.

References nzmath.poly.univar.BasicPolynomial._coefficients, and nzmath.poly.multivar.BasicPolynomial._coefficients.

◆ __mul__()

◆ __neg__()

def nzmath.poly.univar.BasicPolynomial.__neg__ (   self)

◆ __pos__()

◆ __pow__()

◆ __repr__()

◆ __rmul__()

def nzmath.poly.univar.BasicPolynomial.__rmul__ (   self,
  other 
)
other * self

If type of other does not support multiplication with self
from left, this method is called.  In the context, it is only
posiible that other be a scalar.

Reimplemented from nzmath.poly.formalsum.FormalSumContainerInterface.

Definition at line 201 of file univar.py.

References nzmath.poly.univar.PolynomialInterface.scalar_mul(), nzmath.poly.array.ArrayPoly.scalar_mul(), nzmath.poly.multivar.BasicPolynomial.scalar_mul(), nzmath.poly.array.ArrayPolyMod.scalar_mul(), nzmath.poly.formalsum.DictFormalSum.scalar_mul(), and nzmath.poly.formalsum.ListFormalSum.scalar_mul().

◆ __sub__()

def nzmath.poly.univar.BasicPolynomial.__sub__ (   self,
  other 
)

◆ iterbases()

def nzmath.poly.univar.BasicPolynomial.iterbases (   self)

◆ itercoefficients()

◆ iterterms()

def nzmath.poly.univar.BasicPolynomial.iterterms (   self)
iterator for (degree, coefficient) pairs.
The iterator is equivalent to
  zip(self.iterbases(), self.itercoefficients())

Reimplemented from nzmath.poly.formalsum.FormalSumContainerInterface.

Definition at line 305 of file univar.py.

References nzmath.poly.univar.BasicPolynomial._coefficients, and nzmath.poly.multivar.BasicPolynomial._coefficients.

◆ square()

Member Data Documentation

◆ _coefficients

◆ _init_kwds


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