code: protected double getSqrdNorm(int i, int j, List<? extends Vec> vecs, List<Double> cache)
      {
          if(cache == null)
              return Math.pow(vecs.get(i).pNormDist(2.0, vecs.get(j)), 2);
          return cache.get(i)+cache.get(j)-2*vecs.get(i).dot(vecs.get(j));
      }
docs: Returns the squared L<sup>2</sup> norm between two points from the cache values.
  @param i the first index in the vector list
  @param j the second index in the vector list
  @param vecs the list of vectors that make the collection
  @param cache the cache of values for each vector in the collection
  @return the squared norm ||x<sub>i</sub>-x<sub>j</sub>||<sup>2</sup>