Commit f9662e2f authored by leberre's avatar leberre

Do not return additional variables in model() method.

git-svn-id: svn+ssh://svn.forge.ow2.org/svnroot/sat4j/maven/trunk@283 ba638df5-4473-46d1-82f8-c3ae2a17a6e1
parent 020a7cab
......@@ -163,4 +163,19 @@ public class Xplain<T extends ISolver> extends SolverDecorator<T> {
}
return super.isSatisfiable(extraVariables, global);
}
@Override
public int[] model() {
int [] fullmodel = super.model();
int end = Math.min(nborigvars,fullmodel.length)-1;
while (Math.abs(fullmodel[end]) > nborigvars)
end--;
int [] model = new int[end + 1];
for (int i = 0; i <= end; i++) {
model[i] = fullmodel[i];
}
return model;
}
}
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