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
33b77655
Commit
33b77655
authored
Mar 13, 2022
by
Daniel Le Berre
Browse files
removed deprecated methods ISolver.printStats()
parent
2bbf7264
Pipeline
#20207
passed with stages
in 52 minutes and 12 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
org.sat4j.core/src/main/java/org/sat4j/specs/ISolver.java
View file @
33b77655
...
...
@@ -29,7 +29,6 @@
*******************************************************************************/
package
org.sat4j.specs
;
import
java.io.PrintStream
;
import
java.io.PrintWriter
;
import
java.io.Serializable
;
import
java.util.Map
;
...
...
@@ -326,31 +325,6 @@ public interface ISolver extends IProblem, Serializable {
*/
void
reset
();
/**
* Display statistics to the given output stream Please use writers instead
* of stream.
*
* @param out
* @param prefix
* the prefix to put in front of each line
* @see #printStat(PrintWriter, String)
*/
@Deprecated
void
printStat
(
PrintStream
out
,
String
prefix
);
/**
* Display statistics to the given output writer
*
* @param out
* @param prefix
* the prefix to put in front of each line
* @since 1.6
* @deprecated using the prefix does no longer makes sense because the
* solver owns it.
*/
@Deprecated
void
printStat
(
PrintWriter
out
,
String
prefix
);
/**
* Display statistics to the given output writer
*
...
...
org.sat4j.core/src/main/java/org/sat4j/tools/ManyCore.java
View file @
33b77655
...
...
@@ -29,7 +29,6 @@
*******************************************************************************/
package
org.sat4j.tools
;
import
java.io.PrintStream
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -243,26 +242,6 @@ public class ManyCore<S extends ISolver> implements ISolver, OutcomeListener,
return
result
;
}
@Deprecated
public
void
printStat
(
PrintStream
out
,
String
prefix
)
{
for
(
var
i
=
0
;
i
<
this
.
numberOfSolvers
;
i
++)
{
out
.
printf
(
"%s>>>>>>>>>> Solver number %d (%d answers) <<<<<<<<<<<<<<<<<<%n"
,
prefix
,
i
,
this
.
solversStats
.
get
(
i
).
getValue
());
this
.
solvers
.
get
(
i
).
printStat
(
out
,
prefix
);
}
}
@Deprecated
public
void
printStat
(
PrintWriter
out
,
String
prefix
)
{
for
(
var
i
=
0
;
i
<
this
.
numberOfSolvers
;
i
++)
{
out
.
printf
(
"%s>>>>>>>>>> Solver number %d (%d answers) <<<<<<<<<<<<<<<<<<%n"
,
prefix
,
i
,
this
.
solversStats
.
get
(
i
).
getValue
());
this
.
solvers
.
get
(
i
).
printStat
(
out
,
prefix
);
}
}
public
boolean
removeConstr
(
IConstr
c
)
{
if
(
c
instanceof
ConstrGroup
)
{
ConstrGroup
group
=
(
ConstrGroup
)
c
;
...
...
org.sat4j.core/src/main/java/org/sat4j/tools/SolverDecorator.java
View file @
33b77655
...
...
@@ -29,7 +29,6 @@
*******************************************************************************/
package
org.sat4j.tools
;
import
java.io.PrintStream
;
import
java.io.PrintWriter
;
import
java.util.Map
;
...
...
@@ -177,22 +176,6 @@ public abstract class SolverDecorator<T extends ISolver> implements ISolver {
return
this
.
solver
.
toString
();
}
/*
* (non-Javadoc)
*
* @see org.sat4j.specs.ISolver#printStat(java.io.PrintStream,
* java.lang.String)
*/
@Deprecated
public
void
printStat
(
PrintStream
out
,
String
prefix
)
{
this
.
solver
.
printStat
(
out
,
prefix
);
}
@Deprecated
public
void
printStat
(
PrintWriter
out
,
String
prefix
)
{
this
.
solver
.
printStat
(
out
,
prefix
);
}
public
void
printStat
(
PrintWriter
out
)
{
this
.
solver
.
printStat
(
out
);
}
...
...
org.sat4j.core/src/main/java/org/sat4j/tools/xplain/DeletionStrategy.java
View file @
33b77655
...
...
@@ -78,7 +78,7 @@ public class DeletionStrategy implements MinimizationStrategy {
System
.
out
.
print
(
" "
);
}
System
.
out
.
println
();
solver
.
printStat
(
new
PrintWriter
(
System
.
out
,
true
)
,
"c "
);
solver
.
printStat
(
new
PrintWriter
(
System
.
out
,
true
));
}
for
(
var
i
=
0
;
i
<
firstExplanation
.
size
();)
{
if
(
assumps
.
contains
(
firstExplanation
.
get
(
i
)))
{
...
...
org.sat4j.core/src/test/java/org/sat4j/minisat/core/TestGroupedTimeoutModelEnumeration.java
View file @
33b77655
...
...
@@ -82,6 +82,5 @@ public class TestGroupedTimeoutModelEnumeration {
this
.
solver
.
model
();
// needed to discard that solution
}
this
.
solver
.
printStat
(
System
.
out
,
">"
);
}
}
org.sat4j.pb/src/main/java/org/sat4j/pb/core/ObjectiveReducerPBSolverDecorator.java
View file @
33b77655
...
...
@@ -29,7 +29,6 @@
*******************************************************************************/
package
org.sat4j.pb.core
;
import
java.io.PrintStream
;
import
java.io.PrintWriter
;
import
java.math.BigInteger
;
import
java.util.ArrayList
;
...
...
@@ -339,16 +338,6 @@ public class ObjectiveReducerPBSolverDecorator implements IPBSolver {
decorated
.
reset
();
}
@SuppressWarnings
(
"deprecation"
)
public
void
printStat
(
PrintStream
out
,
String
prefix
)
{
decorated
.
printStat
(
out
,
prefix
);
}
@SuppressWarnings
(
"deprecation"
)
public
void
printStat
(
PrintWriter
out
,
String
prefix
)
{
decorated
.
printStat
(
out
,
prefix
);
}
public
void
printStat
(
PrintWriter
out
)
{
decorated
.
printStat
(
out
);
}
...
...
org.sat4j.pb/src/main/java/org/sat4j/pb/multiobjective/SumLeximinDecompositionOWAOptimizer.java
View file @
33b77655
package
org.sat4j.pb.multiobjective
;
import
java.io.PrintStream
;
import
java.io.PrintWriter
;
import
java.math.BigInteger
;
import
java.util.ArrayList
;
...
...
@@ -392,16 +391,6 @@ public class SumLeximinDecompositionOWAOptimizer
return
solver
.
nVars
();
}
@SuppressWarnings
(
"deprecation"
)
public
void
printStat
(
PrintStream
out
,
String
prefix
)
{
solver
.
printStat
(
out
,
prefix
);
}
@SuppressWarnings
(
"deprecation"
)
public
void
printStat
(
PrintWriter
out
,
String
prefix
)
{
solver
.
printStat
(
out
,
prefix
);
}
public
void
printStat
(
PrintWriter
out
)
{
solver
.
printStat
(
out
);
}
...
...
org.sat4j.pb/src/main/java/org/sat4j/pb/tools/PreprocCardConstrLearningSolver.java
View file @
33b77655
package
org.sat4j.pb.tools
;
import
java.io.PrintStream
;
import
java.io.PrintWriter
;
import
java.math.BigInteger
;
import
java.util.ArrayList
;
...
...
@@ -241,18 +240,6 @@ public class PreprocCardConstrLearningSolver<S extends IPBSolver>
return
this
.
solvers
.
get
(
solverIndex
).
getStat
();
}
@Override
@Deprecated
public
void
printStat
(
PrintStream
out
,
String
prefix
)
{
this
.
solvers
.
get
(
0
).
printStat
(
out
,
prefix
);
}
@Override
@Deprecated
public
void
printStat
(
PrintWriter
out
,
String
prefix
)
{
this
.
solvers
.
get
(
0
).
printStat
(
out
,
prefix
);
}
@Override
public
boolean
isSatisfiable
()
throws
TimeoutException
{
if
(!
initDone
)
{
...
...
org.sat4j.sat/src/main/java/org/sat4j/sat/KTHLauncher.java
View file @
33b77655
...
...
@@ -3,6 +3,7 @@ package org.sat4j.sat;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.io.PrintWriter
;
import
java.net.URL
;
import
org.apache.commons.cli.CommandLine
;
...
...
@@ -519,7 +520,7 @@ public class KTHLauncher {
// stop the solver before displaying solutions
optimizer
.
expireTimeout
();
optimizer
.
printStat
(
System
.
out
,
"c "
);
optimizer
.
printStat
(
new
PrintWriter
(
System
.
out
)
);
}
};
Runtime
.
getRuntime
().
addShutdownHook
(
shutdownHook
);
...
...
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