docs: @Override
    public double distance(NumberVector v1, NumberVector v2) {
      if(v1.getDimensionality() != v2.getDimensionality()) {
        throw new IllegalArgumentException("Different dimensionality of FeatureVectors\n  " + "first argument: " + v1 + "\n  " + "second argument: " + v2);
      }
  
      double sqrDist = 0;
      for(int d = BitsUtil.nextSetBit(dimensions, 0); d >= 0; d = BitsUtil.nextSetBit(dimensions, d + 1)) {
        final double delta = v1.doubleValue(d) - v2.doubleValue(d);
        sqrDist += delta * delta;
      }
      return FastMath.sqrt(sqrDist);
    }