Implementation and example of Quality Threshold Clustering algorithm