Linear spline implementation