Module logicng

Class ModelCounter


  • public final class ModelCounter
    extends Object
    A model counter for large formulas.
    Since:
    2.0.0
    Version:
    2.0.0
    • Method Detail

      • count

        public static BigInteger count​(Collection<Formula> formulas,
                                       SortedSet<Variable> variables)
        Computes the model count for a given set of formulas (interpreted as conjunction) and a set of relevant variables. This set can only be a superset of the original formulas' variables. No projected model counting is supported.
        Parameters:
        formulas - the list of formulas
        variables - the relevant variables
        Returns:
        the model count of the formulas for the variables