A Method for Community Detection of Complex Networks Based on Hierarchical Clustering