passagemath-gap-pkg-cddinterface 10.6.40__cp311-cp311-macosx_13_0_x86_64.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.
Files changed (51) hide show
  1. gap/pkg/cddinterface/LICENSE +344 -0
  2. gap/pkg/cddinterface/PackageInfo.g +103 -0
  3. gap/pkg/cddinterface/README.md +129 -0
  4. gap/pkg/cddinterface/ToDo.txt +2 -0
  5. gap/pkg/cddinterface/bin/x86_64-apple-darwin24-default64-kv10/CddInterface.so +0 -0
  6. gap/pkg/cddinterface/etc/download.sh +86 -0
  7. gap/pkg/cddinterface/examples/30x30.g +5 -0
  8. gap/pkg/cddinterface/examples/FourierProjection.g +83 -0
  9. gap/pkg/cddinterface/examples/comparing_polyhedrons.g +32 -0
  10. gap/pkg/cddinterface/examples/demo.g +65 -0
  11. gap/pkg/cddinterface/examples/example1.g +115 -0
  12. gap/pkg/cddinterface/examples/intersection.g +35 -0
  13. gap/pkg/cddinterface/examples/linear_programs.g +64 -0
  14. gap/pkg/cddinterface/examples/minkuwski.g +35 -0
  15. gap/pkg/cddinterface/examples/new.g +5 -0
  16. gap/pkg/cddinterface/examples/new2.g +8 -0
  17. gap/pkg/cddinterface/gap/Julia.gd +3 -0
  18. gap/pkg/cddinterface/gap/Julia.gi +15 -0
  19. gap/pkg/cddinterface/gap/polyhedra.gd +268 -0
  20. gap/pkg/cddinterface/gap/polyhedra.gi +871 -0
  21. gap/pkg/cddinterface/gap/tools.gd +12 -0
  22. gap/pkg/cddinterface/gap/tools.gi +472 -0
  23. gap/pkg/cddinterface/init.g +17 -0
  24. gap/pkg/cddinterface/install.sh +64 -0
  25. gap/pkg/cddinterface/makedoc.g +19 -0
  26. gap/pkg/cddinterface/read.g +12 -0
  27. gap/pkg/cddinterface/tst/01.tst +37 -0
  28. gap/pkg/cddinterface/tst/02.tst +36 -0
  29. gap/pkg/cddinterface/tst/03.tst +50 -0
  30. gap/pkg/cddinterface/tst/04.tst +51 -0
  31. gap/pkg/cddinterface/tst/05.tst +41 -0
  32. gap/pkg/cddinterface/tst/06.tst +44 -0
  33. gap/pkg/cddinterface/tst/07.tst +46 -0
  34. gap/pkg/cddinterface/tst/08.tst +66 -0
  35. gap/pkg/cddinterface/tst/09.tst +28 -0
  36. gap/pkg/cddinterface/tst/10.tst +56 -0
  37. gap/pkg/cddinterface/tst/11.tst +70 -0
  38. gap/pkg/cddinterface/tst/etest_1.tst +6 -0
  39. gap/pkg/cddinterface/tst/etest_2.tst +33 -0
  40. gap/pkg/cddinterface/tst/testall.g +10 -0
  41. passagemath_gap_pkg_cddinterface/.dylibs/libcddgmp.0.dylib +0 -0
  42. passagemath_gap_pkg_cddinterface/.dylibs/libgmp.10.dylib +0 -0
  43. passagemath_gap_pkg_cddinterface/__init__.py +3 -0
  44. passagemath_gap_pkg_cddinterface-10.6.40.dist-info/METADATA +93 -0
  45. passagemath_gap_pkg_cddinterface-10.6.40.dist-info/METADATA.bak +94 -0
  46. passagemath_gap_pkg_cddinterface-10.6.40.dist-info/RECORD +51 -0
  47. passagemath_gap_pkg_cddinterface-10.6.40.dist-info/WHEEL +6 -0
  48. passagemath_gap_pkg_cddinterface-10.6.40.dist-info/top_level.txt +2 -0
  49. sage/all__sagemath_gap_pkg_cddinterface.py +1 -0
  50. sage/libs/all__sagemath_gap_pkg_cddinterface.py +1 -0
  51. sage/libs/gap_pkg_cddinterface.cpython-311-darwin.so +0 -0
@@ -0,0 +1,12 @@
1
+ DeclareOperation("PTM", [ IsMatrix ] );
2
+ DeclareOperation( "IsCompatiblePolyhedronList", [IsList] );
3
+ DeclareOperation( "GiveGeneratingVerticesAndGeneratingRays", [ IsList, IsList ] );
4
+ DeclareOperation( "GiveInequalitiesAndEqualities", [ IsList, IsList ] );
5
+ DeclareOperation( "LcmOfDenominatorRatInList", [IsList] );
6
+ DeclareOperation( "CanonicalizeList", [IsList, IsInt] );
7
+ DeclareGlobalFunction( "LIST_TO_CDD_POLYHEDRON" );
8
+ DeclareAttribute( "CDD_POLYHEDRON_TO_LIST", IsCddPolyhedron );
9
+ DeclareOperation( "GetRidOfLinearity", [ IsCddPolyhedron ] );
10
+ DeclareOperation( "LinearProgramToList", [ IsCddLinearProgram ] );
11
+ DeclareGlobalFunction( "NumberOfDigitsOfTheNumber" );
12
+ DeclareGlobalFunction( "CanonicalizeListOfFacesAndInteriorPoints" );
@@ -0,0 +1,472 @@
1
+ InstallGlobalFunction( NumberOfDigitsOfTheNumber,
2
+ function(a)
3
+
4
+ return Length( String( a ) );
5
+
6
+ end);
7
+
8
+ # this functions prints a matrix in good form
9
+ InstallMethod( PTM,
10
+ [ IsMatrix ],
11
+ function( matrix )
12
+ local i,j,m,t,n;
13
+
14
+ m := 1;
15
+
16
+ n := 1;
17
+
18
+ for i in [ 1 .. Length( matrix ) ] do
19
+
20
+ if n < NumberOfDigitsOfTheNumber( matrix[ i ][ 1 ] ) then
21
+
22
+ n:= NumberOfDigitsOfTheNumber( matrix[ i ][ 1 ] );
23
+
24
+ fi;
25
+
26
+ od;
27
+
28
+ for i in [ 1 .. Length( matrix ) ] do
29
+
30
+ for j in [ 1 .. Length( matrix[ 1 ] ) ] do
31
+
32
+ if m < NumberOfDigitsOfTheNumber( matrix[ i ][ j ] ) then
33
+
34
+ m := NumberOfDigitsOfTheNumber( matrix[ i ][ j ] );
35
+
36
+ fi;
37
+
38
+ od;
39
+
40
+ od;
41
+
42
+ Print(" ");
43
+
44
+ for i in [ 1 .. Length( matrix[ 1 ] ) * ( m + 2 ) - 2 ] do
45
+
46
+ Print(" ");
47
+
48
+ od;
49
+
50
+ Print( " ", "\n" );
51
+
52
+ for i in [ 1 .. Length( matrix ) ] do
53
+
54
+ Print( " " );
55
+
56
+ for j in [ 1 .. Length( matrix[ 1 ] ) ] do
57
+
58
+ if j=1 then
59
+
60
+ for t in [ 1 .. n - NumberOfDigitsOfTheNumber( matrix[ i ][ j ] ) ] do
61
+
62
+ Print( " " );
63
+
64
+ od;
65
+
66
+ else
67
+
68
+ for t in [ 1 .. m + 2 - NumberOfDigitsOfTheNumber( matrix[ i ][ j ] ) ] do
69
+
70
+ Print(" ");
71
+
72
+ od;
73
+
74
+ fi;
75
+
76
+ Print( matrix[ i ][ j ] );
77
+
78
+ od;
79
+
80
+ Print(" ","\n");
81
+
82
+ od;
83
+
84
+ end );
85
+
86
+ ##
87
+ InstallMethod( IsCompatiblePolyhedronList,
88
+ [ IsList ],
89
+
90
+ function ( list )
91
+ local i;
92
+
93
+ if not ForAll( [1,4,5], i -> list[i] in NonnegativeIntegers) then
94
+ Error( "The first five entries must be non-negative integers" );
95
+ fi;
96
+
97
+ if not( IsList( list[6]) and IsList( list[7] ) ) then
98
+
99
+ Error( "The last two arguments should be lists" );
100
+
101
+ fi;
102
+
103
+ if not IsEmpty( list[ 7 ] ) then
104
+
105
+ if NrRows( list[ 7 ] ) <> list[ 4 ] then
106
+
107
+ Error( "The matrix has the wrong number of rows" );
108
+
109
+ fi;
110
+
111
+ if NrCols( list[ 7 ] ) <> list[ 5 ] then
112
+
113
+ Error( "The matrix has the wrong number of columns" );
114
+
115
+ fi;
116
+
117
+ fi;
118
+
119
+ for i in list[ 6 ] do
120
+
121
+ if i > list[ 4 ] then
122
+
123
+ Error( "The linearity is not compatible" );
124
+
125
+ fi;
126
+
127
+ od;
128
+
129
+ return true;
130
+
131
+ end );
132
+
133
+ ##
134
+ InstallMethod( LcmOfDenominatorRatInList,
135
+ [ IsList ],
136
+
137
+ function( list )
138
+
139
+ return Lcm( List( list, DenominatorRat ) );
140
+
141
+ end );
142
+
143
+ ##
144
+ InstallGlobalFunction( LIST_TO_CDD_POLYHEDRON,
145
+ function( arg )
146
+ local numtype, matrix, L, temp1, temp2, temp3, temp4, p, i;
147
+
148
+ matrix := arg[ 5 ];
149
+
150
+ if not IsEmpty( matrix ) and NrRows( matrix ) > 0 then
151
+
152
+ matrix := CanonicalizeList( matrix, arg[ 1 ] );
153
+
154
+ fi;
155
+
156
+ if arg[ 1 ] = 2 then
157
+
158
+ temp2 := GiveGeneratingVerticesAndGeneratingRays( matrix, [ ] )[ 1 ];
159
+
160
+ if temp2 = [ List( [ 2 .. arg[ 3 ] ], i -> 0 ) ] and
161
+ not NrRows( matrix ) = 1 then
162
+
163
+ temp3 := StructuralCopy( matrix );
164
+
165
+ temp4 := StructuralCopy( arg[ 4 ] );
166
+
167
+ temp1 := [ 1 ];
168
+
169
+ Append( temp1, temp2[ 1 ] );
170
+
171
+ p := Position( temp3, temp1 );
172
+
173
+ Remove( temp3, p );
174
+
175
+ for i in [ p..Length( temp4 ) ] do
176
+ temp4[ i ]:= temp4[ i ] - 1;
177
+ od;
178
+
179
+ if Length( arg[ 4 ] ) = 0 then
180
+
181
+ return Cdd_PolyhedronByGenerators( temp3 );
182
+
183
+ else
184
+
185
+ return Cdd_PolyhedronByGenerators( temp3 , temp4 );
186
+
187
+ fi;
188
+
189
+ fi;
190
+
191
+ if Length( arg[ 4 ] ) = 0 then
192
+
193
+ return Cdd_PolyhedronByGenerators( matrix );
194
+
195
+ else
196
+
197
+ return Cdd_PolyhedronByGenerators( matrix , arg[ 4 ] );
198
+
199
+ fi;
200
+
201
+ else
202
+
203
+ if arg[ 2 ] = 0 then
204
+
205
+ L := ListWithIdenticalEntries( arg[ 3 ], 0 );
206
+ L[ 1 ] := 1;
207
+ return Cdd_PolyhedronByInequalities( [ L ] );
208
+
209
+ fi;
210
+
211
+ if Length( arg[ 4 ] ) = 0 then
212
+
213
+ return Cdd_PolyhedronByInequalities( matrix );
214
+
215
+ else
216
+
217
+ return Cdd_PolyhedronByInequalities( matrix , arg[ 4 ] );
218
+
219
+ fi;
220
+
221
+ fi;
222
+
223
+ end );
224
+
225
+ ##
226
+ InstallMethod( CDD_POLYHEDRON_TO_LIST,
227
+ [ IsCddPolyhedron ],
228
+ function( poly )
229
+ local L, matrix, lin, temp;
230
+
231
+ L := [ ];
232
+
233
+ if (poly!.rep_type = "H-rep" ) then
234
+ L[ 1 ] := 1;
235
+ else
236
+ L[ 1 ] := 2;
237
+ fi;
238
+
239
+ matrix := poly!.matrix;
240
+
241
+ L[ 2 ] := NrRows( matrix );
242
+ L[ 3 ] := NrCols( matrix );
243
+ L[ 4 ] := poly!.linearity;
244
+ L[ 5 ] := matrix;
245
+ L[ 6 ] := 0;
246
+ L[ 7 ] := [ ];
247
+
248
+ return L;
249
+
250
+ end );
251
+
252
+ ##
253
+ InstallMethod( CanonicalizeList,
254
+ [ IsList, IsInt ],
255
+
256
+ function( matrix, rep )
257
+ local res, i;
258
+
259
+ res:= [ ];
260
+
261
+ if rep = 1 then
262
+
263
+ for i in [ 1.. Length( matrix ) ] do
264
+
265
+ if not IsZero( matrix[ i ] ) then
266
+
267
+ res[ i ] := LcmOfDenominatorRatInList( matrix[ i ] )*
268
+ matrix[ i ] / Iterated(
269
+ LcmOfDenominatorRatInList( matrix[ i ] )*matrix[ i ], Gcd
270
+ );
271
+
272
+ else
273
+
274
+ res[ i ] := matrix[ i ];
275
+
276
+ fi;
277
+
278
+ od;
279
+
280
+ return res;
281
+
282
+ fi;
283
+
284
+ for i in [ 1.. Length( matrix ) ] do
285
+
286
+ if matrix[ i ][ 1 ] = 0 then
287
+
288
+ res[ i ]:= LcmOfDenominatorRatInList( matrix[ i ] )*
289
+ matrix[ i ] / Iterated(
290
+ LcmOfDenominatorRatInList( matrix[ i ] )*matrix[ i ], Gcd
291
+ );
292
+
293
+ else
294
+
295
+ res[ i ] := matrix[ i ];
296
+
297
+ fi;
298
+
299
+ od;
300
+
301
+ return res;
302
+
303
+ end );
304
+
305
+ InstallMethod( LinearProgramToList,
306
+ [IsCddLinearProgram ],
307
+ function( lp )
308
+ local result;
309
+
310
+ result:= ShallowCopy( CDD_POLYHEDRON_TO_LIST( Cdd_H_Rep( lp!.polyhedron ) ) );
311
+
312
+ if lp!.objective = "max" then
313
+
314
+ result[ 6 ] := 1;
315
+
316
+ else
317
+
318
+ result[ 6 ] := 2;
319
+
320
+ fi;
321
+
322
+ result[ 7 ] := lp!.rowvector;
323
+
324
+ return result;
325
+
326
+ end );
327
+
328
+ ###
329
+
330
+ InstallMethod( GiveGeneratingVerticesAndGeneratingRays,
331
+ [ IsList, IsList ],
332
+ function( matrix, linearity )
333
+ local generating_vertices, generating_rays, current, temp, l, i;
334
+
335
+ generating_vertices:= [ ];
336
+
337
+ generating_rays:= [ ];
338
+
339
+ temp := StructuralCopy( matrix );
340
+
341
+ l := Length( temp );
342
+
343
+ for i in [ 1..l ] do
344
+
345
+ current := temp[ i ];
346
+
347
+ if current[ 1 ] = 1 then
348
+
349
+ Remove( current, 1 );
350
+
351
+ if i in linearity then
352
+
353
+ Add( generating_vertices, current );
354
+
355
+ Add( generating_vertices, -current );
356
+
357
+ else
358
+
359
+ Add( generating_vertices, current );
360
+
361
+ fi;
362
+
363
+ else
364
+
365
+ Remove( current, 1 );
366
+
367
+ if not IsZero( current ) then
368
+
369
+ if i in linearity then
370
+
371
+ Add( generating_rays, current );
372
+
373
+ Add( generating_rays, -current );
374
+
375
+ else
376
+
377
+ Add( generating_rays, current );
378
+
379
+ fi;
380
+
381
+ else
382
+
383
+ Add( generating_vertices, current );
384
+
385
+ fi;
386
+
387
+ fi;
388
+
389
+ od;
390
+
391
+ return [ generating_vertices, generating_rays ];
392
+
393
+ end );
394
+
395
+ ####
396
+ InstallMethod( GiveInequalitiesAndEqualities,
397
+ [ IsList, IsList ],
398
+ function( matrix, linearity )
399
+ local equalities, inequalities , current, temp, l, i;
400
+
401
+ inequalities:= [];
402
+
403
+ equalities:= [];
404
+
405
+ l:= Length( matrix );
406
+
407
+ for i in [ 1..l ] do
408
+
409
+ current:= matrix[ i ];
410
+
411
+ if i in linearity then
412
+
413
+ Add( equalities, current );
414
+
415
+ else
416
+
417
+ Add( inequalities, current );
418
+
419
+ fi;
420
+
421
+ od;
422
+
423
+ return [ inequalities, equalities ];
424
+
425
+ end );
426
+
427
+ InstallMethod( GetRidOfLinearity,
428
+ [ IsCddPolyhedron ],
429
+ function( poly )
430
+ local i, temp;
431
+
432
+ if poly!.rep_type = "V-rep" then
433
+
434
+ Error( "This function is written for H-rep polyhedra" );
435
+
436
+ fi;
437
+
438
+ temp:= StructuralCopy( poly!.matrix );
439
+
440
+ for i in poly!.linearity do
441
+
442
+ Add( temp, -temp[ i ] );
443
+
444
+ od;
445
+
446
+ return Cdd_PolyhedronByInequalities( temp );
447
+
448
+ end );
449
+
450
+ ##
451
+ InstallGlobalFunction( CanonicalizeListOfFacesAndInteriorPoints,
452
+ function( L )
453
+ local new_L;
454
+
455
+ if IsInt( L ) then
456
+
457
+ return [];
458
+
459
+ elif IsList( L ) and Length( L ) = 3 and IsInt( L[ 1 ] ) then
460
+
461
+ new_L := List( L, ShallowCopy );
462
+
463
+ return [ new_L ];
464
+
465
+ else
466
+
467
+ return Concatenation( List( L, CanonicalizeListOfFacesAndInteriorPoints ) );
468
+
469
+ fi;
470
+
471
+ end );
472
+
@@ -0,0 +1,17 @@
1
+ #
2
+ # CddInterface: Gap interface to Cdd package
3
+ #
4
+ # Reading the declaration part of the package.
5
+ #
6
+
7
+ if not LoadKernelExtension("CddInterface") then
8
+ Error("failed to load the CddInterface package kernel extension");
9
+ fi;
10
+
11
+ ReadPackage( "CddInterface", "gap/polyhedra.gd");
12
+ ReadPackage( "CddInterface", "gap/tools.gd");
13
+
14
+ if IsPackageMarkedForLoading( "JuliaInterface", ">= 0.2" ) and
15
+ IsPackageMarkedForLoading( "ToolsForHomalg", ">= 2020.05.12" ) then
16
+ ReadPackage( "CddInterface", "gap/Julia.gd");
17
+ fi;
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+
3
+ set -e # abort upon error
4
+
5
+ if [ "$#" -ge 1 ]; then
6
+ gap_path=$1
7
+ shift
8
+ else
9
+ gap_path=../..
10
+ fi
11
+
12
+ current_dir=$(pwd)
13
+ cd $gap_path
14
+
15
+ if [ -f "sysinfo.gap" ]; then
16
+ echo "Ok, thanks I found the gap installation."
17
+ else
18
+ echo "ERROR: It seems that the given location for gap installation is not correct."
19
+ echo "The given location is $(pwd)."
20
+ exit 1
21
+ fi
22
+
23
+ cd $current_dir
24
+
25
+ echo "## Setting variables"
26
+ echo "I am now in $(pwd)"
27
+
28
+ cddlib_VERSION=0.94m
29
+ #cddlib_SHA256=?
30
+ cddlib_BASE=cddlib-${cddlib_VERSION}
31
+ cddlib_TAR=${cddlib_BASE}.tar.gz
32
+ cddlib_URL=https://github.com/cddlib/cddlib/releases/download/${cddlib_VERSION}/${cddlib_TAR}
33
+
34
+ echo
35
+ echo "##"
36
+ echo "## downloading ${cddlib_TAR}"
37
+ echo "##"
38
+
39
+ rm -rf cddlib*
40
+ rm -rf current_cddlib
41
+ etc/download.sh ${cddlib_URL}
42
+ tar xvf ${cddlib_TAR}
43
+ ln -sf $current_dir/${cddlib_BASE} $current_dir/current_cddlib
44
+ rm -rf ${cddlib_TAR}
45
+
46
+ echo "##"
47
+ echo "## compiling cddlib ${cddlib_VERSION}"
48
+ echo "##"
49
+
50
+ cd ${cddlib_BASE}
51
+ mkdir build
52
+ ./bootstrap
53
+ ./configure --prefix=$(pwd)/build
54
+ make
55
+ make install
56
+
57
+ echo "##"
58
+ echo "## compiling cdd interface"
59
+ echo "##"
60
+
61
+ cd $current_dir
62
+ ./autogen.sh
63
+ ./configure --with-gaproot=${gap_path} --with-cddlib=$(pwd)/current_cddlib/build
64
+ make
@@ -0,0 +1,19 @@
1
+ #
2
+ # CddInterface: interface to cdd library
3
+ #
4
+ # This file is a script which compiles the package manual.
5
+ #
6
+
7
+ if fail = LoadPackage("AutoDoc", ">= 2019.04.10") then
8
+ Error("AutoDoc 2019.04.10 or newer is required");
9
+ fi;
10
+
11
+ AutoDoc(
12
+ rec(
13
+ scaffold := rec( entities := [ "GAP4", "homalg" ] ),
14
+ autodoc := rec( files := [ "doc/intro.autodoc" ] ),
15
+ #extract_examples := rec( units := "Single" )
16
+ )
17
+ );
18
+
19
+ QUIT;
@@ -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 );