code: private void scale(double[] scaling, double[][] alpha, int t) {
          double[] table = alpha[t];
  
          double sum = 0.0;
          for (int i = 0; i < table.length; i++) {
              sum += table[i];
          }
  
          scaling[t] = sum;
          for (int i = 0; i < table.length; i++) {
              table[i] /= sum;
          }
      }
docs: Normalize alpha[t] and put the normalization factor in scaling[t].