StepFunctions

Documentation for StepFunctions.

StepFunctions.StepFunctionType
struct StepFunction{X<:Real,Y}

A step function is a piecewise constant function. It is represented by vectors xs and ys as follows: $f(t) = \begin{cases} ys[i+1] & \text{if } xs[i] \leq t < xs[i+1] \\ ys[1] & \text{if } t < xs[1] \\ ys[end] & \text{if } t \geq xs[end] \end{cases}$

In particular, we must have length(xs)+1 == length(ys). Furthermore, xs must be sorted and must not contain Inf.

source