Linear-Time Convexity Test for Low-Order Piecewise Polynomials

Published: 2021, Last Modified: 27 Nov 2025SIAM J. Optim. 2021EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Given a piecewise-defined function, checking whether it is convex is a nontrivial task. While it may be easy to check whether the restriction of the function to each piece is convex, ensuring the entire function is convex seems to require global conditions. However, it is known that one only needs to ensure the (convex) subdifferential is nonempty on the boundary of the pieces thereby obtaining more local conditions. We specialize the results to quadratic and cubic piecewise defined functions and provide linear-time algorithms to check their convexity. We also provide a MATLAB implementation using an edge-list data structure and discuss two applications: checking the structure of piecewise quadratic functions and optimization problems involving convexity constraints.
Loading