http://www.troodon-software.com/Algorithms/Android/2010/06/20/euclidean-bipartite-matching-multi-touch-and-android/
Check this, it's funny :) Briefly, Android's multitouch dragging uses a function that tries to solve a bipartitate matching problem (aim: track fingers). The function is a greedy algorithm being awkward sometimes. Also, a comment refers to an article in which a near-linear approximation algorithm is developed.
It's maybe just me, but..
- the greedy algorithm seems to be a quick hack and
- the complicated near-linear approximation is an overkill?
Bottom line: take care with the hidden constants that hide in the big O. Especially when they are comparable with the input size.
No comments:
Post a Comment