Package sympycore :: Package basealgebra :: Module ring :: Class CommutativeRing
[hide private]
[frames] | no frames]

Class CommutativeRing

source code


Base class to commutative rings.

Derived classes may redefine the following methods:

Symbol(cls, obj)
Number(cls, obj)
Add(cls, *seq)
Mul(cls, *seq),
Pow(cls, base, exponent)
Terms(cls, *seq)
Factors(cls, *seq)
as_Add_args(self)
as_Mul_args(self)
as_Pow_args(self),
as_Terms_args(self)
as_Factors_args(self)


Instance Methods [hide private]
 
__add__(self, other) source code
 
__div__(self, other) source code
 
__mul__(self, other) source code
 
__neg__(self) source code
 
__pos__(self) source code
 
__pow__(self, other) source code
 
__radd__(self, other) source code
call graph 
 
__rdiv__(self, other) source code
 
__rmul__(self, other) source code
 
__rpow__(self, other) source code
call graph 
 
__rsub__(self, other) source code
 
__rtruediv__(self, other) source code
 
__sub__(self, other) source code
call graph 
 
__truediv__(self, other) source code
 
_matches(pattern, expr, repl_dict, wild_info) source code
call graph 
 
as_Add_args(self)
Return a sequence such that Add(*self.as_Add_args()) == self
source code
 
as_Factors_args(self)
Return a sequence such that Factors(*self.as_Factors_args()) == self
source code
 
as_Log_args(self)
Return a 2-tuple such that Log(*self.as_Log_args()) == self
source code
 
as_Mul_args(self)
Return a sequence such that Mul(*self.as_Mul_args()) == self
source code
 
as_Pow_args(self)
Return a 2-tuple such that Pow(*self.as_Pow_args()) == self
source code
 
as_Terms_args(self)
Return a sequence such that Terms(*self.as_Terms_args()) == self
source code

Inherited from algebra.Algebra: __nonzero__, __repr__, __str__, as_algebra, as_tree, as_verbatim, has, match, matches, subs

Inherited from algebra.Algebra (private): _subs

Inherited from expr.Expr: __eq__, __ge__, __gt__, __hash__, __init__, __le__, __lt__, __ne__, __reduce__, as_lowlevel

Inherited from expr.Expr (private): _sethash

Inherited from object: __delattr__, __getattribute__, __new__, __reduce_ex__, __setattr__

Class Methods [hide private]
 
Add(cls, *seq)
Compute sum over seq containing algebra elements.
source code
 
Div(cls, *seq)
Compute seq[0] / Mul(*seq[0]).
source code
call graph 
 
Factors(cls, *seq)
Compute product over seq containing pairs (element, exponent).
source code
 
Log(cls, arg, base=None)
Compute logarithm of arg in base.
source code
 
Mul(cls, *seq)
Compute product over seq containing algebra elements.
source code
 
Pow(cls, base, exponent)
Compute power from base and exponent.
source code
 
Sub(cls, *seq)
Compute seq[0] - Add(*seq[0]).
source code
call graph 
 
Terms(cls, *seq)
Compute sum over seq containing pairs (element, coefficient).
source code

Inherited from algebra.Algebra: Number, Symbol, convert, convert_coefficient, convert_exponent, disable_symbolic_comparison, enable_symbolic_comparison, get_predefined_symbols

Inherited from algebra.Algebra (private): _matches_seq

Class Variables [hide private]
  _symbols = None

Inherited from algebra.Algebra: coefftypes, exptypes

Inherited from algebra.Algebra (private): _str_value

Properties [hide private]

Inherited from algebra.Algebra: args, func, symbols

Inherited from expr.Expr: data, head, is_writable, pair

Inherited from expr.Expr (private): _hash

Inherited from object: __class__

Method Details [hide private]

Factors(cls, *seq)
Class Method

source code 

Compute product over seq containing pairs (element, exponent).

element-s must belong to algebra, exponent-s must belong to the exponent algebra.

Log(cls, arg, base=None)
Class Method

source code 

Compute logarithm of arg in base.

Argument arg must be an element of exponent algebra and base is an element of an algebra.

Pow(cls, base, exponent)
Class Method

source code 

Compute power from base and exponent.

Argument base must be an algebra element and exponent must be an element of exponent algebra.

Terms(cls, *seq)
Class Method

source code 

Compute sum over seq containing pairs (element, coefficient).

element-s must belong to algebra, coefficient-s must belong to the coefficient algebra.

_matches(pattern, expr, repl_dict, wild_info)

source code 
call graph 
Overrides: algebra.Algebra._matches