446,302 Members | 1,453 Online
Need help? Post your question and get tips & solutions from a community of 446,302 IT Pros & Developers. It's quick & easy.

# help with sorting d-dimensional points

 P: 3 Hi, I would like some help as how to approach the following problem: I have a set of d-dimensional points (e.g (3,5,8,9,5) is a 5-dimensional point), and I need to sort the points on each of the coordinates. The algorithm that I am trying to implement says that the resulting data structure is a multi-pointer list ((d-1)tuply threaded list), each node of which is threaded in each of the single pointer lists corresponding to the chosen coordinates. This is a preprocessing stage of my implementation. I need this sorting of the points so that I could use it in a recursive divide and conquer approach to find the maximal elements among the points. what i am looking for, is a list where the points are sorted by coordinate 1, then another list with points sorted by coordinate 2, and so on. But somehow all the lists should be connected, so that when I delete an element from a certain list (e.g. one sorted by coord 1), it would also be deleted from all the other lists. I suppose that's why they call it threaded, in the algorithm. Is there anything around that can do that? I want to use the STL to solve the problem. Any ideas as how this preprocessing structure might look like? and sort the points in each coordinate using maybe quicksort? AJ. Jun 25 '06 #1