in reply to using Algorithm::Diff for floats
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...
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using Algorithm::Diff for floats
by jim_neophyte (Sexton) on Jul 27, 2004 at 19:42 UTC |