|
|
|
@ -25,12 +25,12 @@ public class ExpressionAccumulationConstraintBasic extends ExpressionAccumulatio |
|
|
|
this.op = BASIC; |
|
|
|
} |
|
|
|
|
|
|
|
public ArrayList<AccumulationTerm> getFactors() { |
|
|
|
public ArrayList<AccumulationTerm> getTerms() { |
|
|
|
return terms; |
|
|
|
} |
|
|
|
|
|
|
|
public void setFactors(ArrayList<AccumulationTerm> factors) { |
|
|
|
this.terms = factors; |
|
|
|
public void setTerms(ArrayList<AccumulationTerm> terms) { |
|
|
|
this.terms = terms; |
|
|
|
} |
|
|
|
|
|
|
|
public TemporalOperatorBound getBound() { |
|
|
|
@ -44,8 +44,8 @@ public class ExpressionAccumulationConstraintBasic extends ExpressionAccumulatio |
|
|
|
@Override |
|
|
|
public Vector<AccumulationFunction> getFunctions() { |
|
|
|
Vector<AccumulationFunction> ret = new Vector<AccumulationFunction>(); |
|
|
|
for(AccumulationTerm factor : terms) { |
|
|
|
ret.add(factor.getFunction()); |
|
|
|
for(AccumulationTerm term : terms) { |
|
|
|
ret.add(term.getFunction()); |
|
|
|
} |
|
|
|
return ret; |
|
|
|
} |
|
|
|
@ -74,14 +74,14 @@ public class ExpressionAccumulationConstraintBasic extends ExpressionAccumulatio |
|
|
|
} |
|
|
|
|
|
|
|
public ExpressionAccumulationConstraintBasic deepCopy() { |
|
|
|
ArrayList<AccumulationTerm> factorscopy = new ArrayList<AccumulationTerm>(); |
|
|
|
ArrayList<AccumulationTerm> termscopy = new ArrayList<AccumulationTerm>(); |
|
|
|
TemporalOperatorBound boundcopy = bound.deepCopy(); |
|
|
|
|
|
|
|
for (AccumulationTerm factor : terms) { |
|
|
|
factorscopy.add(factor.deepCopy()); |
|
|
|
for (AccumulationTerm term : terms) { |
|
|
|
termscopy.add(term.deepCopy()); |
|
|
|
} |
|
|
|
|
|
|
|
return new ExpressionAccumulationConstraintBasic(factorscopy,boundcopy); |
|
|
|
return new ExpressionAccumulationConstraintBasic(termscopy,boundcopy); |
|
|
|
} |
|
|
|
|
|
|
|
public String toString() |
|
|
|
@ -89,11 +89,11 @@ public class ExpressionAccumulationConstraintBasic extends ExpressionAccumulatio |
|
|
|
boolean first = true; |
|
|
|
String ret = ""; |
|
|
|
|
|
|
|
for (AccumulationTerm factor : terms) { |
|
|
|
for (AccumulationTerm term : terms) { |
|
|
|
if (!first) ret += " + "; |
|
|
|
first = false; |
|
|
|
|
|
|
|
ret += factor.toString(); |
|
|
|
ret += term.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
ret += bound.toString(); |
|
|
|
|