segment_cptga function

Segment a time series using a genetic algorithm