dictUpdate_#

swordfish.function.dictUpdate_()#

Update a dictionary for specified keys with the specified function.

Parameters:
  • dictionary (Constant) – A dictionary object.

  • function (Constant) – A function object.

  • keys (Constant) – A scalar/vector indicating for which keys to apply the function.

  • parameters (Constant) – Are of the same size as keys. The arguments passed to the applied function are parameters and the initial values of the dictionary.

  • initFunc (Constant, optional) – A unary function. If the update operation involves new keys that did not exist in the dictionary to be updated, execute initFunc for these keys. If initFunc is specified, the values of dictionary must be a tuple.