docs: public static double[] weightsFor(List<Double> vector) {
          /* split coordinate system */
          List<double[]> coords = coordSplit(vector);
          /* x vals */
          double[] x = coords.get(0);
          /* y vals */
          double[] y = coords.get(1);
  
  
          double meanX = sum(x) / x.length;
          double meanY = sum(y) / y.length;
  
          double sumOfMeanDifferences = sumOfMeanDifferences(x, y);
          double xDifferenceOfMean = sumOfMeanDifferencesOnePoint(x);
  
          double w_1 = sumOfMeanDifferences / xDifferenceOfMean;
  
          double w_0 = meanY - (w_1) * meanX;
  
          //double w_1=(n*sumOfProducts(x,y) - sum(x) * sum(y))/(n*sumOfSquares(x) - Math.pow(sum(x),2));
  
          //	double w_0=(sum(y) - (w_1 * sum(x)))/n;
  
          double[] ret = new double[vector.size()];
          ret[0] = w_0;
          ret[1] = w_1;
  
          return ret;
      }