Module logicng

Class FactorOutSimplifier

  • All Implemented Interfaces:
    FormulaTransformation

    public final class FactorOutSimplifier
    extends Object
    implements FormulaTransformation
    Factor out simplification.

    Reduces the length for a formula by applying factor out operations.

    Since:
    2.0.0
    Version:
    2.0.0
    • Constructor Detail

      • FactorOutSimplifier

        public FactorOutSimplifier​(RatingFunction<? extends Number> ratingFunction)
        Constructs a new factor out simplification with the given rating function.
        Parameters:
        ratingFunction - the rating function
      • FactorOutSimplifier

        public FactorOutSimplifier()
        Constructs a new factor out simplification with the default rating function DefaultRatingFunction.
    • Method Detail

      • apply

        public Formula apply​(Formula formula,
                             boolean cache)
        Description copied from interface: FormulaTransformation
        Returns the transformed formula.
        Specified by:
        apply in interface FormulaTransformation
        Parameters:
        formula - the input formula
        cache - indicated whether the result (and associated predicates) should be cached in the formula's cache.
        Returns:
        the transformed formula