It uses a heuristic which determines if the closest prototype of a pattern E has been changed or not by using a simple check. If the assignment has not changed, no further distance calculations are required. It also uses the fact that the movement of
the cluster centroids is small for consecutive iterations (especially after a few iterations).