1 |
| package org.sat4j.reader; |
2 |
| |
3 |
| import org.sat4j.reader.csp.BinarySupportsACEncoding; |
4 |
| import org.sat4j.reader.csp.SupportsDirectEncoding; |
5 |
| import org.sat4j.specs.ISolver; |
6 |
| |
7 |
| public class CSPSupportReader extends CSPReader { |
8 |
| |
9 |
0
| public CSPSupportReader(ISolver solver) {
|
10 |
0
| super(solver);
|
11 |
| } |
12 |
| |
13 |
0
| @Override
|
14 |
| protected void manageAllowedTuples(int relnum, int[] domains, int nbtuples) { |
15 |
0
| if (domains.length==2)
|
16 |
0
| relations[relnum] = new BinarySupportsACEncoding(domains, nbtuples);
|
17 |
| else |
18 |
0
| relations[relnum] = new SupportsDirectEncoding(domains, nbtuples);
|
19 |
| } |
20 |
| } |