Added piecewise linear functions that interpolate between a number of key/value pairs, and some concrete implementations.