Goulib.piecewise module¶
piecewise-defined functions
-
class
Goulib.piecewise.
Piecewise
(init=[], default=0, start=-inf)[source]¶ Bases:
Goulib.expr.Expr
piecewise function defined by a sorted list of (startx, Expr)
-
__iter__
()[source]¶ iterators through discontinuities. take the opportunity to delete redundant tuples
-
append
(item)[source]¶ appends a (x,y) item. In fact inserts it at correct position and returns the corresponding index
-
__add__
(right)¶
-
__and__
(right)¶
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__div__
(right)¶
-
__eq__
(other)¶
-
__float__
()¶
-
__format__
()¶ default object formatter
-
__ge__
(other)¶
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
(other)¶
-
__hash__
= None¶
-
__invert__
()¶
-
__le__
(other)¶
-
__lt__
(other)¶
-
__mul__
(right)¶
-
__ne__
(other)¶
-
__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
-
__repr__
()¶
-
__rmul__
(right)¶
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ 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
-
latex
()¶ Returns: string LaTex formula
-
plot
(**kwargs)¶ renders on IPython Notebook (alias to make usage more straightforward)
-
png
(**kwargs)¶
-
render
(fmt='svg', **kwargs)¶
-
save
(filename, **kwargs)¶
-
svg
(**kwargs)¶
-