Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SAT4J
sat4j
Commits
2ab7577d
Commit
2ab7577d
authored
Mar 13, 2022
by
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
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
org.sat4j.core/src/main/java/org/sat4j/minisat/core/ICDCL.java
View file @
2ab7577d
...
...
@@ -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
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/core/RestartStrategy.java
View file @
2ab7577d
...
...
@@ -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.
*
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/core/Solver.java
View file @
2ab7577d
...
...
@@ -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)
*
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/restarts/ArminRestarts.java
View file @
2ab7577d
...
...
@@ -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
)
{
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/restarts/FixedPeriodRestarts.java
View file @
2ab7577d
...
...
@@ -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
;
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/restarts/LubyRestarts.java
View file @
2ab7577d
...
...
@@ -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
;
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/restarts/MiniSATRestarts.java
View file @
2ab7577d
...
...
@@ -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
();
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/restarts/NoRestarts.java
View file @
2ab7577d
...
...
@@ -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
}
...
...
org.sat4j.sat/src/main/java/org/sat4j/sat/RemoteControlStrategy.java
View file @
2ab7577d
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment