Commit f2aa026f authored by lonca's avatar lonca
Browse files

(file push forgotten)

SAT solvers used for CSP computations are know able to tell if they are real solvers or DIMACS/PB output solvers.
This behavior is needed since output solvers must specify the literals mappings, which might be hidden in a computation point of view due to its (possibly) huge size.

git-svn-id: svn+ssh://svn.forge.ow2.org/svnroot/sat4j/maven/trunk@2541 ba638df5-4473-46d1-82f8-c3ae2a17a6e1
parent 167e15b8
......@@ -54,7 +54,7 @@ public enum ECSPFormat {
/**
* @see ECSPFormat#decoratePrintWriter(PrintWriter)
*/
public PrintWriter decoratePrintWriter(PrintWriter pw) {
public PrintWriter decoratePrintWriter(boolean shouldOnlyDisplayEncoding, PrintWriter pw) {
return pw;
}
},
......@@ -74,7 +74,7 @@ public enum ECSPFormat {
/**
* @see ECSPFormat#decoratePrintWriter(PrintWriter)
*/
public PrintWriter decoratePrintWriter(PrintWriter pw) {
public PrintWriter decoratePrintWriter(boolean shouldOnlyDisplayEncoding, PrintWriter pw) {
return pw;
}
},
......@@ -93,7 +93,10 @@ public enum ECSPFormat {
/**
* @see ECSPFormat#decoratePrintWriter(PrintWriter)
*/
public PrintWriter decoratePrintWriter(PrintWriter pw) {
public PrintWriter decoratePrintWriter(boolean shouldOnlyDisplayEncoding, PrintWriter pw) {
if(shouldOnlyDisplayEncoding) {
return pw;
}
XmlCommentPrintWriter commentPrintWriter = new XmlCommentPrintWriter(pw);
commentPrintWriter.addDncPrefix("v ");
return commentPrintWriter;
......@@ -114,7 +117,7 @@ public enum ECSPFormat {
/**
* @see ECSPFormat#decoratePrintWriter(PrintWriter)
*/
public PrintWriter decoratePrintWriter(PrintWriter pw) {
public PrintWriter decoratePrintWriter(boolean shouldOnlyDisplayEncoding, PrintWriter pw) {
return pw;
}
};
......@@ -148,11 +151,12 @@ public enum ECSPFormat {
/**
* Decorates a {@link PrintWriter} dedicated to solver output in order to provide the correct output given the CSP format.
* @param shouldOnlyDisplayEncoding
*
* @param pw the default writer
* @return the decorator
*/
public PrintWriter decoratePrintWriter(PrintWriter pw) {
public PrintWriter decoratePrintWriter(boolean shouldOnlyDisplayEncoding, PrintWriter pw) {
throw new IllegalStateException("This code should never be called");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment