Open cgurps opened 4 years ago
Hi,
no, libcds containers don't provide functions like upper_bound
/lower_bound
, only exact match is supported. In concurrent environment these functions don't make sense. For example, I found upper bound for some key but other concurrent thread inserts another key that match better for upper bound.
Thanks for clarification! In my case I don't really care about the best match, I just need one but your comments makes sense!
Good morning,
this is not an issue but more a question about the library usage. Let's say I have a struct like this:
I'm using the
LazyList
as a container for that struct. The ordering for that list isstd::greater<A>
(which uses theoperator>
of the list). Is is possible to use a function that returns an element of the list that is inferior or equal to some input node (likeupper_bound
does in the standard library)?In other word, is there a container in
libcds
that can achieve that?