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

A step function is a piecewise constant function. It is represented by a vector $x$, a real $y_0$ and $y$ as follows:

$f(t) = \begin{cases} y_0 & \text{if } t < x_{1} \\ y_{i} & \text{if } x_i \leq t < x_{i+1} \\ y_{\text{end}} & \text{if } t \geq x_{\text{end}} \end{cases}$

The values of $x$ and $y$ are saved in vectors xs and ys, respectively. We must have length(xs) == length(ys). Furthermore, xs must be a sorted vector of sorted reals.

source
StepFunctions.StepFunctionMethod
StepFunction(xs::Vector,ys::Vector)

Create the step function StepFunction(xs,ys[1],ys[2:end]) where xs is a vector of the step locations and ys is a vector of the step values. Here, length(xs)+1 must be equal to length(ys).

source
StepFunctions.lines_dataMethod
lines_data(f::StepFunction, a::Real, b::Real)

Returns series $xs$ and $ys$ that can be used to plot the step function f over the interval [a,b].

source