  We show that modularity, a quantity introduced in the study of networked
systems, can be generalized and used in the clustering problem as an indicator
for the quality of the solution. The introduction of this measure arises very
naturally in the case of clustering algorithms that are rooted in Statistical
Mechanics and use the analogy with a physical system.
