API

PiecewiseLinearFunctions.PiecewiseLinearFunctionType
struct PiecewiseLinearFunction{T<:AbstractFloat}

Fields

  • x::Vector{T} where T<:AbstractFloat: x coordinates of the breakpoints

  • y::Vector{T} where T<:AbstractFloat: y coordinates of the breakpoints

  • left_slope::AbstractFloat: slope of the function to the left of the first breakpoint

  • right_slope::AbstractFloat: slope of the function to the right of the last breakpoint

source
PiecewiseLinearFunctions.composeMethod
compose(
    f::PiecewiseLinearFunction{T},
    g::PiecewiseLinearFunction{T};
    postprocess_breakpoints
) -> PiecewiseLinearFunction

Compute the composition f ∘ g of two piecewise linear functions. By default, the function removes redundant breakpoints in the output as a post processing step.

This method can also be called using Base.∘

source
PiecewiseLinearFunctions.convex_meetMethod
convex_meet(
    f::PiecewiseLinearFunction{T},
    g::PiecewiseLinearFunction{T}
) -> PiecewiseLinearFunction

Compute the convex meet of two piecewise linear functions, i.e. the tightest convex lower bound.

source