Reduce memory footprint for piecewise linear interpolation
When creating a piecewise<polynomial>
from a set of discrete points (eg. with https://gitlab.laas.fr/loco-3d/curves/-/blob/master/include/curves/piecewise_curve.h#L271) all the points except the first and last one are stored twice. Once as the final point of one polynomial, and a second time as the initial point of the next polynomial.
Having a specific implementation for this case would allow to cut the memory usage by half, but add a little complexity in the code.