<commit_before>import offsetZero from "./zero";

export default function(series, order) {
  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;
  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
      var si = series[order[i]], s3 = (si[j][2] - si[j - 1][2]) / 2;
      for (var k = 0, sk; k < i; ++k) {
        sk = series[order[k]], s3 += (sk[j][2] - sk[j - 1][2]);
      }
      s2 += s3 * si[j][2];
      s1 += si[j][2];
    }
    s0[j - 1][2] += s0[j - 1][1] = y;
    if (s1) y -= s2 / s1;
  }
  s0[j - 1][2] += s0[j - 1][1] = y;
  offsetZero(series, order);
};<commit_msg>More concise.<commit_after>import offsetZero from "./zero";

export default function(series, order) {
  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;
  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
      var si = series[order[i]], s3 = (si[j][2] - si[j - 1][2]) / 2;
      for (var k = 0, sk; k < i; ++k) sk = series[order[k]], s3 += (sk[j][2] - sk[j - 1][2]);
      s1 += si[j][2], s2 += s3 * si[j][2];
    }
    s0[j - 1][2] += s0[j - 1][1] = y;
    if (s1) y -= s2 / s1;
  }
  s0[j - 1][2] += s0[j - 1][1] = y;
  offsetZero(series, order);
};
{'fraction_non_alphanumeric': 0.27195685670261943, 'fraction_numerical': 0.06471494607087827, 'mean_word_length': 2.2720403022670026, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '728553', 'n_tokens_mistral': 639, 'n_tokens_neox': 607, 'n_words': 169}