docs: private CfgParseChart marginal(CfgParseChart chart, List<?> terminals,
        Factor rootDist) {
      initializeChart(chart, terminals);
      upwardChartPass(chart);
      // Set the initial outside probabilities
      Factor root = rootDistribution.product(rootDist);
      chart.updateOutsideEntry(0, chart.chartSize() - 1, 
          root.coerceToDiscrete().getWeights().getValues(), root, parentVar);
      downwardChartPass(chart);
      return chart;
    }