in reply to Serializing a large object
To store the data in a more compact form, it's necessary to understand the data so you can look for more compact representations of the information it represents. And for now, that isn't clear (to me).
I set up a small set of input ranges--of both the normal--$start <= $end type; and the inverted $end < $start type; and then tried to make sense of the numbers returned by num_ranges_containing(). And I cannot.
I input these ranges:
my @ranges = ( [ 0, 5 ], [ 1, 6 ], [ 2, 7 ], [ 3, 8 ], [ 4, 9 ], [ 5, 10 ], [ 5, 0 ], [ 6, 1 ], [ 7, 2 ], [ 8, 3 ], [ 9, 4 ], [ 10, 5 ], );
And then asked for the counts containing the ranges: [0,3], [1,4], ...., [7,10], and as the returns didn't add up, I did a simple plot:
c:\test>861961 ------ 0.. 5 ------ 1.. 6 ------ 2.. 7 ------ 3.. 8 ------ 4.. 9 ------ 5..10 ----- 5.. 0 - ---- 6.. 1 -- --- 7.. 2 --- -- 8.. 3 ---- - 9.. 4 ----- 10.. 5 ---- 0.. 3 range: 0 .. 3 is contained by 1 ranges ---- 1.. 4 range: 1 .. 4 is contained by 4 ranges ---- 2.. 5 range: 2 .. 5 is contained by 4 ranges ---- 3.. 6 range: 3 .. 6 is contained by 3 ranges ---- 4.. 7 range: 4 .. 7 is contained by 3 ranges ---- 5.. 8 range: 5 .. 8 is contained by 3 ranges ---- 6.. 9 range: 6 .. 9 is contained by 2 ranges ---- 7..10 range: 7 .. 10 is contained by 1 range +s
Looking at just a couple:
- [0,3] returns 1;
But to my eyes, it appears to be contained by at least: the first, and last two input ranges?
- [1,4] returns 4;
But only appears to be contained by the first two, and last input ranges?
How am I misinterpreting the data?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Serializing a large object
by daverave (Scribe) on Sep 25, 2010 at 19:11 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2010 at 19:43 UTC | |
by daverave (Scribe) on Sep 25, 2010 at 20:04 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2010 at 20:14 UTC | |
by daverave (Scribe) on Sep 25, 2010 at 21:47 UTC | |
|