8.1.1.44. shrink_dsp¶
- Dispatcher.shrink_dsp(inputs=None, outputs=None, inputs_dist=None, wildcard=True)[source]
Returns a reduced dispatcher.
- Parameters:
outputs (list[str], iterable, optional) – Ending data nodes.
inputs_dist (dict[str, int | float], optional) – Initial distances of input data nodes.
wildcard (bool, int, optional) – If True, when the data node is used as input and target in the ArciDispatch algorithm, the input value will be used as input for the connected functions, but not as output. If it is equal to 2, the the data node that cannot be calculated are excluded by the wildcard condition.
- Returns:
A sub-dispatcher.
- Return type:
See also
——————————————————————–
Example:
A dispatcher like this:
Get the sub-dispatcher induced by dispatching with no calls from inputs a, b, and c to outputs c, e, and f:
>>> shrink_dsp = dsp.shrink_dsp(inputs=['a', 'b', 'd'], ... outputs=['c', 'f'])