134135136137138139140141142143144
if (len > 0) { DoubleVector sumVector = assignments[i].pop(); while (!assignments[i].isEmpty()) { sumVector = sumVector.add(assignments[i].pop()); } centers[i] = sumVector.divide(len); } }); } public Deque<DoubleVector>[] setupAssignments() {