public int compare(LogicalExpression e1, LogicalExpression e2) { return e1.getCumulativeCost() <= e2.getCumulativeCost() ? -1 : 1; } };
@Override public int getCumulativeCost() { // return the average cost of operands for a boolean "and" | "or" int cost = this.getSelfCost(); int i = 0; for (LogicalExpression e : this) { cost += e.getCumulativeCost(); i++; } return cost / i; }
@Override public int getCumulativeCost() { // return the average cost of operands for a boolean "and" | "or" int cost = this.getSelfCost(); int i = 0; for (LogicalExpression e : this) { cost += e.getCumulativeCost(); i++; } return cost / i; }
@Override @JsonIgnore public int getCumulativeCost() { int cost = this.getSelfCost(); for (LogicalExpression e : this) { cost += e.getCumulativeCost(); } return cost; }
public int compare(LogicalExpression e1, LogicalExpression e2) { return e1.getCumulativeCost() <= e2.getCumulativeCost() ? -1 : 1; } };
@Override public int getCumulativeCost() { int cost = this.getSelfCost(); for (LogicalExpression arg : this.args) { cost += arg.getCumulativeCost(); } return cost; }
@Override public int getCumulativeCost() { // return the average cost of operands for a boolean "and" | "or" int cost = this.getSelfCost(); int i = 0; for (LogicalExpression e : this) { cost += e.getCumulativeCost(); i++; } return cost / i; }
@Override @JsonIgnore public int getCumulativeCost() { int cost = this.getSelfCost(); for (LogicalExpression e : this) { cost += e.getCumulativeCost(); } return cost; }
@Override public int getCumulativeCost() { // return the average cost of operands for a boolean "and" | "or" int cost = this.getSelfCost(); int i = 0; for (LogicalExpression e : this) { cost += e.getCumulativeCost(); i++; } return cost / i; }