Goulib.piecewise module¶
piecewise-defined functions
-
class
Goulib.piecewise.Piecewise(init=[], default=0, period=(-inf, inf))[source]¶ Bases:
Goulib.expr.Exprpiecewise function defined by a sorted list of (startx, Expr)
-
__init__(init=[], default=0, period=(-inf, inf))[source]¶ Parameters: f – function or operator, Expr to copy construct, or formula string
-
insort(x, v=None)[source]¶ insert a point (or returns it if it already exists) note : method name follows bisect.insort convention
-
__iter__()[source]¶ iterators through discontinuities. take the opportunity to delete redundant tuples
-
__add__(right)¶
-
__and__(right)¶
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dir__()¶ Default dir() implementation.
-
__div__(right)¶
-
__eq__(other)¶ Return self==value.
-
__float__()¶
-
__format__()¶ Default object formatter.
-
__ge__(other)¶ Return self>=value.
-
__getattribute__¶ Return getattr(self, name).
-
__gt__(other)¶ Return self>value.
-
__hash__= None¶
-
__init_subclass__()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__invert__()¶
-
__le__(other)¶ Return self<=value.
-
__lt__(other)¶ Return self<value.
-
__mul__(right)¶
-
__ne__(other)¶ Return self!=value.
-
__neg__()¶
-
__new__()¶ Create and return a new object. See help(type) for accurate signature.
-
__or__(right)¶
-
__pow__(right)¶
-
__reduce__()¶ Helper for pickle.
-
__reduce_ex__()¶ Helper for pickle.
-
__rmul__(right)¶
-
__setattr__¶ Implement setattr(self, name, value).
-
__sizeof__()¶ Size of object in memory, in bytes.
-
__sub__(right)¶
-
__truediv__(right)¶
-
__xor__(right)¶
-
complexity()¶ measures the complexity of Expr :return: int, sum of the precedence of used ops
-
html(**kwargs)¶
-
isNum¶
-
isconstant¶ Returns: True if Expr evaluates to a constant number or bool
-
plot(**kwargs)¶ renders on IPython Notebook (alias to make usage more straightforward)
-
png(**kwargs)¶
-
render(fmt='svg', **kwargs)¶
-
save(filename, **kwargs)¶
-
svg(**kwargs)¶
-