mathmaker  0.4(alpha)
Public Member Functions | Properties
core.base_calculus.Polynomial Class Reference

A Polynomial is a Sum of Monomials, not necessarily reduced or ordered. More...

Inheritance diagram for core.base_calculus.Polynomial:
core.base_calculus.Sum core.base_calculus.CommutativeOperation core.base_calculus.Operation core.root_calculus.Exponented core.root_calculus.Signed core.root_calculus.Calculable core.root_calculus.Evaluable core.base.Printable core.base.NamedObject core.base.Clonable

List of all members.

Public Member Functions

def __init__
 Constructor.
def get_max_degree
 Gets the maximal degree value that can be found in thePolynomial.
def get_degree
 Gets the real Polynomial's degree.
def dbg_str
 Raw display of the Polynomial (debugging method)

Properties

 degree = property(get_degree, doc = 'Real degree of the Polynomial')

Detailed Description

A Polynomial is a Sum of Monomials, not necessarily reduced or ordered.

Definition at line 7844 of file base_calculus.py.


Constructor & Destructor Documentation

def core.base_calculus.Polynomial.__init__ (   self,
  arg 
)

Constructor.

Warning:
Might raise an UncompatibleType exception.
Parameters:
argDEFAULT|[Monomial|Polynomial]|Sum(...)|(RANDOMLY, ...) Possible arguments are :
  • DEFAULT : Will create a default Monomial embedded in a Polynomial
  • [Monomial|Polynomial] or Sum(Monomial|Polynomial) : They'll get turned into one Polynomial
  • (RANDOMLY, max_coeff, max_degree, [length|tuple(RANDOMLY, max_length)]) : The coefficients and degrees of the Polynomial will be created randomly. Limits are given by : CONSTANT_TERMS_MAXIMUM_RATIO and CONSTANT_TERMS_MINIMUM_NUMBER. The length can either be given or be let generated randomly. If the argument isn't of the kinds listed above, an exception will be raised.
Returns:
One instance of Polynomial

Reimplemented from core.base_calculus.Sum.

Definition at line 7871 of file base_calculus.py.

References core.base_calculus.Sum._force_inner_brackets_display, core.base_calculus.Polynomial._force_inner_brackets_display, core.base_calculus.Operation._neutral, core.base_calculus.Product._neutral, core.base_calculus.Sum._neutral, core.base_calculus.Monomial._neutral, core.base_calculus.Polynomial._neutral, core.base_calculus.CommutativeOperation.append(), core.base.Clonable.clone(), core.base_calculus.Item.dbg_str(), core.base_calculus.SquareRoot.dbg_str(), core.base_calculus.Quotient.dbg_str(), core.base_calculus.Fraction.dbg_str(), core.base_calculus.CommutativeOperation.dbg_str(), core.base_calculus.Monomial.dbg_str(), core.base_calculus.Polynomial.dbg_str(), and core.base_calculus.CommutativeOperation.info.

Referenced by core.calculus.Equation.__init__(), and core.root_calculus.Value.substitute().


Member Function Documentation

def core.base_calculus.Polynomial.dbg_str (   self,
  options 
)

Gets the real Polynomial's degree.

Returns:
The real Polynomial's degree

Definition at line 8032 of file base_calculus.py.

References core.base_calculus.Polynomial.get_max_degree(), and core.base_calculus.Sum.term.

Gets the maximal degree value that can be found in thePolynomial.

Returns:
The maximal degree value that can be found in the Polynomial

Definition at line 8015 of file base_calculus.py.

References core.base_calculus.Sum.term.

Referenced by core.base_calculus.Polynomial.get_degree().


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