code: public static double squareSum(final double[] v1) {
      double acc = 0.0;
      for(int row = 0; row < v1.length; row++) {
        final double v = v1[row];
        acc += v * v;
      }
      return acc;
    }
docs: Squared Euclidean length of the vector v1<sup>T</sup> v1 = v1·v1.
  
  @param v1 vector
  @return squared Euclidean length of this vector