Accessing appropriate array of double arrays in order of last created.
Posted
by Zach
on Stack Overflow
See other posts from Stack Overflow
or by Zach
Published on 2010-06-07T17:14:10Z
Indexed on
2010/06/07
17:42 UTC
Read the original article
Hit count: 210
I have an array of double arrays, they are within a specified time window (8am-5pm), and are in order of last created over a period of several days. They are all timestamped and as such I have access to all C# DateTime methods.
I then have a different iterative function that goes in the same order of the array of double arrays, however it isn't within a specified time window, it's 24/7. I want to access from this iterative function, the appropriate double array from the one within the window.
Let's say that it's 4:30PM on DayOfYear 52, I'd like to access the last double array less than or equal to 4:30PM on DayOfYear 52. I'd expect the same double array if the time were 12:30AM on DayOfYear 53. However, if it were 9:00 AM of DayOfYear 53, well then I'd expect it to return something from the DayOfYear 53, less than or equal to 9:00AM. I think you get the idea.
So I'm a having a bit of trouble grokking how to do this. Is anyone willing to offer a starting point or how they'd approach it?
Edit: It is not a literal double[][], it is exactly as Anthony Pegram says:
Dictionary<DateTime, double[]>
© Stack Overflow or respective owner