some classes and functions to manipulate piecewise functions defined