Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re: Serializing a large object by BrowserUk
in thread Serializing a large object by daverave

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (5)
    As of 2014-08-30 21:29 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (294 votes), past polls