code: public double getUnnormalizedProbability(Assignment assignment) {
      Preconditions.checkArgument(assignment.containsAll(variables.getVariableNumsArray()),
          "Invalid assignment %s to factor graph on variables %s", assignment, variables);
      double probability = 1.0;
      for (Factor factor : factors) {
        double factorProb = factor.getUnnormalizedProbability(assignment);
        probability *= factorProb;
      }
      return probability;
    }
docs: Gets the unnormalized probability of {@code assignment}. This
  method only supports assignments which do not require inference,
  so {@code assignment} must contain a value for every variable in
  {@code this}. To calculate marginal probabilities or
  max-marginals, see {@link InferenceEngine}.
  
  @param assignment
  @return