Code for Piecewise Linear Interval Function (PLIF) data structures and algorithms