Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Do you really need iterators for this, or do you only care about the most recent value? Also, could the three readings be kept in separate data structures? Commented Jun 19, 2015 at 18:22
  • @Snowman Thanks for your comment. Yes I really care about subintervals of data, let's say from 4 seconds ago until 2 seconds ago. I don't like to keep them in separate structures because then all the operations I have to do on the buffer will have to be done for each structure. Furthermore, I think it's an interesting question from a theory standpoint Commented Jun 19, 2015 at 18:32
  • given this is for a buffer, am I also correct in assuming it must be thread-safe? Commented Jun 19, 2015 at 18:35
  • @ Snowman For now thread-safety is not needed Commented Jun 19, 2015 at 18:43
  • The custom iterator solution seems reasonable to me Commented Jun 22, 2015 at 1:59