Re: [Boost-users] boost::array and lower_bound

I just didn't the see the std::lower_bound version with the comparator. That does what I want, Regards.
-----Original Message----- From: Hicham Mouline [mailto:hicham@mouline.org] Sent: 26 March 2009 9:30 To: 'boost-users@lists.boost.org' Subject: boost::array and lower_bound
Hello, I maintain a boost::array< pair< time, value > > B, sorted by time, where I defined operator< for pair
I wish to get a given entry from the array for a given time y.
If y matches any entry, value is returned, if y is between 2 entries, an interpolated value is returned.
std::lower_bound( &B[0], &B[supSize], ... ) //this doesn't work
I suppose for this I need to define some other related iterator to pass to lower_bound, not boost::array< pair< time, value > >::const_iterator.
I suppose this is what "Iterator adaptors" are about ? I have seen the term "views" as well, is this related?
Regards,
participants (1)
-
Hicham Mouline