On Mon, Apr 1, 2019 at 3:53 PM Devon McCormick <[email protected]> wrote:
> solution as it does not process them sequentially. Also, I'm assuming an
> overlap of endpoints does not count as an overlap (by using "<:" and ">:"
> instead of "<" and ">").
Oh, I assumed that that would count as an overlap.
Thinking about it, though, it would make sense for that to not be an
overlap (since a "week" is an interval and not a specific point in
time, so the week id at the start of a time interval should mark a
different point in time than that same week id marking the end of a
time interval).
But when I coded that up,
overlap=: ({.@[ <: ]) +./"1@:* {:@[ > ]
keeper=: ,^:(4 > +/@overlap) mat
There were never more than two overlapping weeks, so everything was kept...
Trick question here? Or is there a flaw in my thinking and/or implementation?
Thanks,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm