passagemath-gap-pkg-cddinterface 10.6.38__cp314-cp314t-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.38.dist-info/METADATA +93 -0
  45. passagemath_gap_pkg_cddinterface-10.6.38.dist-info/METADATA.bak +94 -0
  46. passagemath_gap_pkg_cddinterface-10.6.38.dist-info/RECORD +51 -0
  47. passagemath_gap_pkg_cddinterface-10.6.38.dist-info/WHEEL +6 -0
  48. passagemath_gap_pkg_cddinterface-10.6.38.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-314t-darwin.so +0 -0
@@ -0,0 +1,268 @@
1
+ #############################################################################
2
+ ##
3
+ ## polyhedra.gd CddInterface package Kamal Saleh
4
+ ##
5
+ ## Copyright 2019 Mathematics Faculty, Siegen University, Germany
6
+ ##
7
+ ## Fans for NConvex package.
8
+ ##
9
+ #############################################################################
10
+
11
+ # Interface to Cdd package
12
+ #
13
+ # Declarations
14
+ #
15
+
16
+ #################################
17
+ ##
18
+ ## Family
19
+ ##
20
+ #################################
21
+
22
+ DeclareGlobalVariable( "CddPolyhedronCalculations" );
23
+
24
+ #################################
25
+ ##
26
+ ## Categories
27
+ ##
28
+ #################################
29
+
30
+ DeclareCategory( "IsCddPolyhedron", IsObject );
31
+
32
+ DeclareCategory( "IsCddLinearProgram", IsObject );
33
+
34
+
35
+
36
+ ##################################
37
+ ##
38
+ ## Operations and Global functions
39
+ ##
40
+ ##################################
41
+ # to activate the documentation press gap makedoc.g
42
+
43
+
44
+ #! @Chapter Creating polyhedra and their Operations
45
+ #! @Section Creating a polyhedron
46
+
47
+
48
+ #! @Arguments ineq [, linearities_list ]
49
+ #! @Returns a CddPolyhedron
50
+ #! @Description
51
+ #! The function takes a list in which every entry represents an inequality (or equality).
52
+ #! In case we want some entries to represent equalities we should refer
53
+ #! in a second list to their indices.
54
+ DeclareGlobalFunction( "Cdd_PolyhedronByInequalities" );
55
+ #! @InsertChunk Example1
56
+
57
+ #! @Arguments genes[, linearities_list ]
58
+ #! @Returns a CddPolyhedron
59
+ #! @Description
60
+ #! The function takes a list in which every entry represents a vertex in the ambient vector space.
61
+ #! In case we want some vertices to be free (the vertex and its negative belong to the polyhedron) we should refer
62
+ #! in a second list to their indices .
63
+ DeclareGlobalFunction( "Cdd_PolyhedronByGenerators" );
64
+ #! @InsertChunk Example2
65
+
66
+ #! @Section Some operations on a polyhedron
67
+
68
+ #! @Arguments P, i
69
+ #! @Returns a CddPolyhedron
70
+ #! @Description
71
+ #! The function returns the Fourier projection of the polyhedron in the subspace $(O,x_1,\dots,x_{i-1},x_{i+1},\dots,x_n)$ after applying the Fourier elemination algorithm to get rid of the variable $x_{i}$.
72
+ DeclareOperation( "Cdd_FourierProjection" , [ IsCddPolyhedron, IsInt ] );
73
+ #! @InsertChunk Fourier
74
+
75
+
76
+ DeclareOperation( "Cdd_ExtendLinearity" , [ IsCddPolyhedron, IsList ] );
77
+
78
+ #! @Section Some operations on two polyhedrons
79
+
80
+ #! @Arguments P1, P2
81
+ #! @Returns <C>true</C> or <C>false</C>
82
+ #! @Description
83
+ #! The function returns <C>true</C> if $P_1$ is contained in $P_2$, otherwise returns <C>false</C>.
84
+ DeclareOperation( "Cdd_IsContained", [ IsCddPolyhedron, IsCddPolyhedron ] );
85
+ #! @InsertChunk comparing_polyhedrons
86
+
87
+ #! @Arguments P1, P2
88
+ #! @Returns a CddPolyhedron
89
+ #! @Description
90
+ #! The function returns the intersection of $P_1$ and $P_2$
91
+ DeclareOperation( "Cdd_Intersection", [ IsCddPolyhedron, IsCddPolyhedron ] );
92
+ #! @InsertChunk intersection
93
+
94
+ #! @Arguments P1, P2
95
+ #! @Returns a CddPolyhedron
96
+ #! @Description
97
+ #! The function returns the Minkuwski sum of $P_1$ and $P_2$.
98
+ DeclareOperation( "\+", [ IsCddPolyhedron, IsCddPolyhedron ] );
99
+ #! @InsertChunk minkuwski
100
+
101
+
102
+
103
+ #! @Chapter Linear Programs
104
+ #! @Section Creating and solving linear programs
105
+
106
+ #! @Arguments P, str, obj
107
+ #! @Returns a **CddLinearProgram** Object
108
+ #! @Description
109
+ #! The function takes three variables. The first is a polyhedron **poly**, the second **str** should
110
+ #! be "max" or "min" and the third **obj** is the objective function.
111
+ DeclareOperation( "Cdd_LinearProgram", [ IsCddPolyhedron, IsString, IsList ] );
112
+
113
+ #! @Arguments lp
114
+ #! @Returns a list if the program is optimal, otherwise returns the value 0
115
+ #! @Description
116
+ #! The function takes a linear program. If the program is optimal, the function returns a list of two
117
+ #! entries, the solution vector and the optimal value of the objective, otherwise it returns <A>fail</A>.
118
+ DeclareOperation( "Cdd_SolveLinearProgram", [ IsCddLinearProgram ] );
119
+ #! @InsertChunk Example5
120
+
121
+
122
+ ##################################
123
+ ##
124
+ ## Attributes
125
+ ##
126
+ ##################################
127
+
128
+ #! @Chapter Attributes and properties
129
+ #! @Section Attributes and properties of polyhedron
130
+
131
+ #! @Arguments P
132
+ #! @Returns a CddPolyhedron
133
+ #! @Description
134
+ #! The function takes a polyhedron and reduces its defining inequalities (generators set) by deleting all redundant inequalities (generators).
135
+ DeclareAttribute( "Cdd_Canonicalize", IsCddPolyhedron );
136
+ #! @InsertChunk Example3
137
+
138
+ #! @Arguments P
139
+ #! @Returns a CddPolyhedron
140
+ #! @Description
141
+ #! The function takes a polyhedron and returns its reduced $V$-representation.
142
+ DeclareAttribute( "Cdd_V_Rep", IsCddPolyhedron );
143
+
144
+ #! @Arguments P
145
+ #! @Returns a CddPolyhedron
146
+ #! @Description
147
+ #! The function takes a polyhedron and returns its reduced $H$-representation.
148
+ DeclareAttribute( "Cdd_H_Rep", IsCddPolyhedron );
149
+ #! @InsertChunk Example4
150
+
151
+ #! @Arguments P
152
+ #! @Returns The dimension of the ambient space of the polyhedron(i.e., the space that contains $P$).
153
+ DeclareAttribute( "Cdd_AmbientSpaceDimension", IsCddPolyhedron );
154
+
155
+ #! @Arguments P
156
+ #! @Returns The dimension of the polyhedron, where the dimension, $\mathrm{dim}(P)$, of a polyhedron $P$
157
+ #! is the maximum number of affinely independent points in $P$ minus 1.
158
+ DeclareAttribute( "Cdd_Dimension", IsCddPolyhedron );
159
+
160
+ #! @Arguments P
161
+ #! @Returns The reduced generating vertices of the polyhedron
162
+ DeclareAttribute( "Cdd_GeneratingVertices", IsCddPolyhedron );
163
+
164
+ #! @Arguments P
165
+ #! @Returns list
166
+ #! @Description
167
+ #! The output is the reduced generating rays of the polyhedron
168
+ DeclareAttribute( "Cdd_GeneratingRays", IsCddPolyhedron );
169
+
170
+ #! @Arguments P
171
+ #! @Returns a list
172
+ #! @Description
173
+ #! The output is the reduced equalities of the polyhedron.
174
+ DeclareAttribute( "Cdd_Equalities", IsCddPolyhedron );
175
+
176
+ #! @Arguments P
177
+ #! @Description
178
+ #! The output is the reduced inequalities of the polyhedron.
179
+ DeclareAttribute( "Cdd_Inequalities", IsCddPolyhedron );
180
+
181
+ #! @Arguments P
182
+ #! @Returns a list
183
+ #! @Description
184
+ #! The output is an interior point in the polyhedron
185
+ DeclareAttribute( "Cdd_InteriorPoint", IsCddPolyhedron );
186
+
187
+ #! @Arguments P
188
+ #! @Returns a list
189
+ #! @Description
190
+ #! This function takes a $H$-represented polyhedron **P** and returns a list. Every entry in this
191
+ #! list is a again a list, contains the dimension and linearity of the face defined as a polyhedron over the
192
+ #! same system of inequalities.
193
+ DeclareAttribute( "Cdd_Faces", IsCddPolyhedron );
194
+
195
+ #! @Arguments P, d
196
+ #! @Returns a list
197
+ #! @Description
198
+ #! This function takes a $H$-represented polyhedron **P** and a positive integer **d**.
199
+ #! The output is a list. Every entry in this
200
+ #! list is the linearity of an **d**- dimensional face of **P** defined as a polyhedron over the
201
+ #! same system of inequalities.
202
+ KeyDependentOperation( "Cdd_FacesWithFixedDimension", IsCddPolyhedron, IsInt, ReturnTrue );
203
+
204
+ #! @Arguments P
205
+ #! @Returns a list
206
+ #! @Description
207
+ #! This function takes a $H$-represented polyhedron **P** and returns a list. Every entry in this
208
+ #! list is a again a list, contains the dimension, linearity of the face defined as a polyhedron over the
209
+ #! same system of inequalities and an interior point in the face.
210
+ DeclareAttribute( "Cdd_FacesWithInteriorPoints", IsCddPolyhedron );
211
+
212
+ #! @Arguments P, d
213
+ #! @Returns a list
214
+ #! @Description
215
+ #! This function takes a $H$-represented polyhedron **P** and a positive integer **d**.
216
+ #! The output is a list. Every entry in this
217
+ #! list is a again a list, contains the linearity of the face defined as a polyhedron over the
218
+ #! same system of inequalities and an interior point in this face.
219
+ KeyDependentOperation( "Cdd_FacesWithFixedDimensionAndInteriorPoints", IsCddPolyhedron, IsInt, ReturnTrue );
220
+
221
+
222
+ #! @Arguments P
223
+ #! @Returns a list
224
+ #! @Description
225
+ #! This function takes a $H$-represented polyhedron **P** and returns a list. Every entry in this
226
+ #! is the linearity of a facet defined as a polyhedron over the
227
+ #! same system of inequalities.
228
+ DeclareAttribute( "Cdd_Facets", IsCddPolyhedron );
229
+
230
+ #! @Arguments P
231
+ #! @Returns a list
232
+ #! @Description
233
+ #! This function takes a $H$-represented polyhedron **P** and returns a list. Every entry in this
234
+ #! is the linearity of a ray ($1$-dimensional face) defined as a polyhedron over the
235
+ #! same system of inequalities.
236
+ DeclareAttribute( "Cdd_Lines", IsCddPolyhedron );
237
+
238
+ #! @Arguments P
239
+ #! @Returns a list
240
+ #! @Description
241
+ #! This function takes a $H$-represented polyhedron **P** and returns a list. Every entry in this
242
+ #! list is the linearity of a vertex defined as a polyhedron over the same system of inequalities.
243
+ DeclareAttribute( "Cdd_Vertices", IsCddPolyhedron );
244
+
245
+ ##################################
246
+ ##
247
+ ## Properties
248
+ ##
249
+ ##################################
250
+
251
+ #! @Arguments P
252
+ #! @Returns true or false
253
+ #! @Description
254
+ #! The output is <C>true</C> if the polyhedron is empty and <C>false</C> otherwise
255
+ DeclareProperty( "Cdd_IsEmpty", IsCddPolyhedron );
256
+
257
+ #! @Arguments P
258
+ #! @Returns true or false
259
+ #! @Description
260
+ #! The output is <C>true</C> if the polyhedron is cone and <C>false</C> otherwise
261
+ DeclareProperty( "Cdd_IsCone", IsCddPolyhedron );
262
+
263
+ #! @Arguments P
264
+ #! @Returns true or false
265
+ #! @Description
266
+ #! The output is <C>true</C> if the polyhedron is pointed and <C>false</C> otherwise
267
+ DeclareProperty( "Cdd_IsPointed", IsCddPolyhedron );
268
+ #! @InsertChunk demo