Hi monks,

I have a problem with a data integrity check on a potentially huge data structure.

Let me try to explain,
I have an AoH like that:

%AoH =( { Identifier1 => Anumber, IdNumber1 => 1100001, Identifier2 => Bnumber, IdNumber2 => 1000000, Identifier3 => Cnumber, IdNumber3 => 2222222 } [... More ...] );

Each element can have 1, 2 or 3 different identifiers, out of about a total of 10 (Jnumber).
I have to make a consistency check to see if every distinct identifier set (that can be incomplete) is coherent with the rest.

For example, this is wrong: (Abrev. sintax)

Anumber = 1, BNumber = 2, Cnumber = 3 Anumber = 1, BNumber = 4, Cnumber = 3 #Bnumber is different

This is wrong too:

Anumber = 1, BNumber = 2, Cnumber = 3 Cnumber = 3, DNumber = 4, Enumber = 5 Enumber = 5, Anumber = 2, <undef> # harder to found # Anumber changes

I've tried some approachs, different hashes for each identifier type referencing the rest of the data, but all of them end being a huge unreadable code, taking a lot of memory and resources (I can have more than 100k elements in this array, and keeps growing)

Is there any "easy" way to do it that I'm missing?

Thanks in advance,
deibyz


In reply to Complex data structure check by deibyz

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.