docs: private void calculateInside(int spanStart, int spanEnd, CfgParseChart chart, double[] newValues) {
      double[] binaryRuleValues = binaryDistributionWeights.getValues();
      
      int leftIndex = Ints.indexOf(binaryDistributionWeights.getDimensionNumbers(), leftVar.getOnlyVariableNum());
      int rightIndex = Ints.indexOf(binaryDistributionWeights.getDimensionNumbers(), rightVar.getOnlyVariableNum());
      
      for (int i = 0; i < spanEnd - spanStart; i++) {
        double[] left = chart.getInsideEntriesArray(spanStart, spanStart + i);
        double[] right = chart.getInsideEntriesArray(spanStart + i + 1, spanEnd);
  
        for (int j = 0; j < newValues.length; j++) {
          newValues[j] = binaryRuleValues[j] * left[binaryDistributionWeights.indexToPartialDimKey(j, leftIndex)]
              * right[binaryDistributionWeights.indexToPartialDimKey(j, rightIndex)];
        }
  
        chart.updateInsideEntry(spanStart, spanEnd, i, newValues, binaryDistribution);
      }
    }