Package org.jacop.satwrapper.translation
Class DomainTranslator
- java.lang.Object
-
- org.jacop.satwrapper.translation.DomainTranslator
-
- All Implemented Interfaces:
WrapperComponent
public final class DomainTranslator extends java.lang.Object implements WrapperComponent
A component that translates CP variables ranges to boolean clauses to be added to the SAT solver- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Set<IntVar>
translatedVars
private SatWrapper
wrapper
-
Constructor Summary
Constructors Constructor Description DomainTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(SatWrapper wrapper)
connect the component to the wrapperjava.lang.String
toString()
void
translate(IntVar variable)
translates the variable to clauses, if not already done, and add those clauses to the wrapper queue.
-
-
-
Field Detail
-
wrapper
private SatWrapper wrapper
-
translatedVars
public java.util.Set<IntVar> translatedVars
-
-
Method Detail
-
translate
public void translate(IntVar variable)
translates the variable to clauses, if not already done, and add those clauses to the wrapper queue.- Parameters:
variable
- the variable to translatesee Propagation via Lazy Clause Generation, Olga Ohrimenko1 , Peter J. Stuckey , and Michael Codish
-
initialize
public void initialize(SatWrapper wrapper)
Description copied from interface:WrapperComponent
connect the component to the wrapper- Specified by:
initialize
in interfaceWrapperComponent
- Parameters:
wrapper
- the wrapper
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-