Class Configuration.Builder
java.lang.Object
org.tweetyproject.arg.adf.reasoner.sat.execution.Configuration.Builder
- Enclosing class:
Configuration
The
Builder class for constructing Configuration instances.
It allows for the customization of the SAT solver and the parallelism level.
Example usage:
Configuration config = Configuration.builder()
.setSatSolver(new SomeSatSolver())
.setParallelism(4)
.build();
- Author:
- Sebastian Matthias Thimm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a newConfigurationinstance based on the current settings.setParallelism(int parallelism) Sets the parallelism level used for parallel execution.setSatSolver(IncrementalSatSolver satSolver) Sets theIncrementalSatSolverto be used in theConfiguration.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setSatSolver
Sets theIncrementalSatSolverto be used in theConfiguration.- Parameters:
satSolver- the SAT solver to use, must not be null- Returns:
- this builder instance for method chaining
- Throws:
NullPointerException- ifsatSolveris null
-
setParallelism
Sets the parallelism level used for parallel execution.- Parameters:
parallelism- the parallelism level, must be greater than 1- Returns:
- this builder instance for method chaining
- Throws:
IllegalArgumentException- ifparallelismis less than 2
-
build
Builds and returns a newConfigurationinstance based on the current settings.- Returns:
- a new
Configurationinstance
-