code: public void add(int index, DoubleVector v) {
          boolean added = indices.add(index);
          assert added : "Adding duplicate indices to candidate facility";
          if (sumVector == null) {
              sumVector = (v instanceof SparseVector)
                  ? new SparseHashDoubleVector(v)
                  : new DenseVector(v);
          }
          else {
              VectorMath.add(sumVector, v);
              centroid = null;
          }           
      }
docs: Adds the data point with the specified index to the facility