obj::calc::Exponented Class Reference

Exponented objects: Operations (Sums&Products), Items, Quotients. More...

Inheritance diagram for obj::calc::Exponented:
obj::calc::Calculable obj::Printable obj::calc::Item obj::calc::Operation obj::calc::Quotient obj::calc::SquareRoot obj::calc::Product obj::calc::Sum obj::calc::Fraction obj::calc::Expandable obj::calc::Monomial obj::calc::Polynomial obj::calc::BinomialIdentity

List of all members.

Public Member Functions

def __mul__
 Synonym to times().
def __add__
 Synonym to plus().
def get_sign
 Returns the sign or the sign of the first element of the object.
def get_minus_signs_nb
 Returns the number of minus signs in the object.
def set_exponent
 Set the value of the exponent.
def set_sign
 Set the sign of the Exponented object.
def set_opposite_sign
 Changes the sign of the Exponented object.
def multiply_symbol_is_required
 True if the usual writing rules require a × between two factors.
def requires_brackets
 True if the argument requires brackets in a product For instance, a Sum with several terms or a negative Item.
def requires_inner_brackets
 True if the argument requires inner brackets The reason for requiring them is having an exponent different from 1 and several terms or factors (in the case of Products & Sums).
def exponent_must_be_displayed
 True if the exponent isn't equivalent to a single 1.
def contains_exactly
 True if the object contains exactly the given objct It can be used to detect objects embedded in a Sum or a Product that contain only one term (or factor).
def contains_a_rounded_number
 To check if this contains a rounded number.
def calculate_next_step
 Returns the next Exponented object during a numeric calculation.
def expand_and_reduce_next_step
 Returns the next step of expansion/reduction of the Sum So, either the Sum of its expanded/reduced terms, or the Sum itself reduced, or None.

Detailed Description

Exponented objects: Operations (Sums&Products), Items, Quotients.

.. Any Exponented must have a exponent field and should reimplement the methods that are not already defined hereafter

Definition at line 787 of file __init__.py.


Member Function Documentation

def obj::calc::Exponented::contains_a_rounded_number (   self  ) 

To check if this contains a rounded number.

..

Returns:
True or False

Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Operation, and obj::calc::Quotient.

Definition at line 966 of file __init__.py.

def obj::calc::Exponented::contains_exactly (   self,
  objct 
)

True if the object contains exactly the given objct It can be used to detect objects embedded in a Sum or a Product that contain only one term (or factor).

Parameters:
objct The object to search for
Returns:
True if the object contains exactly the given objct

Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Operation, and obj::calc::Quotient.

Definition at line 954 of file __init__.py.

def obj::calc::Exponented::expand_and_reduce_next_step (   self,
  options 
)

Returns the next step of expansion/reduction of the Sum So, either the Sum of its expanded/reduced terms, or the Sum itself reduced, or None.

Returns:
Exponented

Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, obj::calc::Fraction, obj::calc::Expandable, and obj::calc::BinomialIdentity.

Definition at line 990 of file __init__.py.

def obj::calc::Exponented::exponent_must_be_displayed (   self  ) 

True if the exponent isn't equivalent to a single 1.

Returns:
True if the exponent is not equivalent to a single 1

Definition at line 937 of file __init__.py.

def obj::calc::Exponented::multiply_symbol_is_required (   self,
  objct,
  position 
)

True if the usual writing rules require a × between two factors.

Parameters:
objct The other one
position The position (integer) of self in the Product
Returns:
True if the writing rules require × between self & obj

Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, and obj::calc::Quotient.

Definition at line 898 of file __init__.py.

def obj::calc::Exponented::requires_brackets (   self,
  position 
)

True if the argument requires brackets in a product For instance, a Sum with several terms or a negative Item.

Parameters:
position The position of the object in the Product
Returns:
True if the object requires brackets in a Product

Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, and obj::calc::Quotient.

Definition at line 912 of file __init__.py.

def obj::calc::Exponented::requires_inner_brackets (   self  ) 

True if the argument requires inner brackets The reason for requiring them is having an exponent different from 1 and several terms or factors (in the case of Products & Sums).

Returns:
True if the object requires inner brackets

Reimplemented in obj::calc::Item, obj::calc::SquareRoot, obj::calc::Product, obj::calc::Sum, and obj::calc::Quotient.

Definition at line 925 of file __init__.py.

def obj::calc::Exponented::set_exponent (   self,
  arg 
)

Set the value of the exponent.

Parameters:
arg Calculable|Number|String
Warning:
Relays an exception if arg is not of the types described

Reimplemented in obj::calc::Product.

Definition at line 836 of file __init__.py.

def obj::calc::Exponented::set_opposite_sign (   self  ) 

Changes the sign of the Exponented object.

Parameters:
arg String being '+' or '-' or number being +1 or -1
Warning:
Relays an exception if arg is not of the types described

Definition at line 875 of file __init__.py.

def obj::calc::Exponented::set_sign (   self,
  arg 
)

Set the sign of the Exponented object.

Parameters:
arg String being '+' or '-' or number being +1 or -1
Warning:
Relays an exception if arg is not of the types described

Reimplemented in obj::calc::Operation, and obj::calc::Monomial.

Definition at line 851 of file __init__.py.


The documentation for this class was generated from the following file:
Generated on Fri Dec 30 19:26:37 2011 for mathmaker by  doxygen 1.6.3