Commit 2ab7577d authored by Daniel Le Berre's avatar Daniel Le Berre
Browse files

Removed deprecated ICDCL.setLearner() and RestartStrategy.nextRestartNumberOfConflict()

parent 922a6d8a
Pipeline #20205 failed with stages
in 39 minutes and 14 seconds
......@@ -42,8 +42,8 @@ import org.sat4j.specs.UnitPropagationListener;
*
* @param <D>
*/
public interface ICDCL<D extends DataStructureFactory> extends ISolver,
UnitPropagationListener, ActivityListener, Learner {
public interface ICDCL<D extends DataStructureFactory>
extends ISolver, UnitPropagationListener, ActivityListener, Learner {
/**
* Change the internal representation of the constraints. Note that the
......@@ -54,15 +54,6 @@ public interface ICDCL<D extends DataStructureFactory> extends ISolver,
*/
void setDataStructureFactory(D dsf);
/**
*
* @since 2.2
* @deprecated renamed into setLearningStrategy()
* @see #setLearningStrategy(LearningStrategy)
*/
@Deprecated
void setLearner(LearningStrategy<D> learner);
/**
* Allow to change the learning strategy, i.e. to decide which
* clauses/constraints should be learned by the solver after conflict
......
......@@ -57,17 +57,6 @@ public interface RestartStrategy extends Serializable, ConflictTimer {
}
/**
* Ask for the next restart in number of conflicts.
*
* @deprecated since 2.3.2
* @return the delay in conflicts before the next restart.
*/
@Deprecated(since = "2.3.2")
default long nextRestartNumberOfConflict() {
throw new UnsupportedOperationException("Deprecated");
}
/**
* Ask the strategy if the solver should restart.
*
......
......@@ -293,16 +293,6 @@ public class Solver<D extends DataStructureFactory>
return this.slistener;
}
/*
* (non-Javadoc)
*
* @see org.sat4j.minisat.core.ICDCL#setLearner(org.sat4j.minisat.core.
* LearningStrategy)
*/
public void setLearner(LearningStrategy<D> strategy) {
setLearningStrategy(strategy);
}
/*
* (non-Javadoc)
*
......
......@@ -64,11 +64,6 @@ public final class ArminRestarts implements RestartStrategy {
this.conflicts = Math.round(this.inner);
}
@Override
public long nextRestartNumberOfConflict() {
return this.conflicts;
}
@Override
public void onRestart() {
if (this.inner >= this.outer) {
......
......@@ -59,12 +59,6 @@ public class FixedPeriodRestarts implements RestartStrategy {
this.conflictCount = 0;
}
@Deprecated
@Override
public long nextRestartNumberOfConflict() {
return period;
}
public boolean shouldRestart() {
return conflictCount >= period;
}
......
......@@ -115,12 +115,6 @@ public final class LubyRestarts implements RestartStrategy {
this.bound = luby() * this.factor;
}
@Override
@Deprecated
public long nextRestartNumberOfConflict() {
return this.bound;
}
@Override
public void onRestart() {
this.bound = nextLuby() * this.factor;
......
......@@ -61,12 +61,6 @@ public final class MiniSATRestarts implements RestartStrategy {
this.conflictcount = 0;
}
@Override
@Deprecated
public long nextRestartNumberOfConflict() {
return Math.round(this.nofConflicts);
}
@Override
public void onRestart() {
this.nofConflicts *= this.params.getConflictBoundIncFactor();
......
......@@ -43,12 +43,6 @@ public final class NoRestarts implements RestartStrategy {
private static final long serialVersionUID = 1L;
@Override
@Deprecated
public long nextRestartNumberOfConflict() {
return Long.MAX_VALUE;
}
public void reset() {
// do nothing
}
......
......@@ -156,12 +156,7 @@ public class RemoteControlStrategy implements RestartStrategy,
this.restart.init(params, stats);
}
@Deprecated
@Override
public long nextRestartNumberOfConflict() {
return this.restart.nextRestartNumberOfConflict();
}
public boolean shouldRestart() {
if (this.hasClickedOnRestart) {
this.hasClickedOnRestart = false;
......@@ -197,10 +192,12 @@ public class RemoteControlStrategy implements RestartStrategy,
this.solver = solver;
}
@Override
public void reset() {
this.restart.newConflict();
}
@Override
public void newConflict() {
this.restart.newConflict();
this.conflictNumber++;
......@@ -239,6 +236,7 @@ public class RemoteControlStrategy implements RestartStrategy,
this.phaseSelectionStrategy.assignLiteral(p);
}
@Override
public int select(int variable) {
return this.phaseSelectionStrategy.select(variable);
}
......
Supports Markdown
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