exactalg function

Segment data into exact change points