Browse Source

imported patch rewardcounter-IntegerBounds.isInBoundForConjunction.patch

tud-infrastructure-2018-10-12
Joachim Klein 7 years ago
parent
commit
2e75bec749
  1. 11
      prism/src/prism/IntegerBound.java

11
prism/src/prism/IntegerBound.java

@ -270,6 +270,17 @@ public class IntegerBound
return saturation; return saturation;
} }
/**
* Returns {@code true} iff {@code value} is in bound for all {@code bounds}
*/
public static boolean isInBoundForConjunction(List<IntegerBound> bounds, int value) {
boolean in_bound = true;
for (IntegerBound bound : bounds) {
in_bound &= bound.isInBounds(value);
}
return in_bound;
}
public static void main(String args[]) public static void main(String args[])
{ {
System.out.println(new IntegerBound(1, true, 3, false)); System.out.println(new IntegerBound(1, true, 3, false));

Loading…
Cancel
Save