code: public FactorGraph getConnectedComponent(VariableNumMap vars) {
      return FactorGraph.getConnectedComponent(vars, variableFactorMap, factorVariableMap, variables,
          Arrays.asList(factors), Arrays.asList(factorNames), conditionedVariables,
          conditionedValues, inferenceHint);
    }
docs: Gets one or more connected components of this factor graph that
  contain all of {@code vars}. The returned factor graph accurately
  represent the marginal distribution over {@code vars} assuming
  that any discarded factor graph portions have nonzero partition
  functions.
  
  @param vars
  @return