constant_pwc¶

Graph.constant_pwc(constant, duration, batch_dimension_count=0, *, name=None)

Creates a piecewise-constant function of time that is constant over a specified duration.

Parameters
• constant (number or np.ndarray or Tensor) – The value $$c$$ of the function on the constant segment. To create a batch of $$B_1 \times \ldots \times B_n$$ piecewise-constant functions of shape $$D_1 \times \ldots \times D_m$$, provide this constant parameter as an object of shape $$B_1\times\ldots\times B_n\times D_1\times\ldots\times D_m$$.

• duration (float) – The duration $$\tau$$ for the resulting piecewise-constant function.

• batch_dimension_count (int, optional) – The number of batch dimensions, $$n$$ in constant. If provided, the first $$n$$ dimensions of constant are considered batch dimensions. Defaults to 0, which corresponds to no batch.

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

Returns

The constant function $$f(t) = c$$ (for $$0\leq t\leq\tau$$) (or a batch of constant functions, if you provide batch_dimension_count).

Return type

Pwc

constant_pwc_operator()
constant_stf()
pwc()