Skip to content

Commit

Permalink
Two more files with missing Override annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
kostis committed Feb 11, 2024
1 parent ad77496 commit 318ddf1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public void analyzeCE(Word<PSymbolInstance> ce) {
ces.add(ce);
}

@Override
public String toString() {
String str = "--- Statistics ---\n";
int sum = 0;
Expand Down
16 changes: 13 additions & 3 deletions src/main/java/de/learnlib/ralib/solver/simple/Polynomial.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private Polynomial(Set<Monomial> constraints) {
this.constraints = constraints;
}

@Override
public Constraint negate() {
List<Constraint> csets = new ArrayList<Constraint>(constraints.size());

Expand All @@ -65,6 +66,7 @@ public Set<Monomial> getConstraints() {
return Collections.unmodifiableSet(constraints);
}

@Override
public void print(Appendable a, String[] varNames) throws IOException {
if(constraints.isEmpty()) {
a.append("false");
Expand All @@ -80,50 +82,57 @@ public void print(Appendable a, String[] varNames) throws IOException {
}
}

@Override
public Polynomial shift(int[] numVars, int thisIdx) {
Set<Monomial> cs = new HashSet<Monomial>(constraints.size());
for(Monomial c : constraints)
cs.add(c.shift(numVars, thisIdx));
return new Polynomial(cs);
}

@Override
public Polynomial shift(int myVars, int base, int total) {
Set<Monomial> cs = new HashSet<Monomial>(constraints.size());
for(Monomial c : constraints)
cs.add(c.shift(myVars, base, total));
return new Polynomial(cs);
}

@Override
public boolean isFalse() {
return constraints.isEmpty();
}

@Override
public boolean isTrue() {
return negate().isFalse();
}

@Override
public Polynomial substitute(int[] subst) {
Set<Monomial> cs = new HashSet<Monomial>();
for(Monomial c : constraints)
cs.add(c.substitute(subst));
return new Polynomial(cs);
}

@Override
public Polynomial shift(int shift) {
Set<Monomial> cs = new HashSet<Monomial>(constraints.size());
for(Monomial c : constraints)
cs.add(c.shift(shift));
return new Polynomial(cs);
}

@Override
public Polynomial restrict(int numVars) {
Set<Monomial> cs = new HashSet<Monomial>();
for(Monomial c : constraints)
cs.add(c.restrict(numVars));
return new Polynomial(cs);
}

@Override
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
Expand All @@ -132,7 +141,7 @@ public int hashCode() {
return result;
}

@Override
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
Expand All @@ -149,6 +158,7 @@ public boolean equals(Object obj) {
return true;
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
try {
Expand All @@ -158,7 +168,7 @@ public String toString() {
return sb.toString();
}

@Override
@Override
public Collection<Monomial> monomials() {
return constraints;
}
Expand Down

0 comments on commit 318ddf1

Please sign in to comment.