code: public static double parseMultiRoot(double[] fracRoot, double[][] fracChild,
              int[] parents) {
          assert (parents.length == fracRoot.length);
          assert (fracChild.length == fracRoot.length);    
  
          final int n = parents.length;
          final ProjTreeChart c = new ProjTreeChart(n+1, DepParseType.VITERBI);
          insideAlgorithm(EdgeScores.combine(fracRoot, fracChild), c, false);
          
          // Trace the backpointers to extract the parents.        
          Arrays.fill(parents, -2);
          // Extract parents right of the wall.
          extractParentsComp(0, n, RIGHT, c, parents);
          return c.getScore(0, n, RIGHT, COMPLETE);
      }
docs: Computes the maximum projective vine-parse tree with multiple root nodes
  using the algorithm of (Eisner, 2000). In the resulting tree, the root
  node will be the wall node (denoted by index -1), and may have multiple
  children.
  
  @param fracRoot Input: The edge weights from the wall to each child.
  @param fracChild Input: The edge weights from parent to child.
  @param parents Output: The parent index of each node or -1 if its parent
  is the wall node.
  @return The score of the parse.