A density-based clustering model for community detection in complex networks