- java.lang.Object
-
- org.logicng.transformations.simplification.DefaultRatingFunction
-
- All Implemented Interfaces:
FormulaFunction<Integer>,RatingFunction<Integer>
public class DefaultRatingFunction extends Object implements RatingFunction<Integer>
A rating function which rates a formula with the length of its representation using theDefaultStringRepresentation.- Since:
- 2.0.0
- Version:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor Description DefaultRatingFunction()Deprecated.In the next version, the standard constructor will be replaced by a private constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Integerapply(Formula formula, boolean cache)Applies this function to a given formula.static DefaultRatingFunctionget()Returns the singleton instance of this function.
-
-
-
Constructor Detail
-
DefaultRatingFunction
@Deprecated public DefaultRatingFunction()
Deprecated.In the next version, the standard constructor will be replaced by a private constructor. In order to instantiate an object of this class, use theget()method.
-
-
Method Detail
-
get
public static DefaultRatingFunction get()
Returns the singleton instance of this function.- Returns:
- an instance of this function
-
apply
public Integer apply(Formula formula, boolean cache)
Description copied from interface:FormulaFunctionApplies this function to a given formula.- Specified by:
applyin interfaceFormulaFunction<Integer>- Parameters:
formula- the input formulacache- indicates whether the result should be cached in this formula's cache- Returns:
- the result of the application
-
-