Disambiguator calculateAffinity O(n log n) to O(n)
Merge pull request #32 from wosiu/master

Disambiguator calculateAffinity O(n log n) to O(n)