in reply to Re (tilly) 1 (duh): Assemble times into ranges
in thread Assemble times into ranges

More out of curiousity's sake: with this structure, is it possible to determine *which* intervals the events are in (as the original problem seems to ask?). You definitely can determine how many intervals each event falls into via the depth? As per my suggestion, I think you need at least another data structure as you walk the @events array to store which intervals are active.

Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

  • Comment on Re: Re (tilly) 1 (duh): Assemble times into ranges

Replies are listed 'Best First'.
Re (tilly) 3 (duh): Assemble times into ranges
by tilly (Archbishop) on May 06, 2001 at 07:14 UTC
    The depth variable tells you how many events fall in it. If you want to instead know the intervals, you could use a hash there instead. Click for code if you want an example...