W3C home > Mailing lists > Public > www-voice@w3.org > July to September 2014

Re: algorithm clean-up

From: Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de>
Date: Wed, 2 Jul 2014 17:47:21 +0000
To: Jim Barnett <1jhbarnett@gmail.com>
CC: "www-voice@w3.org (www-voice@w3.org)" <www-voice@w3.org>
Message-ID: <52F0FAD0-F3CB-4215-AF09-459269FA94F5@tk.informatik.tu-darmstadt.de>
On Jul 2, 2014, at 16:40, Jim Barnett <1jhbarnett@gmail.com> wrote:

> I've been looking at the algorithm and wonder about the use of OrderedSet. I don't think that we rely on the ordering anywhere, and in any case the implied ordering is hard to understand.  The set is ordered by the order in which elements are added to it, so you have to thread through the whole algorithm to figure out the ordering. It might be simpler to:
> 1.  Replace OrderedSet with Set (i.e. unordered)
> 2.  Add an explicit sort every place the ordering matters.

We are using a NodeSet anyway and call to_document_order() as needed, so we basically already do what you propose and support this.
  Stefan

> 
> Any opinions on this?  Since the algorithm is now only informative, we can feel freer to change it, since we don't have to go back to Last Call every time we modify it.
> -- 
> Jim Barnett
> Genesys
> 
> P.S.  The real simplification would be to get rid of Set and use List everywhere, but I don't think we can.  For example, SelectTransitions can add the same transition multiple times (if multiple descendant states select the same transition in an ancestor state).  By putting the selected transitions in a Set, we don't have to add a bunch of fussy code removing duplicates.
> 
Received on Wednesday, 2 July 2014 17:47:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:45 UTC