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

Public Member Functions

def __init__ (self, coefficients, **kwds)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def __pow__ (self, index)
 
def ring_mul (self, other)
 
def scalar_mul (self, scale)
 
def term_mul (self, term)
 
def square (self)
 
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 __getitem__ (self, base)
 
def __contains__ (self, base)
 
def __len__ (self)
 
def __ne__ (self, other)
 
def __nonzero__ (self)
 
def __add__ (self, other)
 
def __sub__ (self, other)
 
def __neg__ (self)
 
def __pos__ (self)
 
def __mul__ (self, other)
 
def __rmul__ (self, other)
 
def iterterms (self)
 
def itercoefficients (self)
 
def iterbases (self)
 
def terms (self)
 
def coefficients (self)
 
def bases (self)
 
def coefficients_map (self, func)
 
def bases_map (self, func)
 

Public Attributes

 number_of_variables
 

Detailed Description

Base class for all univariate polynomials.

Definition at line 15 of file univar.py.

Constructor & Destructor Documentation

◆ __init__()

def nzmath.poly.univar.PolynomialInterface.__init__ (   self,
  coefficients,
**  kwds 
)
For any descendants of PolynomialInterface, `coefficients'
have to be given.  Other arguments, if necessary, should be
passed as keyword arguments.  Note that in this __init__
method, no actual initialization happens.

Reimplemented in nzmath.poly.univar.BasicPolynomial.

Definition at line 19 of file univar.py.

Member Function Documentation

◆ __eq__()

◆ __hash__()

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

◆ __pow__()

def nzmath.poly.univar.PolynomialInterface.__pow__ (   self,
  index 
)
self ** index

Reimplemented in nzmath.poly.univar.SortedPolynomial, and nzmath.poly.univar.BasicPolynomial.

Definition at line 46 of file univar.py.

◆ construct_with_default()

def nzmath.poly.univar.PolynomialInterface.construct_with_default (   self,
  terms 
)
Create a new univariate polynomial of the same class with
self, with given only the terms and use copy of self's data if
necessary.

Reimplemented from nzmath.poly.formalsum.FormalSumContainerInterface.

Definition at line 139 of file univar.py.

References nzmath.matrix.Matrix.__class__, nzmath.matrix.RingMatrix.__class__, nzmath.matrix.RingSquareMatrix.__class__, nzmath.matrix.FieldMatrix.__class__, nzmath.matrix.MatrixRing.__class__, nzmath.matrix.Subspace.__class__, nzmath.poly.univar.BasicPolynomial._init_kwds, nzmath.poly.multivar.BasicPolynomial._init_kwds, and nzmath.poly.univar.SortedPolynomial._init_kwds.

Referenced by nzmath.poly.uniutil.DivisionProvider.__divmod__(), nzmath.poly.uniutil.DivisionProvider.__floordiv__(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.__pow__(), nzmath.poly.uniutil.DivisionProvider._populate_reduced(), nzmath.poly.uniutil.DivisionProvider.mod(), nzmath.poly.uniutil.DivisionProvider.mod_pow(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_divmod(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_floordiv(), nzmath.poly.uniutil.PseudoDivisionProvider.monic_mod(), nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_divmod(), nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_floordiv(), nzmath.poly.uniutil.PseudoDivisionProvider.pseudo_mod(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.pthroot(), nzmath.poly.uniutil.KaratsubaProvider.ring_mul_karatsuba(), nzmath.poly.uniutil.OrderProvider.shift_degree_to(), nzmath.poly.uniutil.OrderProvider.split_at(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.split_same_degrees(), and nzmath.poly.uniutil.KaratsubaProvider.square_karatsuba().

◆ differentiate()

def nzmath.poly.univar.PolynomialInterface.differentiate (   self)

◆ downshift_degree()

def nzmath.poly.univar.PolynomialInterface.downshift_degree (   self,
  slide 
)
Return the polynomial obtained by shifting downward all terms
with degrees of 'slide'.

Be careful that if the least degree term has the degree less
than 'slide' then the result is not mathematically a
polynomial.  Even in such a case, the method does not raise an
exception.

f.downshift_degree(slide) is equivalent to
f.upshift_degree(-slide).

Definition at line 112 of file univar.py.

References nzmath.poly.formalsum.FormalSumContainerInterface.bases_map().

Referenced by nzmath.poly.univar.SortedPolynomial.ring_mul_karatsuba(), nzmath.poly.uniutil.KaratsubaProvider.ring_mul_karatsuba(), and nzmath.poly.uniutil.KaratsubaProvider.square_karatsuba().

◆ ring_mul()

def nzmath.poly.univar.PolynomialInterface.ring_mul (   self,
  other 
)

◆ scalar_mul()

◆ square()

◆ term_mul()

def nzmath.poly.univar.PolynomialInterface.term_mul (   self,
  term 
)
Return the result of multiplication with the given term.
The term can be given as a tuple (degree, coeff) or as a
Polynomial instance.

Definition at line 72 of file univar.py.

References nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default().

Referenced by nzmath.poly.univar.SortedPolynomial.ring_mul_karatsuba(), and nzmath.poly.uniutil.KaratsubaProvider.ring_mul_karatsuba().

◆ terms_map()

def nzmath.poly.univar.PolynomialInterface.terms_map (   self,
  func 
)
Create a new formal sum container by applying func to each
term.  func must be a function taking 2 arguments.

Reimplemented from nzmath.poly.formalsum.FormalSumContainerInterface.

Definition at line 127 of file univar.py.

References nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default().

◆ upshift_degree()

def nzmath.poly.univar.PolynomialInterface.upshift_degree (   self,
  slide 
)
Return the polynomial obtained by shifting upward all terms
with degrees of 'slide'.

f.upshift_degree(slide) is equivalent to
f.term_mul((slide, 1)).

Definition at line 102 of file univar.py.

References nzmath.poly.formalsum.FormalSumContainerInterface.bases_map().

Referenced by nzmath.poly.univar.SortedPolynomial.ring_mul_karatsuba(), and nzmath.poly.uniutil.OrderProvider.shift_degree_to().

Member Data Documentation

◆ number_of_variables

nzmath.poly.univar.PolynomialInterface.number_of_variables

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