Skip to content
Snippets Groups Projects
Commit b1ebf0e4 authored by Daniel Le Berre's avatar Daniel Le Berre
Browse files

Alternate fix for !13i

parent 4d59b2e0
No related branches found
No related tags found
No related merge requests found
Pipeline #32045 passed
Showing
with 18 additions and 14 deletions
......@@ -40,8 +40,8 @@ import org.sat4j.specs.IVecInt;
import org.sat4j.specs.TimeoutException;
import org.sat4j.tools.SolutionFoundListener;
public abstract class AbstractLexicoHelper<T, C> extends DependencyHelper<T, C>
implements SolutionFoundListener {
public abstract class AbstractLexicoHelper<T, C extends Comparable<C>>
extends DependencyHelper<T, C> implements SolutionFoundListener {
/**
*
......
......@@ -64,7 +64,8 @@ import org.sat4j.tools.GateTranslator;
* @param <C>
* The class of the object to map to each constraint.
*/
public class DependencyHelper<T, C> implements Serializable {
public class DependencyHelper<T, C extends Comparable<C>>
implements Serializable {
public static final INegator NO_NEGATION = new INegator() {
......
......@@ -37,7 +37,7 @@ import org.sat4j.specs.IVec;
import org.sat4j.specs.IVecInt;
import org.sat4j.specs.IteratorInt;
public class DisjunctionRHS<T, C> {
public class DisjunctionRHS<T, C extends Comparable<C>> {
private final IVecInt literals;
private final DependencyHelper<T, C> helper;
......
......@@ -48,7 +48,7 @@ import org.sat4j.specs.IVecInt;
* @param <T>
* @param <C>
*/
public class ImplicationAnd<T, C> {
public class ImplicationAnd<T, C extends Comparable<C>> {
private final DependencyHelper<T, C> helper;
private final IVecInt clause;
private final IVec<IConstr> toName = new Vec<IConstr>();
......
......@@ -45,12 +45,13 @@ import org.sat4j.specs.IVec;
* @param <T>
* @param <C>
*/
public class ImplicationNamer<T, C> {
public class ImplicationNamer<T, C extends Comparable<C>> {
private final DependencyHelper<T, C> helper;
private IVec<IConstr> toName = new Vec<IConstr>();
public ImplicationNamer(DependencyHelper<T, C> helper, IVec<IConstr> toName) {
public ImplicationNamer(DependencyHelper<T, C> helper,
IVec<IConstr> toName) {
this.toName = toName;
this.helper = helper;
}
......
......@@ -44,7 +44,7 @@ import org.sat4j.specs.IVecInt;
* @param <T>
* @param <C>
*/
public class ImplicationRHS<T, C> {
public class ImplicationRHS<T, C extends Comparable<C>> {
private final IVecInt clause;
private final DependencyHelper<T, C> helper;
......
......@@ -31,7 +31,8 @@ package org.sat4j.pb.tools;
import org.sat4j.pb.IPBSolver;
public class LexicoHelper<T, C> extends AbstractLexicoHelper<T, C> {
public class LexicoHelper<T, C extends Comparable<C>>
extends AbstractLexicoHelper<T, C> {
public LexicoHelper(IPBSolver solver) {
super(new LexicoDecoratorPB(solver));
......
......@@ -32,7 +32,8 @@ package org.sat4j.pb.tools;
import org.sat4j.pb.IIntegerPBSolver;
import org.sat4j.pb.multiobjective.LeximinDecorator;
public class LeximinHelper<T, C> extends AbstractLexicoHelper<T, C> {
public class LeximinHelper<T, C extends Comparable<C>>
extends AbstractLexicoHelper<T, C> {
public LeximinHelper(IIntegerPBSolver solver) {
super(new LeximinDecorator(solver));
......
......@@ -42,8 +42,8 @@ import org.sat4j.specs.IVecInt;
import org.sat4j.specs.TimeoutException;
import org.sat4j.tools.SolutionFoundListener;
public class LinMultiObjHelper<T, C> extends DependencyHelper<T, C>
implements SolutionFoundListener {
public class LinMultiObjHelper<T, C extends Comparable<C>>
extends DependencyHelper<T, C> implements SolutionFoundListener {
/**
*
......
......@@ -31,8 +31,8 @@ package org.sat4j.pb.tools;
import org.sat4j.pb.IPBSolver;
public class SteppedTimeoutLexicoHelper<T, C> extends
AbstractLexicoHelper<T, C> {
public class SteppedTimeoutLexicoHelper<T, C extends Comparable<C>>
extends AbstractLexicoHelper<T, C> {
public SteppedTimeoutLexicoHelper(IPBSolver solver) {
super(new SteppedTimeoutLexicoDecoratorPB(solver));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment