passagemath-gap-pkg-cddinterface 10.6.23__cp313-cp313-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.
Potentially problematic release.
This version of passagemath-gap-pkg-cddinterface might be problematic. Click here for more details.
- gap/pkg/cddinterface/Dockerfile +16 -0
- gap/pkg/cddinterface/LICENSE +344 -0
- gap/pkg/cddinterface/Makefile +14 -0
- gap/pkg/cddinterface/Makefile.gappkg +225 -0
- gap/pkg/cddinterface/Makefile.in +14 -0
- gap/pkg/cddinterface/PackageInfo.g +103 -0
- gap/pkg/cddinterface/README.md +140 -0
- gap/pkg/cddinterface/ToDo.txt +2 -0
- gap/pkg/cddinterface/autogen.sh +5 -0
- gap/pkg/cddinterface/bin/x86_64-apple-darwin22-default64-kv9/CddInterface.so +0 -0
- gap/pkg/cddinterface/config.log +334 -0
- gap/pkg/cddinterface/config.status +988 -0
- gap/pkg/cddinterface/configure +4779 -0
- gap/pkg/cddinterface/configure.ac +84 -0
- gap/pkg/cddinterface/etc/download.sh +86 -0
- gap/pkg/cddinterface/examples/30x30.g +5 -0
- gap/pkg/cddinterface/examples/FourierProjection.g +83 -0
- gap/pkg/cddinterface/examples/comparing_polyhedrons.g +32 -0
- gap/pkg/cddinterface/examples/demo.g +65 -0
- gap/pkg/cddinterface/examples/example1.g +115 -0
- gap/pkg/cddinterface/examples/intersection.g +35 -0
- gap/pkg/cddinterface/examples/linear_programs.g +64 -0
- gap/pkg/cddinterface/examples/minkuwski.g +35 -0
- gap/pkg/cddinterface/examples/new.g +5 -0
- gap/pkg/cddinterface/examples/new2.g +8 -0
- gap/pkg/cddinterface/gap/Julia.gd +3 -0
- gap/pkg/cddinterface/gap/Julia.gi +15 -0
- gap/pkg/cddinterface/gap/polyhedra.gd +268 -0
- gap/pkg/cddinterface/gap/polyhedra.gi +871 -0
- gap/pkg/cddinterface/gap/tools.gd +12 -0
- gap/pkg/cddinterface/gap/tools.gi +472 -0
- gap/pkg/cddinterface/init.g +17 -0
- gap/pkg/cddinterface/install.sh +64 -0
- gap/pkg/cddinterface/makedoc.g +19 -0
- gap/pkg/cddinterface/notebook.ipynb +343 -0
- gap/pkg/cddinterface/read.g +12 -0
- gap/pkg/cddinterface/tst/01.tst +37 -0
- gap/pkg/cddinterface/tst/02.tst +36 -0
- gap/pkg/cddinterface/tst/03.tst +50 -0
- gap/pkg/cddinterface/tst/04.tst +51 -0
- gap/pkg/cddinterface/tst/05.tst +41 -0
- gap/pkg/cddinterface/tst/06.tst +44 -0
- gap/pkg/cddinterface/tst/07.tst +46 -0
- gap/pkg/cddinterface/tst/08.tst +66 -0
- gap/pkg/cddinterface/tst/09.tst +28 -0
- gap/pkg/cddinterface/tst/10.tst +56 -0
- gap/pkg/cddinterface/tst/11.tst +70 -0
- gap/pkg/cddinterface/tst/etest_1.tst +6 -0
- gap/pkg/cddinterface/tst/etest_2.tst +33 -0
- gap/pkg/cddinterface/tst/testall.g +10 -0
- passagemath_gap_pkg_cddinterface-10.6.23.dist-info/METADATA +92 -0
- passagemath_gap_pkg_cddinterface-10.6.23.dist-info/METADATA.bak +93 -0
- passagemath_gap_pkg_cddinterface-10.6.23.dist-info/RECORD +60 -0
- passagemath_gap_pkg_cddinterface-10.6.23.dist-info/WHEEL +6 -0
- passagemath_gap_pkg_cddinterface-10.6.23.dist-info/top_level.txt +1 -0
- passagemath_gap_pkg_cddinterface.dylibs/libcddgmp.0.dylib +0 -0
- passagemath_gap_pkg_cddinterface.dylibs/libgmp.10.dylib +0 -0
- sage/all__sagemath_gap_pkg_cddinterface.py +1 -0
- sage/libs/all__sagemath_gap_pkg_cddinterface.py +1 -0
- sage/libs/gap_pkg_cddinterface.cpython-313-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;
|