- java.lang.Object
-
- org.logicng.functions.VariablesFunction
-
- All Implemented Interfaces:
FormulaFunction<SortedSet<Variable>>
public class VariablesFunction extends Object implements FormulaFunction<SortedSet<Variable>>
A function that computes all variables occurring in a given formula.- Since:
- 2.2.0
- Version:
- 2.2.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SortedSet<Variable>apply(Formula formula, boolean cache)Applies this function to a given formula.static VariablesFunctionget()Returns the singleton of the function.
-
-
-
Method Detail
-
get
public static VariablesFunction get()
Returns the singleton of the function.- Returns:
- the function instance
-
apply
public SortedSet<Variable> apply(Formula formula, boolean cache)
Description copied from interface:FormulaFunctionApplies this function to a given formula.- Specified by:
applyin interfaceFormulaFunction<SortedSet<Variable>>- Parameters:
formula- the input formulacache- indicates whether the result should be cached in this formula's cache- Returns:
- the result of the application
-
-