Class TseitinTransformer
java.lang.Object
org.tweetyproject.arg.adf.transform.TseitinTransformer
- All Implemented Interfaces:
Collector<Literal,,Clause> Transformer<Pair<Literal,Collection<Clause>>>
public final class TseitinTransformer
extends Object
implements Collector<Literal,Clause>, Transformer<Pair<Literal,Collection<Clause>>>
TseitinTransformer class
-
Method Summary
Modifier and TypeMethodDescriptioncollect(AcceptanceCondition acc, Consumer<Clause> clauses) Traverses through the givenAcceptanceConditionand calls the provided consumer on all the collected data.static TseitinTransformerofNegativePolarity(boolean optimize) Creates a newTseitinTransformerinstance with negative root polarity and default argument-to-literal mapping.static TseitinTransformerofNegativePolarity(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformerinstance with negative root polarity and a custom argument-to-literal mapping.static TseitinTransformerofPositivePolarity(boolean optimize) Creates a newTseitinTransformerinstance with positive root polarity and default argument-to-literal mapping.static TseitinTransformerofPositivePolarity(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformerinstance with positive root polarity and a custom argument-to-literal mapping.Transforms the given acceptance condition into another structure.
-
Method Details
-
ofPositivePolarity
Creates a newTseitinTransformerinstance with positive root polarity and default argument-to-literal mapping.- Parameters:
optimize- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformerinstance with positive polarity.
-
ofNegativePolarity
Creates a newTseitinTransformerinstance with negative root polarity and default argument-to-literal mapping.- Parameters:
optimize- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformerinstance with negative polarity.
-
ofPositivePolarity
public static TseitinTransformer ofPositivePolarity(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformerinstance with positive root polarity and a custom argument-to-literal mapping.- Parameters:
mapping- AFunction<Argument, Literal>that maps arguments to literals.optimize- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformerinstance with positive polarity.
-
ofNegativePolarity
public static TseitinTransformer ofNegativePolarity(Function<Argument, Literal> mapping, boolean optimize) Creates a newTseitinTransformerinstance with negative root polarity and a custom argument-to-literal mapping.- Parameters:
mapping- AFunction<Argument, Literal>that maps arguments to literals.optimize- A boolean indicating whether optimizations should be applied.- Returns:
- A new
TseitinTransformerinstance with negative polarity.
-
collect
Description copied from interface:CollectorTraverses through the givenAcceptanceConditionand calls the provided consumer on all the collected data. -
transform
Description copied from interface:TransformerTransforms the given acceptance condition into another structure.- Specified by:
transformin interfaceTransformer<Pair<Literal,Collection<Clause>>> - Parameters:
acc- the acceptance condition- Returns:
- the transformed result
-