mardi 10 octobre 2017

Which boost library should i use to add the intervals as mentioned in the description?

I am working on intervals in a c++ program. I want something like below :

I want to add intervals iteratively in a for loop. Assume my first interval is (0, 5). I want to add an interval (3,6) such that the resulting interval set should be (0,3), (3,6). If my third interval added is (4,7), my resulting interval set should be (0,3), (3,4), (4,7). Any idea what type of interval container should i use from boost library ? Any sample programs ? Thanks

Aucun commentaire:

Enregistrer un commentaire