pwc_sum

Graph.pwc_sum(terms, *, name=None)

Creates the sum of multiple piecewise-constant terms.

Parameters
  • terms (list[Pwc]) – The individual piecewise-constant terms \(\{v_j(t)\}\) to sum. All terms must have the same duration, values of the same shape, and the same batch shape, but may have different segmentations (different numbers of segments of different durations) and different dtypes of segment values.

  • name (str, optional) – The name of the node.

Returns

The piecewise-constant function (or batch of functions) of time \(\sum_j v_j(t)\). Its values have the same shape as the values of each of the terms that you provided. If each of the terms represents a batch of functions, this result represents a batch of functions with the same batch shape. If any term has complex-valued segments, the value of the returned Pwc is complex, otherwise is float.

Return type

Pwc

See also

discretize_stf()

Discretize an Stf into a Pwc.

pwc()

Create piecewise-constant functions.

pwc_operator()

Create Pwc operators.

pwc_signal()

Create Pwc signals from (possibly complex) values.

stf_sum()

Corresponding operation for Stfs.