| |
- BinFuncOps
-
- BinBinCompose
- BinFuncBinder
- BinUnCompose
- BinVar1
- BinVar2
- UnBinCompose
- FuncOps
-
- BinCompose
- Bind1st
- Bind2nd
- FuncBinder
- Identity
- UnCompose
- UnConstant
class BinBinCompose(BinFuncOps) |
|
# compose two binary functions together, using a third binary function
# to make the composition: h(f(x,y), g(x,y)) |
|
Methods defined here:
- __call__(self, arg1, arg2)
- __init__(self, a_h, a_f, a_g)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from BinFuncOps:
- __add__(self, f)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- accumulate(self, a, axis=0)
- compose(self, f, g)
- # returns self(f(x), g(x)), a unary function
- compose2(self, f, g)
- # returns self(f(x), g(y)), a binary function
- compose_by(self, f)
- # returns f(self(x,y)), a binary function
- outer(self, a, b)
- reduce(self, a, axis=0)
|
class BinCompose(FuncOps) |
|
|
|
Methods defined here:
- __call__(self, arg)
- __init__(self, a_binop, a_f, a_g)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from FuncOps:
- __add__(self, f)
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
|
class BinFuncBinder(BinFuncOps) |
|
# bind a binary function |
|
Methods defined here:
- __call__(self, arg1, arg2)
- __init__(self, a_f)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from BinFuncOps:
- __add__(self, f)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- accumulate(self, a, axis=0)
- compose(self, f, g)
- # returns self(f(x), g(x)), a unary function
- compose2(self, f, g)
- # returns self(f(x), g(y)), a binary function
- compose_by(self, f)
- # returns f(self(x,y)), a binary function
- outer(self, a, b)
- reduce(self, a, axis=0)
|
class BinFuncOps |
|
|
|
Methods defined here:
- __add__(self, f)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- accumulate(self, a, axis=0)
- compose(self, f, g)
- # returns self(f(x), g(x)), a unary function
- compose2(self, f, g)
- # returns self(f(x), g(y)), a binary function
- compose_by(self, f)
- # returns f(self(x,y)), a binary function
- outer(self, a, b)
- reduce(self, a, axis=0)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class BinUnCompose(BinFuncOps) |
|
# compose a two unary functions with a binary function to get a binary
# function: f(g(x), h(y)) |
|
Methods defined here:
- __call__(self, arg1, arg2)
- __init__(self, a_f, a_g, a_h)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from BinFuncOps:
- __add__(self, f)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- accumulate(self, a, axis=0)
- compose(self, f, g)
- # returns self(f(x), g(x)), a unary function
- compose2(self, f, g)
- # returns self(f(x), g(y)), a binary function
- compose_by(self, f)
- # returns f(self(x,y)), a binary function
- outer(self, a, b)
- reduce(self, a, axis=0)
|
class BinVar1(BinFuncOps) |
|
# bind single variables |
|
Methods defined here:
- __call__(self, arg1, arg2)
- __init__(self)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from BinFuncOps:
- __add__(self, f)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- accumulate(self, a, axis=0)
- compose(self, f, g)
- # returns self(f(x), g(x)), a unary function
- compose2(self, f, g)
- # returns self(f(x), g(y)), a binary function
- compose_by(self, f)
- # returns f(self(x,y)), a binary function
- outer(self, a, b)
- reduce(self, a, axis=0)
|
class BinVar2(BinFuncOps) |
|
|
|
Methods defined here:
- __call__(self, arg1, arg2)
- __init__(self)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from BinFuncOps:
- __add__(self, f)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- accumulate(self, a, axis=0)
- compose(self, f, g)
- # returns self(f(x), g(x)), a unary function
- compose2(self, f, g)
- # returns self(f(x), g(y)), a binary function
- compose_by(self, f)
- # returns f(self(x,y)), a binary function
- outer(self, a, b)
- reduce(self, a, axis=0)
|
class Bind1st(FuncOps) |
|
# bind individual variables within a binary function |
|
Methods defined here:
- __call__(self, x)
- __init__(self, a_f, an_arg1)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from FuncOps:
- __add__(self, f)
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
|
class Bind2nd(FuncOps) |
|
|
|
Methods defined here:
- __call__(self, x)
- __init__(self, a_f, an_arg2)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from FuncOps:
- __add__(self, f)
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
|
class FuncBinder(FuncOps) |
|
# Bind a normal function
# Should check if the argument is a function. |
|
Methods defined here:
- __init__(self, a_f)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from FuncOps:
- __add__(self, f)
- __call__(self, arg)
- Default call routine, used for ordinary functions.
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
|
class FuncOps |
|
Common mix-in operations for function objects.
Normal function classes are assumed to implement a call routine,
which will be chained to in the __call__ method. |
|
Methods defined here:
- __add__(self, f)
- __call__(self, arg)
- Default call routine, used for ordinary functions.
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
Data and non-method functions defined here:
- __doc__ = '\n Common mix-in operations for function objec...h will be chained to in the __call__ method.\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class Identity(FuncOps) |
|
# just return the argument: f(x) = x
# This is used to build up more complex expressions. |
|
Methods defined here:
- __call__(self, arg)
- __init__(self)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from FuncOps:
- __add__(self, f)
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
|
class UnBinCompose(BinFuncOps) |
|
|
|
Methods defined here:
- __call__(self, arg1, arg2)
- __init__(self, a_f, a_g)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from BinFuncOps:
- __add__(self, f)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- accumulate(self, a, axis=0)
- compose(self, f, g)
- # returns self(f(x), g(x)), a unary function
- compose2(self, f, g)
- # returns self(f(x), g(y)), a binary function
- compose_by(self, f)
- # returns f(self(x,y)), a binary function
- outer(self, a, b)
- reduce(self, a, axis=0)
|
class UnCompose(FuncOps) |
|
# compose two unary functions |
|
Methods defined here:
- __call__(self, arg)
- __init__(self, a_f, a_g)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from FuncOps:
- __add__(self, f)
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
|
class UnConstant(FuncOps) |
|
# wrap a constant in a Function class |
|
Methods defined here:
- __call__(self, x)
- __init__(self, x)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'func'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
Methods inherited from FuncOps:
- __add__(self, f)
- __coerce__(self, x)
- __div__(self, f)
- __mul__(self, f)
- __neg__(self)
- __pow__(self, f)
- __sub__(self, f)
- compose(self, f)
- exp(self)
- log(self)
| |