Boost logo

Boost Users :

Subject: [Boost-users] boost::array and lower_bound
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-03-26 05:29:55

I maintain a boost::array< pair< time, value > > B,
sorted by time, where I defined operator< for pair<time, value>

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
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?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at