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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds and returns a newConfiguration
instance based on the current settings.setParallelism
(int parallelism) Sets the parallelism level used for parallel execution.setSatSolver
(IncrementalSatSolver satSolver) Sets theIncrementalSatSolver
to be used in theConfiguration
.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setSatSolver
Sets theIncrementalSatSolver
to be used in theConfiguration
.- Parameters:
satSolver
- the SAT solver to use, must not be null- Returns:
- this builder instance for method chaining
- Throws:
NullPointerException
- ifsatSolver
is 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
- ifparallelism
is less than 2
-
build
Builds and returns a newConfiguration
instance based on the current settings.- Returns:
- a new
Configuration
instance
-