piecewiselin function

Piecewise linear transformation for distance matrices