code: public double sumOfSquaresOfSums() {
      double sum = 0.;
      for(int i = 0; i < ls.length; i++) {
        double v = ls[i];
        sum += v * v;
      }
      return sum;
    }
docs: Sum over all dimensions of squares of linear sums.
  
  @return Sum of LS