code: private static MaxMarginalSet cliqueTreeToMaxMarginalSet(CliqueTree cliqueTree,
        FactorGraph originalFactorGraph) {
      for (int i = 0; i < cliqueTree.numFactors(); i++) {
        computeMarginal(cliqueTree, i, false);
      }
      return new FactorMaxMarginalSet(cliqueTree, originalFactorGraph.getConditionedValues());
    }
docs: Retrieves max marginals from the given clique tree.
  
  @param cliqueTree
  @param rootFactorNum
  @return