simultaneous multiple key sorting algorithm

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Jan 28 08:29:07 PST 2012


On Sat, Jan 28, 2012 at 08:12:52AM -0600, Andrei Alexandrescu wrote:
> On 1/27/12 11:02 PM, H. S. Teoh wrote:
> >If you treat the attributes as components of an n-dimensional vector,
> >then you could recast the problem as the convex hull of k hypercuboids,
> >where each hypercuboid lies between (0,0,0,...) and (x1,x2,x3,...). The
> >points on the convex hull then are the high-ranking points (points
> >inside the hull are obviously suboptimal). Furthermore, the closest
> >points to the line spanned by the vector (1,1,1,...) are the points that
> >maximize the most number of attributes.
> >
> >If you "peel away" the points on the convex hull, then the convex hull
> >generated by the remaining points gives you the "second class" points.
> >Peel away those, and the convex hull gives you the "third class" points,
> >etc..
> >
> >Granted, this isn't exactly the original problem as stated, but it seems
> >to be closer to what you intend to achieve with your stocks example.
> 
> That's close. Closer is to use simplexes instead of hypercubes. And
> the space is defined by rank, not the original features.
[...]

Actually, the reason I chose hypercubes was because I was hoping that
the convex hull with hypercubes in the original features' space would be
equivalent (or easily massaged to be equivalent) to using simplexes in
rank space.  (Although the part about the (1,1,1,...) vector may not
work out quite that nicely in this case.) Otherwise it doesn't really
give you a good algorithm since you'll have to precompute the ranks.


T

-- 
War doesn't prove who's right, just who's left. -- BSD Games' Fortune


More information about the Digitalmars-d mailing list