[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Set Any and SXHASH

From: Martin Rubey
Subject: Re: [Axiom-developer] Set Any and SXHASH
Date: 06 Apr 2007 20:33:05 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Dear Bill, Waldek, *

Waldek Hebisch <address@hidden> writes:

> I would say that sorting elements of Set is a design bug.

I disagree - but in fact, I believe that the statement above is due to

"Set" uses the order of the underlying domain *if* the latter is an OrderedSet,
i.e., if it is totally ordered.  In my opinion, this is a very reasonable

If the underlying domain is not an OrderedSet, for example "ANY", then "Set"
will use slower algorithms, which do not depend on an ordering.

I think that this is very much in line with the philosophy of axiom. Note that
most domains have OrderedSet.

I think it is a mistake to pretend that a domain is ordered, using tricks like
hashing, within "Set".  If you really need fast set-operations for such a
domain, make it an OrderedSet.  However, I do not believe that making ANY an
OrderedSet is wise.  If your elements happen to be of type ANY and you need
fast Set operations for them, I'd suggest that you look for a better domain.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]