boost::array and lower_bound
26 Mar
2009
26 Mar
'09
9:29 a.m.
Hello, 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 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,
5657
Age (days ago)
5657
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hicham Mouline