I may be missing something, but I think this depends on which of X1, X2 and
X3 are "the correct value". If X2 is the quote correct unquote answer and X1
and X3 are the result of using slightly different computations to arrive at
it, then the application is going to want to see X1, X2 and X3 all end up in
the same bucket when the transactions are sorted. If X1 is correct then
maybe X3 should be left out if it is not tolerantly equal.

I think this means that arriving at the "desired" result requires
information which a general "tolerant grade up" cannot have (which of X1, X2
and X3 are "closest to the right result").

I suspect that the real application data does not have this problem, because
the calculation errors that occur are all comfortably within the tolerances.

-----Original Message-----
From: Raul Miller [mailto:[EMAIL PROTECTED] 
Sent: 6. juni 2007 20:01
To: General forum
Subject: Re: [Jgeneral] Re: Challenge to expert J'ers

On 6/6/07, Morten Kromberg <[EMAIL PROTECTED]> wrote:
> Yes, I can see at least one problem: If X1, X2 and X3 are in the list, the
> tolerant equality might have X1=X2 and X2=X3, but X1~:X3. In which case,
the
> "specification is problematic".
>
> But does this not also mean that - in theory, if not in practice with
Paul's
> data - Oleg's solution (and just about any other solution you can think
of)
> will suffer from "the same problem"?

No, because if X1~:X3 then the index of X1 is not a candidate value
for the position X3 in i.~X (and vice versa)

Put differently: sort X, then for each element of X, find the set of
(adjacent)
values equal to that element and use the lowest original index for the
members of that set.  Also, if the next element was in the previous
element's set of equivalences, its equivalences must overlap that previous
set (perhaps starting and/or ending at a later position).

I can see this as being annoying to implement efficiently (I don't see how
to make these mechanics relate to something generic), but not impossible.
On the other hand, I do see cases where this can be useful (certain kinds
of noise elimination, perhaps -- for example, I would use i.~ if I were
matching "touching" vertices in a CAD system).

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to