passagemath-gap-pkg-cddinterface 10.6.23__cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-gap-pkg-cddinterface might be problematic. Click here for more details.

Files changed (60) hide show
  1. gap/pkg/cddinterface/Dockerfile +16 -0
  2. gap/pkg/cddinterface/LICENSE +344 -0
  3. gap/pkg/cddinterface/Makefile +14 -0
  4. gap/pkg/cddinterface/Makefile.gappkg +225 -0
  5. gap/pkg/cddinterface/Makefile.in +14 -0
  6. gap/pkg/cddinterface/PackageInfo.g +103 -0
  7. gap/pkg/cddinterface/README.md +140 -0
  8. gap/pkg/cddinterface/ToDo.txt +2 -0
  9. gap/pkg/cddinterface/autogen.sh +5 -0
  10. gap/pkg/cddinterface/bin/aarch64-unknown-linux-gnu-default64-kv9/CddInterface.so +0 -0
  11. gap/pkg/cddinterface/config.log +317 -0
  12. gap/pkg/cddinterface/config.status +989 -0
  13. gap/pkg/cddinterface/configure +4779 -0
  14. gap/pkg/cddinterface/configure.ac +84 -0
  15. gap/pkg/cddinterface/etc/download.sh +86 -0
  16. gap/pkg/cddinterface/examples/30x30.g +5 -0
  17. gap/pkg/cddinterface/examples/FourierProjection.g +83 -0
  18. gap/pkg/cddinterface/examples/comparing_polyhedrons.g +32 -0
  19. gap/pkg/cddinterface/examples/demo.g +65 -0
  20. gap/pkg/cddinterface/examples/example1.g +115 -0
  21. gap/pkg/cddinterface/examples/intersection.g +35 -0
  22. gap/pkg/cddinterface/examples/linear_programs.g +64 -0
  23. gap/pkg/cddinterface/examples/minkuwski.g +35 -0
  24. gap/pkg/cddinterface/examples/new.g +5 -0
  25. gap/pkg/cddinterface/examples/new2.g +8 -0
  26. gap/pkg/cddinterface/gap/Julia.gd +3 -0
  27. gap/pkg/cddinterface/gap/Julia.gi +15 -0
  28. gap/pkg/cddinterface/gap/polyhedra.gd +268 -0
  29. gap/pkg/cddinterface/gap/polyhedra.gi +871 -0
  30. gap/pkg/cddinterface/gap/tools.gd +12 -0
  31. gap/pkg/cddinterface/gap/tools.gi +472 -0
  32. gap/pkg/cddinterface/init.g +17 -0
  33. gap/pkg/cddinterface/install.sh +64 -0
  34. gap/pkg/cddinterface/makedoc.g +19 -0
  35. gap/pkg/cddinterface/notebook.ipynb +343 -0
  36. gap/pkg/cddinterface/read.g +12 -0
  37. gap/pkg/cddinterface/tst/01.tst +37 -0
  38. gap/pkg/cddinterface/tst/02.tst +36 -0
  39. gap/pkg/cddinterface/tst/03.tst +50 -0
  40. gap/pkg/cddinterface/tst/04.tst +51 -0
  41. gap/pkg/cddinterface/tst/05.tst +41 -0
  42. gap/pkg/cddinterface/tst/06.tst +44 -0
  43. gap/pkg/cddinterface/tst/07.tst +46 -0
  44. gap/pkg/cddinterface/tst/08.tst +66 -0
  45. gap/pkg/cddinterface/tst/09.tst +28 -0
  46. gap/pkg/cddinterface/tst/10.tst +56 -0
  47. gap/pkg/cddinterface/tst/11.tst +70 -0
  48. gap/pkg/cddinterface/tst/etest_1.tst +6 -0
  49. gap/pkg/cddinterface/tst/etest_2.tst +33 -0
  50. gap/pkg/cddinterface/tst/testall.g +10 -0
  51. passagemath_gap_pkg_cddinterface-10.6.23.dist-info/METADATA +92 -0
  52. passagemath_gap_pkg_cddinterface-10.6.23.dist-info/METADATA.bak +93 -0
  53. passagemath_gap_pkg_cddinterface-10.6.23.dist-info/RECORD +60 -0
  54. passagemath_gap_pkg_cddinterface-10.6.23.dist-info/WHEEL +7 -0
  55. passagemath_gap_pkg_cddinterface-10.6.23.dist-info/top_level.txt +1 -0
  56. passagemath_gap_pkg_cddinterface.libs/libcddgmp-ac579979.so.0.1.3 +0 -0
  57. passagemath_gap_pkg_cddinterface.libs/libgmp-93ebf16a.so.10.5.0 +0 -0
  58. sage/all__sagemath_gap_pkg_cddinterface.py +1 -0
  59. sage/libs/all__sagemath_gap_pkg_cddinterface.py +1 -0
  60. sage/libs/gap_pkg_cddinterface.cpython-312-aarch64-linux-gnu.so +0 -0
@@ -0,0 +1,343 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "# What is CddInterface\n",
8
+ "\n",
9
+ "Every convex polyhedron P has two representations, one as the intersection of finite halfspaces and the other as Minkowski sum of the convex hull of finite points and the nonnegative hull of finite directions. These are called H-representation and V-representation, respectively.\n",
10
+ "\n",
11
+ "CddInterface is a gap interface with the C package Cddlib which among other things can translate between H,V- representations of a polyhedron P and solve linear programming problems over P, i.e. a problem of maximizing and minimizing a linear function over P. A list of all available operations can be found in the manual.pdf."
12
+ ]
13
+ },
14
+ {
15
+ "cell_type": "markdown",
16
+ "metadata": {},
17
+ "source": [
18
+ "# H-representation of polyhedra\n",
19
+ "\n",
20
+ "Let $A$ be $m \\times d$ matrix and let $b$ be a column $m$-vector. The H-representation of the polyhedron defined by the system\n",
21
+ "$b+Ax \\geq 0$ of $m$ inequalities and $d$ variables $x= (x_1,\\dots,x_d)$ is as follows:\n",
22
+ "\n",
23
+ " H-representation\n",
24
+ " linearity t, [i_1, i_2, ...,i_t]\n",
25
+ " begin\n",
26
+ " m x (d+1) numbertype\n",
27
+ " b A\n",
28
+ " end\n",
29
+ "\n",
30
+ "The linearity line is added when we want to specify that some rows of the system $b+Ax$ are equalities.\n",
31
+ "That is, $k\\in \\{i_1, i_2, \\dots,i_t\\}$ means that the row $k$ of the system $b+Ax$ is specified to be equality.\n",
32
+ "\n",
33
+ "For example, the H-representation of the polyhedron defined by the following system:\n",
34
+ "\n",
35
+ "$$4-3x_1+6x_2-5x_4 = 0$$\n",
36
+ "$$1+2x_1-2x_2-7x_3 \\geq 0$$\n",
37
+ "$$-3x_2+5x_4 = 0$$\n",
38
+ "\n",
39
+ "is the following\n",
40
+ "\n",
41
+ " H-representation\n",
42
+ " linearity 2, [ 1, 3 ]\n",
43
+ " begin\n",
44
+ " 3 x 5 rational\n",
45
+ " \n",
46
+ " 4 -3 6 0 -5\n",
47
+ " 1 2 -2 -7 0\n",
48
+ " 0 0 -3 0 5\n",
49
+ " end\n"
50
+ ]
51
+ },
52
+ {
53
+ "cell_type": "code",
54
+ "execution_count": 10,
55
+ "metadata": {},
56
+ "outputs": [
57
+ {
58
+ "data": {
59
+ "text/plain": [
60
+ "true"
61
+ ]
62
+ },
63
+ "execution_count": 10,
64
+ "metadata": {
65
+ "text/plain": ""
66
+ },
67
+ "output_type": "execute_result"
68
+ }
69
+ ],
70
+ "source": [
71
+ "LoadPackage( \"CddInterface\" );"
72
+ ]
73
+ },
74
+ {
75
+ "cell_type": "code",
76
+ "execution_count": 22,
77
+ "metadata": {},
78
+ "outputs": [
79
+ {
80
+ "data": {
81
+ "text/plain": [
82
+ "<object>"
83
+ ]
84
+ },
85
+ "execution_count": 22,
86
+ "metadata": {
87
+ "text/plain": ""
88
+ },
89
+ "output_type": "execute_result"
90
+ }
91
+ ],
92
+ "source": [
93
+ "P1 := Cdd_PolyhedronByInequalities( [ [ 4, -3, 6, 0, -5 ], [ 1, 2, -2, -7, 0 ], [ 0, 0, -3, 0, 5 ] ], [ 1, 3 ] );"
94
+ ]
95
+ },
96
+ {
97
+ "cell_type": "code",
98
+ "execution_count": 23,
99
+ "metadata": {},
100
+ "outputs": [
101
+ {
102
+ "name": "stdout",
103
+ "output_type": "stream",
104
+ "text": [
105
+ "H-representation \n",
106
+ "linearity 2, [ 1, 3 ]\n",
107
+ "begin \n",
108
+ " 3 X 5 rational\n",
109
+ " \n",
110
+ " 4 -3 6 0 -5 \n",
111
+ " 1 2 -2 -7 0 \n",
112
+ " 0 0 -3 0 5 \n",
113
+ "end\n"
114
+ ]
115
+ }
116
+ ],
117
+ "source": [
118
+ "Display( P1 );"
119
+ ]
120
+ },
121
+ {
122
+ "cell_type": "markdown",
123
+ "metadata": {},
124
+ "source": [
125
+ "# V-representation of polyhedra\n",
126
+ "\n",
127
+ "Let $P$ be represented by $n$ gerating points and $s$ generating\n",
128
+ "directions (rays) as $$P = \\mathrm{conv}(v_1 , \\dots , v_n ) + \\mathrm{nonneg}(r_{1} , \\dots , r_{s} ).$$ Then the Polyhedra V-format is \n",
129
+ "for $P$ is:\n",
130
+ "\n",
131
+ " V-representation\n",
132
+ " linearity t, [i_1, i_2,...,i_t]\n",
133
+ " begin\n",
134
+ " (n+s) x (d+1) numbertype\n",
135
+ " 1 v_1\n",
136
+ " 1 v_2\n",
137
+ " ..\n",
138
+ " 1 v_n\n",
139
+ " 0 r_1\n",
140
+ " 0 r_2\n",
141
+ " ..\n",
142
+ " 0 r_s\n",
143
+ " end\n",
144
+ "\n",
145
+ "In the above format the generating points and generating rays may appear mixed in arbitrary order. \n",
146
+ "Linearity for V-representation specifies a subset of generators whose coefficients are relaxed to\n",
147
+ "be free. That is, $k \\in \\{i_1 , i_2 , . . . , i_t \\}$ specifies that the $k$-th generator is specified to be free.\n",
148
+ "This means for each such a ray $r_k$ , the line generated by $r_k$ is in the polyhedron,\n",
149
+ "and for each such a vertex $v_k$ , its coefficient is no longer nonnegative but still the coefficients for all\n",
150
+ "$v_i$’s must sum up to one.\n",
151
+ "\n",
152
+ "For example the V-representation of the polyhedron defined as \n",
153
+ " $$P:= \\mathrm{conv}(\\; (2,3), (-2,-3), (3,5)\\; ) + \\mathrm{nonneg}(\\; (1,2) , (-1,-2), (2,11)\\;)$$\n",
154
+ "\n",
155
+ "is the following\n",
156
+ "\n",
157
+ " V-representation\n",
158
+ " linearity 2, [1, 3]\n",
159
+ " begin\n",
160
+ " 4 x 3 rational\n",
161
+ " 1 2 3\n",
162
+ " 1 3 5\n",
163
+ " 0 1 2\n",
164
+ " 0 2 11\n",
165
+ " end\n",
166
+ " "
167
+ ]
168
+ },
169
+ {
170
+ "cell_type": "code",
171
+ "execution_count": 24,
172
+ "metadata": {},
173
+ "outputs": [
174
+ {
175
+ "data": {
176
+ "text/plain": [
177
+ "<object>"
178
+ ]
179
+ },
180
+ "execution_count": 24,
181
+ "metadata": {
182
+ "text/plain": ""
183
+ },
184
+ "output_type": "execute_result"
185
+ }
186
+ ],
187
+ "source": [
188
+ "P2 := Cdd_PolyhedronByGenerators( [ [ 1, 2, 3 ], [ 1, 3, 5 ], [ 0, 1, 2 ], [ 0, 2, 11 ] ], [ 1, 3] );"
189
+ ]
190
+ },
191
+ {
192
+ "cell_type": "code",
193
+ "execution_count": 25,
194
+ "metadata": {},
195
+ "outputs": [
196
+ {
197
+ "name": "stdout",
198
+ "output_type": "stream",
199
+ "text": [
200
+ "V-representation \n",
201
+ "linearity 2, [ 1, 3 ]\n",
202
+ "begin \n",
203
+ " 4 X 3 rational\n",
204
+ " \n",
205
+ " 1 2 3 \n",
206
+ " 1 3 5 \n",
207
+ " 0 1 2 \n",
208
+ " 0 2 11 \n",
209
+ "end\n"
210
+ ]
211
+ }
212
+ ],
213
+ "source": [
214
+ "Display( P2 );"
215
+ ]
216
+ },
217
+ {
218
+ "cell_type": "markdown",
219
+ "metadata": {},
220
+ "source": [
221
+ "# H-Representation $\\leftrightarrow$ V-Representation\n",
222
+ "\n",
223
+ "The V-representation of a polyhedron can be computed via the command `Cdd_V_Rep` and the H-representation via the command `Cdd_H_Rep`."
224
+ ]
225
+ },
226
+ {
227
+ "cell_type": "code",
228
+ "execution_count": 26,
229
+ "metadata": {},
230
+ "outputs": [
231
+ {
232
+ "data": {
233
+ "text/plain": [
234
+ "<object>"
235
+ ]
236
+ },
237
+ "execution_count": 26,
238
+ "metadata": {
239
+ "text/plain": ""
240
+ },
241
+ "output_type": "execute_result"
242
+ }
243
+ ],
244
+ "source": [
245
+ "vP1 := Cdd_V_Rep( P1 );"
246
+ ]
247
+ },
248
+ {
249
+ "cell_type": "code",
250
+ "execution_count": 27,
251
+ "metadata": {},
252
+ "outputs": [
253
+ {
254
+ "name": "stdout",
255
+ "output_type": "stream",
256
+ "text": [
257
+ "V-representation \n",
258
+ "linearity 1, [ 3 ]\n",
259
+ "begin \n",
260
+ " 3 X 5 rational\n",
261
+ " \n",
262
+ " 1 4/3 0 11/21 0 \n",
263
+ " 0 0 0 -1 0 \n",
264
+ " 0 5 5 0 3 \n",
265
+ "end\n"
266
+ ]
267
+ }
268
+ ],
269
+ "source": [
270
+ "Display( vP1 );"
271
+ ]
272
+ },
273
+ {
274
+ "cell_type": "code",
275
+ "execution_count": 28,
276
+ "metadata": {},
277
+ "outputs": [
278
+ {
279
+ "data": {
280
+ "text/plain": [
281
+ "<object>"
282
+ ]
283
+ },
284
+ "execution_count": 28,
285
+ "metadata": {
286
+ "text/plain": ""
287
+ },
288
+ "output_type": "execute_result"
289
+ }
290
+ ],
291
+ "source": [
292
+ "hP2 := Cdd_H_Rep( P2 );"
293
+ ]
294
+ },
295
+ {
296
+ "cell_type": "code",
297
+ "execution_count": 29,
298
+ "metadata": {},
299
+ "outputs": [
300
+ {
301
+ "name": "stdout",
302
+ "output_type": "stream",
303
+ "text": [
304
+ "H-representation \n",
305
+ "begin \n",
306
+ " 1 X 3 rational\n",
307
+ " \n",
308
+ " 1 -2 1 \n",
309
+ "end\n"
310
+ ]
311
+ }
312
+ ],
313
+ "source": [
314
+ "Display( hP2 );"
315
+ ]
316
+ },
317
+ {
318
+ "cell_type": "code",
319
+ "execution_count": null,
320
+ "metadata": {},
321
+ "outputs": [],
322
+ "source": []
323
+ }
324
+ ],
325
+ "metadata": {
326
+ "kernelspec": {
327
+ "display_name": "GAP 4",
328
+ "language": "gap",
329
+ "name": "gap-4"
330
+ },
331
+ "language_info": {
332
+ "codemirror_mode": "gap",
333
+ "file_extension": ".g",
334
+ "mimetype": "text/x-gap",
335
+ "name": "GAP 4",
336
+ "nbconvert_exporter": "",
337
+ "pygments_lexer": "gap",
338
+ "version": "4.dev"
339
+ }
340
+ },
341
+ "nbformat": 4,
342
+ "nbformat_minor": 2
343
+ }
@@ -0,0 +1,12 @@
1
+ #
2
+ # CddInterface: Gap interface to Cdd package
3
+ #
4
+ # Reading the implementation part of the package.
5
+ #
6
+ ReadPackage( "CddInterface", "gap/polyhedra.gi");
7
+ ReadPackage( "CddInterface", "gap/tools.gi");
8
+
9
+ if IsPackageMarkedForLoading( "JuliaInterface", ">= 0.2" ) and
10
+ IsPackageMarkedForLoading( "ToolsForHomalg", ">= 2020.05.12" ) then
11
+ ReadPackage( "CddInterface", "gap/Julia.gi");
12
+ fi;
@@ -0,0 +1,37 @@
1
+ # CddInterface, single 1
2
+ #
3
+ # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
4
+ #
5
+ # This file has been generated by AutoDoc. It contains examples extracted from
6
+ # the package documentation. Each example is preceded by a comment which gives
7
+ # the name of a GAPDoc XML file and a line range from which the example were
8
+ # taken. Note that the XML file in turn may have been generated by AutoDoc
9
+ # from some other input.
10
+ #
11
+ gap> START_TEST( "cddinterface01.tst");
12
+
13
+ # doc/_Chunks.xml:91-113
14
+ gap> A:= Cdd_PolyhedronByInequalities( [ [ 0, 1, 0 ], [ 0, 1, -1 ] ] );
15
+ <Polyhedron given by its H-representation>
16
+ gap> Display( A );
17
+ H-representation
18
+ begin
19
+ 2 X 3 rational
20
+
21
+ 0 1 0
22
+ 0 1 -1
23
+ end
24
+ gap> B:= Cdd_PolyhedronByInequalities( [ [ 0, 1, 0 ], [ 0, 1, -1 ] ], [ 2 ] );
25
+ <Polyhedron given by its H-representation>
26
+ gap> Display( B );
27
+ H-representation
28
+ linearity 1, [ 2 ]
29
+ begin
30
+ 2 X 3 rational
31
+
32
+ 0 1 0
33
+ 0 1 -1
34
+ end
35
+
36
+ #
37
+ gap> STOP_TEST("cddinterface01.tst", 1 );
@@ -0,0 +1,36 @@
1
+ # CddInterface, single 2
2
+ #
3
+ # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
4
+ #
5
+ # This file has been generated by AutoDoc. It contains examples extracted from
6
+ # the package documentation. Each example is preceded by a comment which gives
7
+ # the name of a GAPDoc XML file and a line range from which the example were
8
+ # taken. Note that the XML file in turn may have been generated by AutoDoc
9
+ # from some other input.
10
+ #
11
+ gap> START_TEST( "cddinterface02.tst");
12
+
13
+ # doc/_Chunks.xml:119-140
14
+ gap> A:= Cdd_PolyhedronByGenerators( [ [ 0, 1, 3 ], [ 1, 4, 5 ] ] );
15
+ <Polyhedron given by its V-representation>
16
+ gap> Display( A );
17
+ V-representation
18
+ begin
19
+ 2 X 3 rational
20
+
21
+ 0 1 3
22
+ 1 4 5
23
+ end
24
+ gap> B:= Cdd_PolyhedronByGenerators( [ [ 0, 1, 3 ] ], [ 1 ] );
25
+ <Polyhedron given by its V-representation>
26
+ gap> Display( B );
27
+ V-representation
28
+ linearity 1, [ 1 ]
29
+ begin
30
+ 1 X 3 rational
31
+
32
+ 0 1 3
33
+ end
34
+
35
+ #
36
+ gap> STOP_TEST("cddinterface02.tst", 1 );
@@ -0,0 +1,50 @@
1
+ # CddInterface, single 3
2
+ #
3
+ # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
4
+ #
5
+ # This file has been generated by AutoDoc. It contains examples extracted from
6
+ # the package documentation. Each example is preceded by a comment which gives
7
+ # the name of a GAPDoc XML file and a line range from which the example were
8
+ # taken. Note that the XML file in turn may have been generated by AutoDoc
9
+ # from some other input.
10
+ #
11
+ gap> START_TEST( "cddinterface03.tst");
12
+
13
+ # doc/_Chunks.xml:149-184
14
+ gap> P := Cdd_PolyhedronByGenerators( [ [ 1, 1, 2 ], [ 1, 4, 5 ] ] );
15
+ <Polyhedron given by its V-representation>
16
+ gap> H := Cdd_H_Rep( P );
17
+ <Polyhedron given by its H-representation>
18
+ gap> Display( H );
19
+ H-representation
20
+ linearity 1, [ 3 ]
21
+ begin
22
+ 3 X 3 rational
23
+
24
+ 4 -1 0
25
+ -1 1 0
26
+ -1 -1 1
27
+ end
28
+ gap> P_x1 := Cdd_FourierProjection( H, 2);
29
+ <Polyhedron given by its H-representation>
30
+ gap> Display( P_x1 );
31
+ H-representation
32
+ linearity 1, [ 3 ]
33
+ begin
34
+ 3 X 3 rational
35
+
36
+ 4 -1 0
37
+ -1 1 0
38
+ 0 0 1
39
+ end
40
+ gap> Display( Cdd_V_Rep( P_x1 ) );
41
+ V-representation
42
+ begin
43
+ 2 X 3 rational
44
+
45
+ 1 1 0
46
+ 1 4 0
47
+ end
48
+
49
+ #
50
+ gap> STOP_TEST("cddinterface03.tst", 1 );
@@ -0,0 +1,51 @@
1
+ # CddInterface, single 4
2
+ #
3
+ # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
4
+ #
5
+ # This file has been generated by AutoDoc. It contains examples extracted from
6
+ # the package documentation. Each example is preceded by a comment which gives
7
+ # the name of a GAPDoc XML file and a line range from which the example were
8
+ # taken. Note that the XML file in turn may have been generated by AutoDoc
9
+ # from some other input.
10
+ #
11
+ gap> START_TEST( "cddinterface04.tst");
12
+
13
+ # doc/_Chunks.xml:188-224
14
+ gap> Q := Cdd_PolyhedronByGenerators( [ [ 1, 2, 3, 4 ],[ 1, 2, 4, 5 ], [ 0, 1, 1, 1 ] ] );
15
+ <Polyhedron given by its V-representation>
16
+ gap> R := Cdd_H_Rep( Q );
17
+ <Polyhedron given by its H-representation>
18
+ gap> Display( R );
19
+ H-representation
20
+ linearity 1, [ 4 ]
21
+ begin
22
+ 4 X 4 rational
23
+
24
+ 2 1 -1 0
25
+ -2 1 0 0
26
+ -1 -1 1 0
27
+ -1 0 -1 1
28
+ end
29
+ gap> P_x2_x3 := Cdd_FourierProjection( R, 1);
30
+ <Polyhedron given by its H-representation>
31
+ gap> Display( P_x2_x3 );
32
+ H-representation
33
+ linearity 2, [ 1, 3 ]
34
+ begin
35
+ 3 X 4 rational
36
+
37
+ -1 0 -1 1
38
+ -3 0 1 0
39
+ 0 1 0 0
40
+ end
41
+ gap> Display( Cdd_V_Rep( last ) ) ;
42
+ V-representation
43
+ begin
44
+ 2 X 4 rational
45
+
46
+ 0 0 1 1
47
+ 1 0 3 4
48
+ end
49
+
50
+ #
51
+ gap> STOP_TEST("cddinterface04.tst", 1 );
@@ -0,0 +1,41 @@
1
+ # CddInterface, single 5
2
+ #
3
+ # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
4
+ #
5
+ # This file has been generated by AutoDoc. It contains examples extracted from
6
+ # the package documentation. Each example is preceded by a comment which gives
7
+ # the name of a GAPDoc XML file and a line range from which the example were
8
+ # taken. Note that the XML file in turn may have been generated by AutoDoc
9
+ # from some other input.
10
+ #
11
+ gap> START_TEST( "cddinterface05.tst");
12
+
13
+ # doc/_Chunks.xml:230-256
14
+ gap> A := Cdd_PolyhedronByInequalities( [ [ 10, -1, 1, 0 ],
15
+ > [ -24, 9, 2, 0 ], [ 1, 1, -1, 0 ], [ -23, -12, 1, 11 ] ], [ 4 ] );
16
+ <Polyhedron given by its H-representation>
17
+ gap> B := Cdd_PolyhedronByInequalities( [ [ 1, 0, 0, 0 ],
18
+ > [ -4, 1, 0, 0 ], [ 10, -1, 1, 0 ], [ -3, -1, 0, 1 ] ], [ 3, 4 ] );
19
+ <Polyhedron given by its H-representation>
20
+ gap> Cdd_IsContained( B, A );
21
+ true
22
+ gap> Display( Cdd_V_Rep( A ) );
23
+ V-representation
24
+ begin
25
+ 3 X 4 rational
26
+
27
+ 1 2 3 4
28
+ 1 4 -6 7
29
+ 0 1 1 1
30
+ end
31
+ gap> Display( Cdd_V_Rep( B ) );
32
+ V-representation
33
+ begin
34
+ 2 X 4 rational
35
+
36
+ 1 4 -6 7
37
+ 0 1 1 1
38
+ end
39
+
40
+ #
41
+ gap> STOP_TEST("cddinterface05.tst", 1 );
@@ -0,0 +1,44 @@
1
+ # CddInterface, single 6
2
+ #
3
+ # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
4
+ #
5
+ # This file has been generated by AutoDoc. It contains examples extracted from
6
+ # the package documentation. Each example is preceded by a comment which gives
7
+ # the name of a GAPDoc XML file and a line range from which the example were
8
+ # taken. Note that the XML file in turn may have been generated by AutoDoc
9
+ # from some other input.
10
+ #
11
+ gap> START_TEST( "cddinterface06.tst");
12
+
13
+ # doc/_Chunks.xml:2-31
14
+ gap> A := Cdd_PolyhedronByInequalities( [ [ 3, 4, 5 ] ], [ 1 ] );;
15
+ gap> B := Cdd_PolyhedronByInequalities( [ [ 9, 7, 2 ] ], [ 1 ] );;
16
+ gap> C := Cdd_Intersection( A, B );;
17
+ gap> Display( Cdd_V_Rep( A ) );
18
+ V-representation
19
+ linearity 1, [ 2 ]
20
+ begin
21
+ 2 X 3 rational
22
+
23
+ 1 -3/4 0
24
+ 0 -5 4
25
+ end
26
+ gap> Display( Cdd_V_Rep( B ) );
27
+ V-representation
28
+ linearity 1, [ 2 ]
29
+ begin
30
+ 2 X 3 rational
31
+
32
+ 1 -9/7 0
33
+ 0 -2 7
34
+ end
35
+ gap> Display( Cdd_V_Rep( C ) );
36
+ V-representation
37
+ begin
38
+ 1 X 3 rational
39
+
40
+ 1 -13/9 5/9
41
+ end
42
+
43
+ #
44
+ gap> STOP_TEST("cddinterface06.tst", 1 );
@@ -0,0 +1,46 @@
1
+ # CddInterface, single 7
2
+ #
3
+ # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
4
+ #
5
+ # This file has been generated by AutoDoc. It contains examples extracted from
6
+ # the package documentation. Each example is preceded by a comment which gives
7
+ # the name of a GAPDoc XML file and a line range from which the example were
8
+ # taken. Note that the XML file in turn may have been generated by AutoDoc
9
+ # from some other input.
10
+ #
11
+ gap> START_TEST( "cddinterface07.tst");
12
+
13
+ # doc/_Chunks.xml:262-293
14
+ gap> P := Cdd_PolyhedronByGenerators( [ [ 1, 2, 5 ], [ 0, 1, 2 ] ] );
15
+ < Polyhedron given by its V-representation >
16
+ gap> Q := Cdd_PolyhedronByGenerators( [ [ 1, 4, 6 ], [ 1, 3, 7 ], [ 0, 3, 1 ] ] );
17
+ < Polyhedron given by its V-representation >
18
+ gap> S := P+Q;
19
+ < Polyhedron given by its H-representation >
20
+ gap> V := Cdd_V_Rep( S );
21
+ < Polyhedron given by its V-representation >
22
+ gap> Display( V );
23
+ V-representation
24
+ begin
25
+ 4 X 3 rational
26
+
27
+ 0 3 1
28
+ 1 6 11
29
+ 1 5 12
30
+ 0 1 2
31
+ end
32
+ gap> Cdd_GeneratingVertices( P );
33
+ [ [ 2, 5 ] ]
34
+ gap> Cdd_GeneratingVertices( Q );
35
+ [ [ 3, 7 ], [ 4, 6 ] ]
36
+ gap> Cdd_GeneratingVertices( S );
37
+ [ [ 5, 12 ], [ 6, 11 ] ]
38
+ gap> Cdd_GeneratingRays( P );
39
+ [ [ 1, 2 ] ]
40
+ gap> Cdd_GeneratingRays( Q );
41
+ [ [ 3, 1 ] ]
42
+ gap> Cdd_GeneratingRays( S );
43
+ [ [ 1, 2 ], [ 3, 1 ] ]
44
+
45
+ #
46
+ gap> STOP_TEST("cddinterface07.tst", 1 );