InfluxBase is the base class for the Influx family. It passes on incoming values under the same name, (puts them into outValDict - maybe remove this step?), and spreads them as they are to multiple destinations by means of the named actions in its action, a MFunc.
InfluxMix can accept influences from multiple sources and decides on param values based on the influences. Different sources can have different trust values, which will determine the strength of their influence.
InfluxSpread can distribute incoming values to multiple destinations, with optional rescaling, and optional mapping to other parameter names.
Influx can entangle or disentangle inValues to outValues by means of a matrix of weights which determine how strongly a given input param will affect a given output param.
First example:
make a new InfluxBase.
inNames |
input names to use. if inNames is a, number, e.g. 4, inNames will be from the list x, y, z, w, v, u, etc. |
outNames |
output names to use. In InfluxBase, this is usally the same as inNames, subclasses differ. |
inValDict |
an optional dict of input values. |
the input names
the output names
the dict of input values
the dict of output values
a FuncChain, where actions can be put that run when new output values are calculated. This is used for attaching e.g. Ndefs to be played with Influx.
shape is the shape of the weights, [inNames.size, outNames.size] smallDim is the smaller of the two, bigDim the greater.
pretty-post values
set input values of Influx
... keyValPairs |
key1, val1, ... keyN, valN |
calculate new output values and do the action.
perform the action(s), e.g. after a set call.
add a function to action by name
remove a function from action by name
add an anonymous function to action
remove an anonymous function from action
attach an object - typically a JITLib proxy - and set its params from the Influx outputs.
object |
the object |
funcName |
a name to use in the FuncChain |
paramNames |
paramNames to set - if none given, gets them from the object. |
specs |
specs to use for mapping. If none given, those stored in the object's Halo are used. |
remove an object from action by name