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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -