algorithm - Data range filters in C++ -


i want allow user able define ranges filter data. ranges defined contiguous, on lapping, or separated (e.g. user enters following ranges: 1-10, 5-10, 10-12, 7-13, , 15-20).

i want filter data user displayed within ranges.

i create code on different layer combine ranges appropriate (so above example become 1-13 , 15-20, don't want data service concerned that, must able handle example above)

i have lot of data , speed priority, don't want have iterate through list of ranges each data item check if should displayed user or not.

is there data structure (or algorithm) used achieve this?

you can use boost's filter_iterator achieve this.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -