It would seems that what you want to do is consider elements the same when they are below a certain delta from each other. The trouble with this is that A::D expects the keygen function to be one "that should return a string that uniquely identifies a given element." Thus it only considers a single element at a time which IMO makes meeting your implied requirment difficult. int() wont cut it as itll make 4.1 and 4.0 the same but not 3.9 and 4.0 which would apparently not be useful to you.

Iirc tye is working on an updated A::D so you may be able to convince him that adding a key comparison function is a good idea. However until that happens I suspect id be looking at customizing A::D to support such. If thats beyond you then who knows, a prolific author like BrowserUK may just pop up with a viable patch until tye gets his evil schemes into CPAN play...


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi



In reply to Re: using Algorithm::Diff for floats by demerphq
in thread using Algorithm::Diff for floats by jim_neophyte

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.