diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-17 03:22:53 +0000 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-17 03:22:53 +0000 |
commit | 75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5 (patch) | |
tree | 498ac06b4cf78568b807fafd2619856afff69c28 /omegalib/examples/hull | |
parent | 29efa7b1a0d089e02a70f73f348f11878955287c (diff) | |
download | chill-75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5.tar.gz chill-75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5.tar.bz2 chill-75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5.zip |
cmake build
Diffstat (limited to 'omegalib/examples/hull')
-rw-r--r-- | omegalib/examples/hull | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/omegalib/examples/hull b/omegalib/examples/hull new file mode 100644 index 0000000..dbb4d3c --- /dev/null +++ b/omegalib/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; |