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
584b3920
Commit
584b3920
authored
Mar 09, 2022
by
Daniel Le Berre
Browse files
Add @Override when overriding default methods
parent
1357b084
Pipeline
#20138
passed with stages
in 54 minutes and 45 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/card/AtLeast.java
View file @
584b3920
...
...
@@ -264,10 +264,6 @@ public class AtLeast implements Propagatable, Constr, Undoable, Serializable {
return
this
.
lits
[
i
];
}
public
void
rescaleBy
(
double
d
)
{
throw
new
UnsupportedOperationException
();
}
public
void
assertConstraint
(
UnitPropagationListener
s
)
{
var
ret
=
true
;
for
(
Integer
lit
:
this
.
lits
)
{
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/card/MaxWatchCard.java
View file @
584b3920
...
...
@@ -30,7 +30,6 @@
package
org.sat4j.minisat.constraints.card
;
import
java.io.Serializable
;
import
java.math.BigInteger
;
import
java.util.HashSet
;
import
java.util.Set
;
...
...
@@ -400,34 +399,10 @@ public final class MaxWatchCard
throw
new
UnsupportedOperationException
();
}
/*
* (non-Javadoc)
*
* @see org.sat4j.minisat.constraints.pb.PBConstr#getCoefficient(int)
*/
public
BigInteger
getCoef
(
int
literal
)
{
return
BigInteger
.
ONE
;
}
/*
* (non-Javadoc)
*
* @see org.sat4j.minisat.constraints.pb.PBConstr#getDegree()
*/
public
BigInteger
getDegree
()
{
return
BigInteger
.
valueOf
(
this
.
degree
);
}
public
ILits
getVocabulary
()
{
return
this
.
voc
;
}
/**
* @since 2.1
*/
public
void
forwardActivity
(
double
claInc
)
{
}
public
boolean
canBePropagatedMultipleTimes
()
{
return
false
;
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/cnf/BinaryClause.java
View file @
584b3920
...
...
@@ -144,6 +144,7 @@ public abstract class BinaryClause
/**
* @return the activity of the clause
*/
@Override
public
double
getActivity
()
{
return
this
.
activity
;
}
...
...
@@ -186,6 +187,7 @@ public abstract class BinaryClause
/**
* @param d
*/
@Override
public
void
rescaleBy
(
double
d
)
{
this
.
activity
*=
d
;
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/cnf/BinaryClauses.java
View file @
584b3920
...
...
@@ -214,14 +214,6 @@ public class BinaryClauses implements Constr, Propagatable, Serializable {
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
public
void
forwardActivity
(
double
claInc
)
{
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
public
void
setActivity
(
double
d
)
{
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
public
void
assertConstraintIfNeeded
(
UnitPropagationListener
s
)
{
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/cnf/CBClause.java
View file @
584b3920
...
...
@@ -168,6 +168,7 @@ public class CBClause implements Constr, Undoable, Propagatable, Serializable {
*
* @see org.sat4j.minisat.core.Constr#incActivity(double)
*/
@Override
public
void
incActivity
(
double
claInc
)
{
activity
+=
claInc
;
}
...
...
@@ -177,6 +178,7 @@ public class CBClause implements Constr, Undoable, Propagatable, Serializable {
*
* @see org.sat4j.minisat.core.Constr#getActivity()
*/
@Override
public
double
getActivity
()
{
return
activity
;
}
...
...
@@ -224,6 +226,7 @@ public class CBClause implements Constr, Undoable, Propagatable, Serializable {
*
* @see org.sat4j.minisat.core.Constr#rescaleBy(double)
*/
@Override
public
void
rescaleBy
(
double
d
)
{
activity
*=
d
;
}
...
...
@@ -288,14 +291,6 @@ public class CBClause implements Constr, Undoable, Propagatable, Serializable {
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
public
void
forwardActivity
(
double
claInc
)
{
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
public
void
setActivity
(
double
d
)
{
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
public
void
assertConstraintIfNeeded
(
UnitPropagationListener
s
)
{
throw
new
UnsupportedOperationException
(
"Not implemented yet!"
);
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/cnf/HTClause.java
View file @
584b3920
...
...
@@ -191,6 +191,7 @@ public abstract class HTClause implements Propagatable, Constr, Serializable {
/**
* @return the activity of the clause
*/
@Override
public
double
getActivity
()
{
return
this
.
activity
;
}
...
...
@@ -238,6 +239,7 @@ public abstract class HTClause implements Propagatable, Constr, Serializable {
/**
* @param d
*/
@Override
public
void
rescaleBy
(
double
d
)
{
this
.
activity
*=
d
;
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/cnf/LearntBinaryClause.java
View file @
584b3920
...
...
@@ -61,10 +61,12 @@ public class LearntBinaryClause extends BinaryClause {
/**
* @param claInc
*/
@Override
public
void
incActivity
(
double
claInc
)
{
this
.
activity
+=
claInc
;
}
@Override
public
void
setActivity
(
double
d
)
{
this
.
activity
=
d
;
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/cnf/LearntHTClause.java
View file @
584b3920
...
...
@@ -92,10 +92,12 @@ public class LearntHTClause extends HTClause {
/**
* @param claInc
*/
@Override
public
void
incActivity
(
double
claInc
)
{
this
.
activity
+=
claInc
;
}
@Override
public
void
setActivity
(
double
d
)
{
this
.
activity
=
d
;
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/constraints/cnf/WLClause.java
View file @
584b3920
...
...
@@ -157,10 +157,12 @@ public abstract class WLClause implements Propagatable, Constr, Serializable {
/**
* @return the activity of the clause
*/
@Override
public
double
getActivity
()
{
return
this
.
activity
;
}
@Override
public
void
setActivity
(
double
d
)
{
this
.
activity
=
d
;
}
...
...
@@ -212,6 +214,7 @@ public abstract class WLClause implements Propagatable, Constr, Serializable {
/**
* @param d
*/
@Override
public
void
rescaleBy
(
double
d
)
{
this
.
activity
*=
d
;
}
...
...
org.sat4j.core/src/main/java/org/sat4j/minisat/orders/SubsetVarOrder.java
View file @
584b3920
...
...
@@ -60,14 +60,14 @@ public class SubsetVarOrder extends VarOrderHeap {
this
.
heap
=
new
Heap
(
new
ActivityBasedVariableComparator
(
this
.
activity
));
this
.
heap
.
setBounds
(
nlength
);
for
(
int
var
:
this
.
varsToTest
)
{
assert
var
>
0
;
assert
var
<=
this
.
lits
.
nVars
()
:
""
+
this
.
lits
.
nVars
()
+
"/"
//$NON-NLS-1$ //$NON-NLS-2$
+
var
;
this
.
inSubset
[
var
]
=
true
;
this
.
activity
[
var
]
=
0.0
;
if
(
this
.
lits
.
belongsToPool
(
var
))
{
this
.
heap
.
insert
(
var
);
for
(
int
var
iable
:
this
.
varsToTest
)
{
assert
var
iable
>
0
;
assert
var
iable
<=
this
.
lits
.
nVars
()
:
""
+
this
.
lits
.
nVars
()
+
"/"
//$NON-NLS-1$ //$NON-NLS-2$
+
var
iable
;
this
.
inSubset
[
var
iable
]
=
true
;
this
.
activity
[
var
iable
]
=
0.0
;
if
(
this
.
lits
.
belongsToPool
(
var
iable
))
{
this
.
heap
.
insert
(
var
iable
);
}
}
}
...
...
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