QSIM Clustering Algorithm