REGR_SXY makes the following computation after the elimination of null (arg1, arg2) pairs:

<p>REGR_COUNT(arg1, arg2) * COVAR_POP(arg1, arg2)</p>

@param arg1 first arg
@param arg2 second arg
@return regr_sxy(arg1, arg2)
3017
public static WindowOver<Double> regrSxy(Expression<? extends Number> arg1, Expression<? extends Number> arg2) {
        return new WindowOver<Double>(Double.class, SQLOps.REGR_SXY, arg1, arg2);
    }
757545
public static double dotSparseDense(SparseNumberVector v1, NumberVector v2) {
    final int dim2 = v2.getDimensionality();
    double dot = 0.;
    for(int i1 = v1.iter(); v1.iterValid(i1);) {
      final int d1 = v1.iterDim(i1);
      if(d1 >= dim2) {
        break;
      }
      dot += v1.iterDoubleValue(i1) * v2.doubleValue(d1);
      i1 = v1.iterAdvance(i1);
    }
    return dot;
  }
88697
public MethodCall with(String name1, Object arg1, String name2, Object arg2) {
    return with(name1, arg1, name2, arg2, null, null);
  }
140615
public static double[] minusTimesEquals(final double[] v1, final double[] v2, final double s2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    for(int i = 0; i < v1.length; i++) {
      v1[i] -= v2[i] * s2;
    }
    return v1;
  }
815561
public static double[] overwriteTimes(final double[] v1, final double[] v2, final double s) {
    for(int i = 0; i < v1.length; i++) {
      v1[i] = v2[i] * s;
    }
    return v1;
  }
781105
@SuppressWarnings("unchecked")
  public static <T> T add(T op1, T op2) {
    if (op1.getClass() != op2.getClass()) {
      throw new RuntimeException("Arguments of different classes: " + op1 + " " + op2);
    }

    if (Byte.class.isInstance(op1)) {
      return (T)(Byte)(byte)(((Byte) op1).byteValue() + ((Byte) op2).byteValue());
    }
    if (Short.class.isInstance(op1)) {
      return (T)(Short)(short)(((Short) op1).shortValue() + ((Short) op2).shortValue());
    }
    if (Character.class.isInstance(op1)) {
      return (T)(Character)(char)(((Character) op1).charValue() + ((Character) op2).charValue());
    }
    if (Integer.class.isInstance(op1)) {
      return (T)(Integer)(((Integer) op1).intValue() + ((Integer) op2).intValue());
    }
    if (Float.class.isInstance(op1)) {
      return (T)(Float)(((Float) op1).floatValue() + ((Float) op2).floatValue());
    }
    if (Long.class.isInstance(op1)) {
      return (T)(Long)(((Long) op1).longValue() + ((Long) op2).longValue());
    }
    if (Double.class.isInstance(op1)) {
      return (T)(Double)(((Double) op1).doubleValue() + ((Double) op2).doubleValue());
    }

    throw new UnsupportedOperationException("Invalid for arbitrary types: " + op1 + " " + op2);
  }
901932
public static double[] minusTimes(final double[] v1, final double[] v2, final double s2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    final double[] sub = new double[v1.length];
    for(int i = 0; i < v1.length; i++) {
      sub[i] = v1[i] - v2[i] * s2;
    }
    return sub;
  }
730383
public static WindowOver<Double> regrAvgx(Expression<? extends Number> arg1, Expression<? extends Number> arg2) {
        return new WindowOver<Double>(Double.class, SQLOps.REGR_AVGX, arg1, arg2);
    }
1090197
public static double[] timesMinus(final double[] v1, final double s1, final double[] v2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    final double[] sub = new double[v1.length];
    for(int i = 0; i < v1.length; i++) {
      sub[i] = v1[i] * s1 - v2[i];
    }
    return sub;
  }
228334
@Override
	public RandomVariable getCovariance(double time, int component1, int component2, RandomVariable[] realizationAtTimeIndex) {
		int timeIndex = timeDiscretization.getTimeIndex(time);
		if(timeIndex < 0) {
			timeIndex = Math.abs(timeIndex)-2;
		}

		return getCovariance(timeIndex, component1, component2, realizationAtTimeIndex);
	}
261380
@Override
  public Double divide1(Long arg1, long arg2) {
    if (arg1 == null) {
      return Double.NaN;
    } else {
      return arg1 / (double) arg2;
    }
  }
415589
def strxor(s1, s2):
    
    return b"".join(map(lambda x, y: chb(orb(x) ^ orb(y)), s1, s2))
115491
@Pure
	public static <P1, P2> Procedure1<P2> curry(final Procedure2<? super P1, ? super P2> procedure, final P1 argument) {
		if (procedure == null)
			throw new NullPointerException("procedure");
		return new Procedure1<P2>() {
			@Override
			public void apply(P2 p) {
				procedure.apply(argument, p);
			}
		};
	}
970996
public static WindowOver<Double> regrR2(Expression<? extends Number> arg1, Expression<? extends Number> arg2) {
        return new WindowOver<Double>(Double.class, SQLOps.REGR_R2, arg1, arg2);
    }
360081
public static double dotSparse(SparseNumberVector v1, SparseNumberVector v2) {
    double dot = 0.;
    int i1 = v1.iter(), i2 = v2.iter();
    while(v1.iterValid(i1) && v2.iterValid(i2)) {
      final int d1 = v1.iterDim(i1), d2 = v2.iterDim(i2);
      if(d1 < d2) {
        i1 = v1.iterAdvance(i1);
      }
      else if(d2 < d1) {
        i2 = v2.iterAdvance(i2);
      }
      else { // d1 == d2
        dot += v1.iterDoubleValue(i1) * v2.iterDoubleValue(i2);
        i1 = v1.iterAdvance(i1);
        i2 = v2.iterAdvance(i2);
      }
    }
    return dot;
  }
1084410
public static double[] timesMinusEquals(final double[] v1, final double s1, final double[] v2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    for(int i = 0; i < v1.length; i++) {
      v1[i] = v1[i] * s1 - v2[i];
    }
    return v1;
  }
193040
public static WindowOver<Double> corr(Expression<? extends Number> expr1, Expression<? extends Number> expr2) {
        return new WindowOver<Double>(Double.class, SQLOps.CORR, expr1, expr2);
    }