Number of interval Intersections for a large number of intervals
- To: mathgroup at smc.vnet.net
- Subject: [mg81679] Number of interval Intersections for a large number of intervals
- From: P_ter <peter_van_summeren at yahoo.co.uk>
- Date: Mon, 1 Oct 2007 04:50:26 -0400 (EDT)
Hello, I have as example on the interval [0.0,12000.0] thousands of smaller intervals which overlap. I construct for each interval a UnitStep up and one down(a block). I order and sum them and I give it to Reduce with the question Reduce[SumOfAllBlocks[x]==<number>,x]. The result gives me the overlapping intervals which overlap <number>. From the result I take out the length of the overlaps and Tally them. It is safe, but slow. Does anyone know something about this type of problems? With better algorithms?