}
// Finalize covariance matrix, compute linear regression
final double slope, inter;
{
double[] meanv = covm.getMeanVector().getArrayRef();
Matrix fmat = covm.destroyToSampleMatrix();
final double covxx = fmat.get(0, 0);
final double covxy = fmat.get(0, 1);
slope = covxy / covxx;
inter = meanv[1] - slope * meanv[0];
}