| Home | Trees | Indices | Help |
|
|---|
|
|
Represents an element of an algebraic structure.
This class collects implementation specific methods of algebra classes.
For implemented algebras, see:
Verbatim CollectingField
New algebras may need to redefine the following methods:
__new__(cls, ...) convert(cls, obj, typeerror=True) convert_coefficient(cls, obj, typeerror=True) convert_exponent(cls, obj, typeerror=True) as_verbatim(self) as_algebra(self, cls)
and the following properties:
args(self) func(self)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_str_value = None
|
|||
coefftypes =
|
|||
exptypes =
|
|||
|
|||
|
args Returns a sequence such that self.func(*self.args) == self. |
|||
|
func Returns a callable such that self.func(*self.args) == self. |
|||
|
symbols Return a set of atomic subexpressions in a symbolic object. |
|||
|
Inherited from Inherited from |
|||
|
|||
|
|
|
Convert algebra to another algebra. This method uses default conversation via verbatim algebra that might not be the most efficient. For efficiency, algebras should redefine this method to implement direct conversation. |
Convert obj to algebra element. Set typeerror=False when calling from operation methods like __add__, __mul__, etc. |
Pattern matching. Return None when expression (self) does not match with pattern. Otherwise return a dictionary such that pattern.subs_dict(self.match(pattern, *wildcards)) == self Don't redefine this method, redefine matches(..) method instead. |
Substitute a sub-expression with new expression. There are two usage forms: obj.subs(subexpr, newexpr) obj.subs([(subexpr1, newexpr1), (subexpr2, newexpr2), ..]) |
|
|||
argsReturns a sequence such that self.func(*self.args) == self.
|
funcReturns a callable such that self.func(*self.args) == self.
|
symbolsReturn a set of atomic subexpressions in a symbolic object.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Fri Mar 14 14:53:00 2008 | http://epydoc.sourceforge.net |