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

Reply via email to