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
df9025fe
Commit
df9025fe
authored
Mar 13, 2022
by
Daniel Le Berre
Browse files
create constant for repeated error message
parent
2ab7577d
Pipeline
#20206
passed with stages
in 62 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
org.sat4j.core/src/main/java/org/sat4j/minisat/core/Solver.java
View file @
df9025fe
...
...
@@ -84,6 +84,8 @@ import org.sat4j.specs.UnitClauseProvider;
public
class
Solver
<
D
extends
DataStructureFactory
>
implements
ISolverService
,
ICDCL
<
D
>
{
private
static
final
String
CALL_THE_SOLVE_METHOD_FIRST
=
"Call the solve method first!!!"
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
double
CLAUSE_RESCALE_FACTOR
=
1
e
-
20
;
...
...
@@ -520,7 +522,7 @@ public class Solver<D extends DataStructureFactory>
public
int
[]
model
()
{
if
(
this
.
model
==
null
)
{
throw
new
UnsupportedOperationException
(
"Call the solve method first!!!"
);
//$NON-NLS-1$
CALL_THE_SOLVE_METHOD_FIRST
);
}
var
nmodel
=
new
int
[
this
.
model
.
length
];
System
.
arraycopy
(
this
.
model
,
0
,
nmodel
,
0
,
this
.
model
.
length
);
...
...
@@ -1541,7 +1543,7 @@ public class Solver<D extends DataStructureFactory>
}
if
(
this
.
userbooleanmodel
==
null
)
{
throw
new
UnsupportedOperationException
(
"Call the solve method first!!!"
);
//$NON-NLS-1$
CALL_THE_SOLVE_METHOD_FIRST
);
}
return
this
.
userbooleanmodel
[
variable
-
1
];
}
...
...
@@ -2287,7 +2289,7 @@ public class Solver<D extends DataStructureFactory>
public
int
[]
modelWithInternalVariables
()
{
if
(
this
.
model
==
null
)
{
throw
new
UnsupportedOperationException
(
"Call the solve method first!!!"
);
//$NON-NLS-1$
CALL_THE_SOLVE_METHOD_FIRST
);
}
int
[]
nmodel
;
if
(
nVars
()
==
realNumberOfVariables
())
{
...
...
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