Clustering complex datasets: algorithms and applications