summaryrefslogtreecommitdiff
path: root/omega/examples/hull
diff options
context:
space:
mode:
authorDerick Huth <derickhuth@gmail.com>2014-10-06 12:42:34 -0600
committerDerick Huth <derickhuth@gmail.com>2014-10-06 12:42:34 -0600
commit8d73c8fcc75556c1df71dd39dd99783f8f86fc3e (patch)
tree157d627863d76a4c256a27cae27ce2e8566c7ea0 /omega/examples/hull
parente87b55ad69f0ac6211daae741b32c8ee9dcbe470 (diff)
parent8c646f24570079eac53e58fcf42d0d4fbc437ee3 (diff)
downloadchill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.gz
chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.bz2
chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.zip
Merge pull request #2 from dhuth/master
Moved omega into chill.
Diffstat (limited to 'omega/examples/hull')
-rw-r--r--omega/examples/hull102
1 files changed, 102 insertions, 0 deletions
diff --git a/omega/examples/hull b/omega/examples/hull
new file mode 100644
index 0000000..dbb4d3c
--- /dev/null
+++ b/omega/examples/hull
@@ -0,0 +1,102 @@
+# compare new SimpleHull with legacy hull methods
+
+symbolic m,n;
+
+r1 := {[i,j]: i>=0 && j>=0 && i+j<=1};
+r2 := {[i,j]: j>=0 && i<=1 && j<=i};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1 := {[i]:i<=n && n>=7};
+r2 := {[i]:i<=n-2 && n>=6};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1 := {[i,j]:0<=i,j<=2};
+r2 := {[i,j]:0<=i && 1<=j && i+j<=4};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1 := {[i,j]: 1<=i<=n && j=0};
+r2 := {[i,j]: 2<=i<=n+1 && j=1};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1 := {[i,j,k]: 1<=i<=n && j=0 && k=17i};
+r2 := {[i,j,k]: 2<=i<=n+5 && j=1 && k=17i+10};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1:={[x,y]:y<=x && y>=0 && y<=2-x};
+r2:={[x,y]:y>=0 && x<=2 && 2y<=x};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1 := {[i,j]: 0<=i<=1000 && 500<=j<=600};
+r2 := {[i,j]: 500<=i<=600 && 0<=j<=1000};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1:= {[t1,t2,t3,t4,t5] : 1+t4 = t3 && 32t1+1 <= t3 <= 499, 32t1+32 && 16t2+1 <= t5 <= 499, 16t2+16 && 0 <= t1 && 0 <= t2};
+r2:= {[t1,t2,t3,t4,t5] : t4 = t3 && 16t2 <= t5 <= 498, 16t2+15 && 32t1+1 <= t3 <= 499, 32t1+32 && 0 <= t1 && 0 <= t2 };
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r1:={[i]:i<=n && n<=100 && i>=m-10};
+r2:={[i]:i<=2n && n<=200 && i>=m};
+
+ConvexHull (r1 union r2);
+DecoupledConvexHull (r1 union r2);
+RectHull (r1 union r2);
+SimpleHull (r1 union r2);
+QuickHull (r1 union r2);
+Hull (r1 union r2);
+
+r:= {[1,1]} union {[2,2]} union {[3,3]} union {[4,4]};
+
+ConvexHull r;
+DecoupledConvexHull r;
+RectHull r;
+SimpleHull r;
+QuickHull r;
+Hull r;