2008/11/18 Michael Kay <mike(_at_)saxonica(_dot_)com>:
for $d in distinct-values($seq) return $d[count($seq[. eq $d]) ge $i]
equivalent? I think it is, and probably a lot more
efficient, although it is longer.
They are both O(n^2).
Only in the worst case though isn't it, which is a list of unique
values? It's as good as (bad as) distinct-values() plus a bit :)
Whereas:
$vSeq[index-of($vSeq,.)[$i]]
...would be O(n^2) for both best and worst cases - right?
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--