Subject: Re: [boost] Fastest Data-structure maybe from STL or Boost ..!!
From: Sylvain Bougerel (sylvain.bougerel.devel_at_[hidden])
Date: 2013-10-14 23:22:11
On Wed, Oct 9, 2013 at 6:29 PM, Sergey Cheban <s.cheban_at_[hidden]> wrote:
> Also, once this data structure is completely filled I want to delete the
>> first data and replace it with the new data.
> It's seems you need 2-dimensional sorting, one dimension for data, one for
time. I have a library that is written for this kind of real-time analysis
in multi-dimension, it has k-d tree containers that are self re-balancing,
with insertion in fractional amortized time. You can check it out here:
I've been wanting to propose it for review on boost, but never got around
to do it, cause I believe the documentation is sub-par.
Your data set being small, 1000 (items), with a simple unsorted
std::deque<> and using the std::nth_element() functor, may actually be
faster. You need to try it.