Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: X10 2.0.0
-
Fix Version/s: None
-
Component/s: Class Library: Array Library
-
Labels:None
-
Number of attachments :
Description
Sometimes, Region.isConvex() — which should be renamed Region.isRectangular() — gives the wrong answer.
public class JRectangular { public static def main(argv:Rail[String]) { val R1 = (1..2) * (3..4); yes(R1.isConvex(), "Convex/Rectangular 1"); val R2 = (1..2) || (5..6); yes(!R2.isConvex(), "Convex/Rectangular 2"); val R3 = (3..4) || (7..8); yes(!R3.isConvex(), "Convex/Rectangular 3"); val R4 = R2 || R3; yes(R4.isConvex(), "Convex/Rectangular 4"); } static def yes(b:Boolean, s:String) { if (!b) x10.io.Console.OUT.println(s); } }
R4 is convex (being equal to 1..8), but isConvex() returns false for it.
Issue Links
- depends upon
-
XTENLANG-376
Array algebra operations not implemented
-
Setting fix target to next point release (2.0.2).