Gravity Theory-Based Affinity Propagation Clustering Algorithm and Its Applications