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

Public Member Functions

def __iter__ (self)
 
def __getitem__ (self, base)
 
def __contains__ (self, base)
 
def __len__ (self)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def __ne__ (self, other)
 
def __nonzero__ (self)
 
def __hash__ (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 terms_map (self, func)
 
def coefficients_map (self, func)
 
def bases_map (self, func)
 
def construct_with_default (self, maindata)
 

Detailed Description

Interface of formal sum container.
Do not instantiate.

Definition at line 39 of file formalsum.py.

Member Function Documentation

◆ __add__()

◆ __contains__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__contains__ (   self,
  base 
)
base in self

membership test.

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

Definition at line 58 of file formalsum.py.

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

◆ __eq__()

◆ __getitem__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__getitem__ (   self,
  base 
)
Return the coefficient of specified base.
If there is no term of the base, return 0.

Reimplemented in nzmath.poly.multivar.BasicPolynomial, nzmath.poly.uniutil.RingPolynomial, nzmath.poly.univar.SortedPolynomial, nzmath.poly.univar.BasicPolynomial, nzmath.poly.formalsum.ListFormalSum, and nzmath.poly.formalsum.DictFormalSum.

Definition at line 51 of file formalsum.py.

◆ __hash__() [1/2]

◆ __hash__() [2/2]

◆ __iter__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__iter__ (   self)
Return the iterator.
It is an alias of iterterms.

Definition at line 44 of file formalsum.py.

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

◆ __len__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__len__ (   self)

◆ __mul__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__mul__ (   self,
  other 
)

◆ __ne__()

◆ __neg__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__neg__ (   self)

◆ __nonzero__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__nonzero__ (   self)
Return True, if self has some nonzero coefficients.
False, otherwise.

Definition at line 102 of file formalsum.py.

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

◆ __pos__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__pos__ (   self)

◆ __rmul__()

def nzmath.poly.formalsum.FormalSumContainerInterface.__rmul__ (   self,
  other 
)
other * self

This method is invoked only when type of other does not
support multiplication with FormalSumContainerInterface

Reimplemented in nzmath.poly.univar.SortedPolynomial, nzmath.poly.formalsum.ListFormalSum, nzmath.poly.formalsum.DictFormalSum, nzmath.poly.multivar.BasicPolynomial, and nzmath.poly.univar.BasicPolynomial.

Definition at line 165 of file formalsum.py.

◆ __sub__()

◆ bases()

def nzmath.poly.formalsum.FormalSumContainerInterface.bases (   self)

◆ bases_map()

def nzmath.poly.formalsum.FormalSumContainerInterface.bases_map (   self,
  func 
)
Create a new formal sum container by applying func to each
base.

Definition at line 229 of file formalsum.py.

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

Referenced by nzmath.poly.univar.PolynomialInterface.downshift_degree(), and nzmath.poly.univar.PolynomialInterface.upshift_degree().

◆ coefficients()

def nzmath.poly.formalsum.FormalSumContainerInterface.coefficients (   self)
Return a list of all coefficients.

Definition at line 198 of file formalsum.py.

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

◆ coefficients_map()

◆ construct_with_default()

def nzmath.poly.formalsum.FormalSumContainerInterface.construct_with_default (   self,
  maindata 
)
Create a new formal sum container of the same class with self,
with given only the maindata and use copy of self's data if
necessary.

Reimplemented in nzmath.poly.univar.PolynomialInterface, nzmath.poly.formalsum.ListFormalSum, nzmath.poly.multivar.BasicPolynomial, and nzmath.poly.formalsum.DictFormalSum.

Definition at line 236 of file formalsum.py.

Referenced by nzmath.poly.formalsum.FormalSumContainerInterface.__add__(), nzmath.poly.univar.BasicPolynomial.__add__(), nzmath.poly.univar.SortedPolynomial.__add__(), nzmath.poly.uniutil.DivisionProvider.__divmod__(), nzmath.poly.uniutil.DivisionProvider.__floordiv__(), nzmath.poly.multivar.PolynomialInterface.__neg__(), nzmath.poly.univar.BasicPolynomial.__neg__(), nzmath.poly.formalsum.DictFormalSum.__neg__(), nzmath.poly.univar.SortedPolynomial.__neg__(), nzmath.poly.formalsum.ListFormalSum.__neg__(), nzmath.poly.multivar.PolynomialInterface.__pos__(), nzmath.poly.univar.BasicPolynomial.__pos__(), nzmath.poly.formalsum.DictFormalSum.__pos__(), nzmath.poly.univar.SortedPolynomial.__pos__(), nzmath.poly.formalsum.ListFormalSum.__pos__(), nzmath.poly.univar.BasicPolynomial.__pow__(), nzmath.poly.multivar.BasicPolynomial.__pow__(), nzmath.poly.univar.SortedPolynomial.__pow__(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.__pow__(), nzmath.poly.formalsum.FormalSumContainerInterface.__sub__(), nzmath.poly.univar.BasicPolynomial.__sub__(), nzmath.poly.univar.SortedPolynomial.__sub__(), nzmath.poly.uniutil.DivisionProvider._populate_reduced(), nzmath.poly.multivar.BasicPolynomial.combine_similar_terms(), nzmath.poly.univar.PolynomialInterface.differentiate(), 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.multivar.BasicPolynomial.partial_differentiate(), 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.univar.PolynomialInterface.ring_mul(), nzmath.poly.multivar.BasicPolynomial.ring_mul(), nzmath.poly.uniutil.FinitePrimeFieldPolynomial.ring_mul(), nzmath.poly.univar.SortedPolynomial.ring_mul_karatsuba(), nzmath.poly.uniutil.KaratsubaProvider.ring_mul_karatsuba(), nzmath.poly.univar.PolynomialInterface.scalar_mul(), nzmath.poly.multivar.BasicPolynomial.scalar_mul(), nzmath.poly.univar.SortedPolynomial.scalar_mul(), nzmath.poly.uniutil.OrderProvider.shift_degree_to(), nzmath.poly.uniutil.OrderProvider.split_at(), nzmath.poly.uniutil.PrimeCharacteristicFunctionsProvider.split_same_degrees(), nzmath.poly.univar.BasicPolynomial.square(), nzmath.poly.multivar.BasicPolynomial.square(), nzmath.poly.univar.SortedPolynomial.square(), nzmath.poly.uniutil.FinitePrimeFieldPolynomial.square(), nzmath.poly.uniutil.KaratsubaProvider.square_karatsuba(), nzmath.poly.univar.PolynomialInterface.term_mul(), nzmath.poly.multivar.BasicPolynomial.term_mul(), nzmath.poly.univar.PolynomialInterface.terms_map(), and nzmath.poly.formalsum.FormalSumContainerInterface.terms_map().

◆ iterbases()

◆ itercoefficients()

◆ iterterms()

◆ terms()

def nzmath.poly.formalsum.FormalSumContainerInterface.terms (   self)
Return a list of terms as (base, coefficient) pairs.

Definition at line 192 of file formalsum.py.

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

Referenced by nzmath.poly.uniutil.RingPolynomial.__repr__(), and nzmath.poly.univar.BasicPolynomial.square().

◆ terms_map()

def nzmath.poly.formalsum.FormalSumContainerInterface.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 in nzmath.poly.univar.PolynomialInterface.

Definition at line 210 of file formalsum.py.

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

Referenced by nzmath.poly.formalsum.FormalSumContainerInterface.bases_map(), and nzmath.poly.formalsum.FormalSumContainerInterface.coefficients_map().


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