This is a modified implementation of the COMAR algorithm as given here: https://dl.acm.org/citation.cfm?id=1435572