sort on x and y of 2d points
Members - Reputation: 209
Posted 10 December 2012 - 05:36 AM
I would use a sort algorithm that works with multiple indices.
For example i would sort based on cx and cy a set of 2d point.
I think to x and y combined in a color and i wish extract the groups of 2d points that have a similar color.
Is the same thing as an ordering based on x and y?
Crossbones+ - Reputation: 11981
Posted 10 December 2012 - 08:03 AM
However, the result of sorting won't generally make a good clustering algorithm, which is what you seem to need.
Crossbones+ - Reputation: 8188
Posted 11 December 2012 - 12:17 PM
But it depends on what you want to do, you haven't given enough information.
Edited by Bacterius, 11 December 2012 - 12:18 PM.
The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.
- Pessimal Algorithms and Simplexity Analysis