-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCombinationHelper.java
63 lines (45 loc) · 1.44 KB
/
CombinationHelper.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// This is a helper class used during the lattice traversal
// for storing relevant candidates.
package od;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import org.apache.lucene.util.OpenBitSet;
import java.io.Serializable;
public class CombinationHelper implements Serializable {
// keeps info about current cell in lattice
private static final long serialVersionUID = 1L;
private OpenBitSet rhsCandidates;
private boolean valid;
private StrippedPartition partition;
public CombinationHelper() {
valid = true;
}
public OpenBitSet getRhsCandidates() {
return rhsCandidates;
}
public void setRhsCandidates(OpenBitSet rhsCandidates) {
this.rhsCandidates = rhsCandidates;
}
public StrippedPartition getPartition() {
return partition;
}
public void setPartition(StrippedPartition partition) {
this.partition = partition;
}
public boolean isValid() {
return valid;
}
public void setInvalid() {
this.valid = false;
partition = null;
}
//OD
private ObjectArrayList<OpenBitSet> swapCandidates;
//OD
public ObjectArrayList<OpenBitSet> getSwapCandidates() {
return swapCandidates;
}
//OD
public void setSwapCandidates(ObjectArrayList<OpenBitSet> swapCandidates) {
this.swapCandidates = swapCandidates;
}
}