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
028184de
Commit
028184de
authored
Mar 06, 2022
by
Daniel Le Berre
Browse files
yet more sonarqube violations fixes for sat4j core
parent
bd5b5434
Pipeline
#20109
passed with stages
in 44 minutes and 59 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
org.sat4j.core/src/main/java/org/sat4j/minisat/core/GlucoseLCDS.java
View file @
028184de
...
...
@@ -101,6 +101,7 @@ class GlucoseLCDS<D extends DataStructureFactory>
+
timer
;
}
@Override
public
void
init
()
{
final
int
howmany
=
solver
.
voc
.
nVars
();
if
(
this
.
flags
.
length
<=
howmany
)
{
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/learning/AbstractLearning.java
View file @
028184de
...
...
@@ -46,12 +46,12 @@ import org.sat4j.specs.Constr;
* @author daniel
*
*/
abstract
class
AbstractLearning
<
D
extends
DataStructureFactory
>
implements
LearningStrategy
<
D
>
{
abstract
class
AbstractLearning
<
D
extends
DataStructureFactory
>
implements
LearningStrategy
<
D
>
{
/**
*
*/
*
*/
private
static
final
long
serialVersionUID
=
1L
;
private
VarActivityListener
val
;
...
...
@@ -65,7 +65,7 @@ abstract class AbstractLearning<D extends DataStructureFactory> implements
}
public
final
void
claBumpActivity
(
Constr
reason
)
{
for
(
int
i
=
0
;
i
<
reason
.
size
();
i
++)
{
for
(
var
i
=
0
;
i
<
reason
.
size
();
i
++)
{
int
q
=
reason
.
get
(
i
);
assert
q
>
1
;
this
.
val
.
varBumpActivity
(
q
);
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/orders/PureOrder.java
View file @
028184de
...
...
@@ -77,7 +77,7 @@ public final class PureOrder extends VarOrderHeap {
// try to find a pure literal
this
.
cpt
=
0
;
int
nblits
=
2
*
this
.
lits
.
nVars
();
for
(
int
i
=
2
;
i
<=
nblits
;
i
++)
{
for
(
var
i
=
2
;
i
<=
nblits
;
i
++)
{
if
(
this
.
lits
.
isUnassigned
(
i
)
&&
this
.
lits
.
watches
(
i
).
size
()
>
0
&&
this
.
lits
.
watches
(
i
^
1
).
size
()
==
0
)
{
return
i
;
...
...
org.sat4j.core/src/main/java/org/sat4j/tools/encoding/Product.java
View file @
028184de
...
...
@@ -125,8 +125,8 @@ public class Product extends EncodingStrategyAdapter {
hashTupleSetTable
[
d
]
=
new
ArrayList
<>();
ady
[
d
]
=
new
HashMap
<>();
adxd
[
d
]
=
new
VecInt
();
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
for
(
int
j
=
0
;
j
<
k
;
j
++)
{
for
(
var
i
=
0
;
i
<
n
;
i
++)
{
for
(
var
j
=
0
;
j
<
k
;
j
++)
{
if
(
j
<
d
)
{
aWithoutD
[
i
][
d
][
j
]
=
a
[
i
][
j
];
}
else
{
...
...
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