1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <time.h>
5 #include <assert.h>
6 /*
7 These are include files that should exist in your C library.
8 */
9 
10 /*  ============	basic choice of PARAMETERS	      ============  */
11 
12 #define	                Long            long
13 #define                 LLong           long long
14 /*
15 For reflexive polytopes in 4 or less dimensions, everything should work with
16 Long set to 32-bit-integer and LLong set to 64 bits.
17 Many applications will even work with LLong at 32 bits.
18 For higher dimensional or complicated non-reflexive polytopes it may be
19 necessary to set even Long to 64 bits.
20 */
21 
22 #ifndef POLY_Dmax       /* You can set POLY_Dmax at compilation:
23                            use -D POLY_Dmax=<value> in the C flags  */
24 #define   		POLY_Dmax	6	/* max dim of polytope	    */
25 #endif
26 /*
27 POLY_Dmax should be set to the dimension of the polytopes that are analysed.
28 While the programs still work if POLY_Dmax is set to a higher value, they may
29 be considerably slowed down.
30 */
31 
32 #if	(POLY_Dmax <= 3)
33 #define   		POINT_Nmax	40	/* max number of points	    */
34 #define   		VERT_Nmax	16	/* max number of vertices   */
35 #define   		FACE_Nmax	30      /* max number of faces      */
36 #define	                SYM_Nmax	88	/* cube: 2^D*D! plus extra  */
37 
38 #elif	(POLY_Dmax == 4)
39 #define   		POINT_Nmax	700	/* max number of points	    */
40 #define 		VERT_Nmax	64      /* max number of vertices   */
41 #define   		FACE_Nmax	824	/* max number of faces      */
42 #define	                SYM_Nmax	1200
43 
44 #else
45 #define   		POINT_Nmax	2000000
46 #define   		VERT_Nmax	64	/* !! use optimal value !!  */
47 #define   		FACE_Nmax	10000	/* max number of faces      */
48 #define                 SYM_Nmax        46080   /* symmetry (P_1)^6: 2^6*6! */
49 #define			EQUA_Nmax	1280    /* up to 20000 without alloc */
50 #endif
51 
52 #ifndef			EQUA_Nmax			/* default setting */
53 #define                 EQUA_Nmax       VERT_Nmax
54 #endif
55 /*
56 POINT_Nmax, VERT_Nmax and FACE_Nmax denote the maximal numbers of points,
57 vertices and faces, respectively.
58 SYM_Nmax is the maximal number of symmetries of a polytope, i.e. the order of
59 the finite subgroup S of the group GL(n,Z) of lattice automorphisms that leaves
60 a polytope invariant.
61 EQUA_Nmax denotes the maximal number of facets (given by equations) of a
62 polytope. By duality this is just the number of vertices of the dual polytope,
63 so it makes sense to have the default setting EQUA_Nmax = VERT_Nmax.
64 In applications not related to reflexive polytopes or in large dimensions a
65 larger value may be useful. While CPU-time is almost independent of EQUA_Nmax,
66 it strongly depends on VERT_Nmax/32 (i.e. use 32, 64, 96, ...).
67 Our settings for dimensions less than or equal to 4 are such that they work
68 for any reflexive polytope.
69 */
70 
71 #define                 AMBI_Dmax       (5 * POLY_Dmax)	/* default setting */
72 /*
73 If a polytope is determined by a combined weight system it is first realised
74 by an embeddeding in an ambient space of dimension (Poly-dim + number of
75 weight systems). AMBI_Dmax is the maximal dimension of this ambient space.
76 */
77 
78 
79 #define                 FIB_Nmax	3000 /*NOW: 27/5/11 default setting*/
80 /*
81 Given a polytope P* it is possible to analyze the IP simplices among its
82 points. These simplices are given in terms of weight relations among points
83 of P*. FIB_Nmax is the maximal number of allowed relations.
84 */
85 
86 
87 #define  CD2F_Nmax               FACE_Nmax
88 /*
89 Max number of codimension 2 faces.
90 */
91 
92 
93 #define GL_Long		Long
94 /*
95 Uses W_to_GLZ like in Rat.c
96 */
97 
98 #define MAXLD (26)
99 
100 /*
101 Used in the handling of large lists of weight systems (cf. C5stats)
102 */
103 
104 extern FILE *inFILE, *outFILE;
105 /*
106 Ascii-files for input and output. If not given in the parameter list they
107 default to stdin and stdout, respectively.
108 */
109 
110 
111 /*  ==========         Global typedefs           		==========  */
112 
113 typedef struct {int n, np; Long x[POINT_Nmax][POLY_Dmax];}   PolyPointList;
114 /*
115 A list (not necessarily complete) of lattice points of a polytope.
116 P.x[i][j] is the j'th coordinate of the i'th lattice point.
117 P.n is the dimension of the polytope and P.np the number of points in the list.
118 */
119 
120 typedef struct {int v[VERT_Nmax]; int nv;}                   VertexNumList;
121 /*
122 The list of vertices of a polytope, referring to some PolyPointList P.
123 The j'th coordinate of the i'th vertex is then given by P.x[V.v[i]][j].
124 V.nv is the number of vertices of P.
125 */
126 
127 typedef struct {Long a[POLY_Dmax], c;}                       Equation;
128 /*
129 This structure determines an equation of the type ax+c=0, explicitly:
130 sum_{i=1}^n E.a[i] x_i + E.c = 0.
131 */
132 
133 typedef struct {int ne; Equation e[EQUA_Nmax];}		     EqList;
134 /*
135 A list of equations; EL.ne is the number of equations in the list.
136 */
137 
138 typedef struct {EqList B; Long W[AMBI_Dmax][AMBI_Dmax], d[AMBI_Dmax];
139   int nw, N, z[POLY_Dmax][AMBI_Dmax], m[POLY_Dmax], nz, index;}       CWS;
140 /*
141 Combined weight system: W[i][j] and d[i] are the j'th weight and the "degree"
142 of the i'th weight system, respectively; nw is the number of weight systems,
143 N is the dimension of the ambient space.
144 z[i][j]/m[i] are the phases of nz symmetries for polytopes on sublattices.
145 B describes the ambient space coordinate hyperplanes in terms of the new
146 (non-redundant) coordinates.
147 */
148 
149 typedef Long PairMat[EQUA_Nmax][VERT_Nmax];
150 /*
151 The matrix whose entries are the pairings av+c between the vertices v and
152 the equations (a,c).
153 */
154 
155 typedef struct {int mp, mv, np, nv, n, pic, cor, h22, h1[POLY_Dmax-1];}
156                                                                      BaHo;
157 /*
158 This structure is related to Batyrev's formulas for Hodge numbers.
159 n     ... dimension of the polytope
160 pic   ... Picard number
161 cor   ... sum of correction terms
162 h1[i] ... Hodge number h_{1i}
163 h22   ... Hodge number h_{22} (if n = 5)
164 mp, mv, np, nv denote the numbers of points/vertices in the M and N lattices,
165 repectively.
166 */
167 
168 typedef struct {
169   Long W[FIB_Nmax][VERT_Nmax];
170   int nw, PS, ZS, nv, f[VERT_Nmax],r[VERT_Nmax],nf,nz[FIB_Nmax], n0[FIB_Nmax],
171     Z[FIB_Nmax][VERT_Nmax], M[FIB_Nmax];
172   GL_Long G[VERT_Nmax][POLY_Dmax][POLY_Dmax];
173   PolyPointList *P;
174 }                                                                     FibW;
175 /*
176 This list is an extension of the PolyPointList with the combined weight system.
177 W[i][j] is the j'th weight; nw is the number of weight systems.
178 */
179 
180 typedef struct{
181   long n_nonIP, n_IP_nonRef, n_ref, // numbers of WS of certain types
182     max_w, nr_max_w, //maximum weight in the reflexive/non-reflexive cases
183     nr_n_w[MAXLD], n_w[MAXLD]; //numbers of weights of given [ld]
184   int nr_max_mp, nr_max_mv, nr_max_nv, max_mp, max_mv, max_np, max_nv,
185     max_h22, max_h1[POLY_Dmax-1], //max values of certain entries of BH
186     min_chi, max_chi, max_nf[POLY_Dmax+1]; //range for chi, max facet numbers
187 }                                                                     C5stats;
188 /*
189 statistics on large lists of weight systems, cf. classification of 4fold weights
190 */
191 
192 /*  ==========         I/O functions (from Coord.c)		==========  */
193 
194 int  Read_CWS_PP(CWS *C, PolyPointList *P);
195 /*
196 Reads either a CWS or a PolyPointList.
197 If *C is read, the PolyPointList *P determined by *C is calculated, otherwise
198 C->nw is set to 0 to indicate that no weight has been read.
199 CWS-input consists of a single line of the form
200 d1 w11 w12 ... d2 w21 w22 ...,
201 whereas PolyPointList-input begins with a line
202 #columns #lines
203 followed by #lines further lines. It reads P->x as a matrix such that
204 either P->n = #columns and P->np = #lines or vice versa (the result is
205 unique because of P->np > P->n).
206 */
207 
208 int  Read_CWS(CWS *_CW, PolyPointList *_P);
209 /*
210  Reads CWS input *C, the PolyPointList *P determined by *C is calculated.
211 */
212 
213 int  Read_PP(PolyPointList *_P);
214 /*
215 Reads the PolyPointList input *P
216 */
217 
218 void Print_PPL(PolyPointList *P, const char *comment);
219 void Print_VL(PolyPointList *P, VertexNumList *V, const char *comment);
220 void Print_EL(EqList *EL, int *n, int suppress_c, const char *comment);
221 void Print_Matrix(Long Matrix[][VERT_Nmax], int n_lines, int n_columns,
222 		  const char *comment);
223 /*
224 Each of these routines prints a matrix in the format
225 #columns #lines  *comment
226 line_0
227 ...
228 line_{#lines-1}.
229 With Print_PPL and Print_VL, points/vertices are displayed as column vectors
230 if there's enough space and as row vectors otherwise.
231 Print_EL always displays equations in line format.
232 If *suppress_c is zero line_i reads
233 EL->e[i].a[0] ... EL->e[i].a[*n-1]  EL->e[i].c,
234 otherwise the last entry EL->e[i].c is suppressed so that the
235 resulting output can be used as input for Read_CWS_PP.
236 */
237 
238 void Print_CWH(CWS *C, BaHo *BH);
239 /*
240 Writes a single line that reproduces *C (if C->nw isn't 0, i.e. if the
241 input was of CWS type), information on the numbers of points and
242 vertices of the polytope and its dual, and the Hodge numbers of the
243 corresponding Calabi-Yau variety.
244 *C is reproduced in the format
245 d1 w11 w12 ... d2 w21 w22 ...
246 Information on the polytope is given in the form
247 M:mp mv N:np nv
248 for reflexive polytopes.
249 Here mp and mv are the numbers of lattice points and vertices of the
250 polytope, respectively, and np and nv denote the corresponding numbers
251 for the dual polytope.
252 If a polytope is not reflexive, "N:np nv" is replaced by "F:ne" (the
253 number of facets/equations).
254 Hodge number information is given in the format
255 H: h11 h12 ... h1(n-2) [chi],
256 where the h1i are the corresponding Hodge numbers and chi is the Euler
257 number. This output is suppressed for polytopes that are not reflexive.
258 As an example, the complete output for the quintic threefold reads
259 5 1 1 1 1 1 M:126 5 N:6 5 H:1,101 [-200].
260 */
261 
262 void Initialize_C5S(C5stats *_C5S, int n);
263 void Update_C5S(BaHo *_BH, int *nf, Long *W, C5stats *_C5S);
264 void Print_C5S(C5stats *_C5S);
265 /*
266 Routines for handling the structure C5stats
267 */
268 
269 /*  ==========              From Polynf.c                        ========== */
270 
271 int  Make_Poly_Sym_NF(PolyPointList *P, VertexNumList *VNL, EqList *EL,
272 		      int *SymNum, int V_perm[][VERT_Nmax],
273 		      Long NF[POLY_Dmax][VERT_Nmax], int t, int S, int N);
274 /*
275 Given *P, *VNL and *EL, the following objects are determined:
276 the number *SymNum of GL(n,Z)-symmetries of the polytope,
277 the *SymNum vertex permutations V_perm realising these symmetries,
278 the normal form coordinates NF of the vertices,
279 the number of symmetries of the vertex pairing matrix
280     (this number is the return value of Make_Poly_Sym_NF).
281 If t/S/N are non-zero, the output of the corresponding options of poly.x
282 is displayed.
283 */
284 
285 void IP_Simplex_Decomp(Long CM[][POLY_Dmax], int p, int d,
286         int *nw, Long W[][VERT_Nmax], int Wmax, int codim);
287 /*
288 Given the matrix CM of coordinates of p points in Z^d, the list W[i] of *nw
289 weight systems corresponding to IP-simplices spanned by the points in CM is
290 created.
291 If codim!=0 only the IP-simplices with dimension > 1 and codimension
292 between 1 and codim are computed.
293 It is assumed that p<=VERT_Nmax and that W can hold at least Wmax sets of
294 coefficients.
295 */
296 
297 void IP_Simplices(PolyPointList *P, int nv, int PS, int VS, int CD);
298 /*
299 Realizes the -P,-V,-Z, and fibration options of poly (the results of this
300 routine are displayed as output; *P is not modified).
301 */
302 
303 int  Sublattice_Basis(int d, int p, Long *P[],     /* return index=det(D) */
304 	Long Z[][VERT_Nmax], Long *M, int *r, Long G[][POLY_Dmax], Long *D);
305 /*
306 Given a vector P[] of pointers at p points in N=Z^d that generate a
307 (sub)lattice N' of the same dimension d, the following data are determined:
308 D[i] with 0 <= i < d  such that the lattice quotient N/N' is the product of
309 cyclic groups Z_{D[i]} with D[i] dividing D[i+1], and a GL(d,Z) matrix G
310 corresponding to a base change P->GxP such that the i'th new coordinate of
311 each of the lattice points is divisible by D[i].
312 If p<=VERT_Nmax the program also computes *r coefficient vectors Z[i] for
313 linear combinations of the points on P that are M[i]-fold multiples of
314 primitive lattice vectors, where M[i]=D[d-i] for i<*r.
315 If p>VERT_Nmax it is asserted that the index of the lattice quotient is 1.
316 */
317 
318 void Make_Poly_UTriang(PolyPointList *P);
319 /*
320 A coordinate change is performed that makes the matrix P->x upper triangular,
321 with minimal entries above the diagonal.
322 */
323 
324 void Make_ANF(PolyPointList *P, VertexNumList *V, EqList*E,
325 	      Long ANF[][VERT_Nmax]);
326 /*
327 Given *P, *V and *E, the affine normal form ANF (i.e., a normal form
328 that also works for non-reflexive polytopes), is computed.
329 */
330 
331 int SimpUnimod(PolyPointList *P, VertexNumList *V, EqList *E, int vol);
332 /*
333 If vol is 0, the return value is 1 if all facets are simplicial, 0 otherwise
334 If vol is not 0, the return value is 1 if all facets are unimoular
335 (i.e. of volume 1) and 0 otherwise.
336 */
337 
338 int ConifoldSing(PolyPointList *P, VertexNumList *V, EqList *E,
339 		 PolyPointList *dP, EqList *dE, int CYorFANO);
340 /*
341 Realizes the -C1 or -C2 options of poly for CYorFANO being 1 or 2, respectively.
342 */
343 
344 int  Fano5d(PolyPointList *, VertexNumList *, EqList *);
345 /*
346 Realizes the -U5 option of poly.
347 */
348 
349 void Einstein_Metric(CWS *CW,PolyPointList *P,VertexNumList *V,EqList *E);
350 /*
351 Realizes the -E option of poly.
352 */
353 
354 int  Divisibility_Index(PolyPointList *P, VertexNumList *V);
355 /*
356 Returns the largest integer g for which *P is a g-fold multiple of some
357 other polytope.
358 */
359 
360 Long LatVol_Barycent(PolyPointList *P, VertexNumList *V, Long *B, Long *N);
361 /*
362 Given *P and *V, the coordinates of the barycenter of *P are computed (with
363 the i'th coordinate as B[i] / *N) and the lattice volume of *P is returned.
364 */
365 
366 void IPs_degD(PolyPointList *P, VertexNumList *V, EqList *E, int l);
367 /*
368  *P is interpreted as the origin and the first level of a Gorenstein cone.
369 The points of the cone up to level l are computed and displayed together with
370 information on the type of face of the cone they represent (option -B# of poly).
371 */
372 
373 void Make_Facet(PolyPointList *P, VertexNumList *V, EqList *E, int e,
374 		Long vertices_of_facet[POLY_Dmax][VERT_Nmax], int *nv_of_facet);
375 /*
376 The e'th facet of *P is determined as a (P->n-1)-dimensional polytope:
377 *nv_of_facet vertices represented by vertices_of_facet.
378 */
379 
380 /*  ==========     General purpose functions from Vertex.c   	==========  */
381 
382 void swap(int *i,int *j);
383 /*
384 Swaps *i and *j.
385 */
386 
387 void Sort_VL(VertexNumList *V);
388 /*
389 Sorts the entries _V->v[i] in ascending order.
390 */
391 
392 Long Eval_Eq_on_V(Equation *E, Long *V, int n);
393 /*
394 Evaluates E on V, i.e. calculates \sum_{i=0}^{n-1} E->a[i] * V[i] + E->c.
395 */
396 
397 int  Span_Check(EqList *EL, EqList *HL, int *n);
398 /*
399 Returns 1 if every equation of *HL is contained in *EL and 0 otherwise.
400 *n is the dimension.
401 */
402 
403 int  Vec_Greater_Than(Long *X, Long *Y, int n);
404 /*
405 Returns 1 if *X > *Y in the sense that X[i] > Y[i] for the first i where
406 X[i] and Y[i] differ, returns 0 if *X < *Y and gives an error message if
407 X[i] equals Y[i] for all i in {0,...n-1}.
408 */
409 
410 int Vec_is_zero(Long *X, int n);
411 /*
412 Returns 1 if X[i]==0 for 0<=i<n; returns 0 otherwise.
413 */
414 
415 void Swap_Vecs(Long *X, Long *Y, int n);
416 /*
417 Exchanges the n-dimensional vectors X and Y.
418 */
419 
420 Equation EEV_To_Equation(Equation *E1, Equation *E2, Long *V, int n);
421 /*
422 Returns the equation describing the span of the vector V and the intersection
423 of the hyperplanes corresponding to E1 and E2; n is the dimension.
424 */
425 
426 void Make_VEPM(PolyPointList *P, VertexNumList *VNL, EqList *EL, PairMat PM);
427 /*
428 Calculates the matrix of pairings between the vertices in VNL and the
429 equations in EL.
430 */
431 
432 int EL_to_PPL(EqList *EL, PolyPointList *DP, int *n);
433 /*
434 Converts *EL to the incomplete PolyPointList *DP corresponding to the dual
435 polytope; *n is the dimension. Returns 1 if all equations of *EL are at
436 distance 1 from the origin and 0 otherwise.
437 */
438 
439 int VNL_to_DEL(PolyPointList *P, VertexNumList *V, EqList *DE);
440 /*
441 Converts *V, which refers to *P, into the list *DE of equations of the
442 dual polytope (assuming reflexivity).
443 Returns 0 if _V->nv exceeds EQUA_Nmax and 1 otherwise.
444 */
445 
446 int Transpose_PM(PairMat PM, PairMat DPM, int nv, int ne);
447 /*
448 Transposes PM into DPM; returns 1 if the dimensions nv, ne are within their
449 limits and 0 otherwise.
450 */
451 
452 
453 /*  ==========   Polytope analysis functions (from Vertex.c)    ==========  */
454 
455 int  Find_Equations(PolyPointList *P, VertexNumList *VNL, EqList *EL);
456 /*
457 For the polytope determined by P, *VNL and *EL are calculated.
458 *VNL is the complete list of vertices of P.
459 *EL is the complete list of equations determining the facets of P.
460 Find_Equations returns 1 if P has IP property (i.e., it has the
461 origin in its interior) and 0 otherwise.
462 */
463 
464 int  IP_Check(PolyPointList *P, VertexNumList *VNL, EqList *EL);
465 /*
466 Same as Find_Equations, but returns immediately without
467 calculating *VNL and *EL if P does not have the IP property.
468 */
469 
470 int  Ref_Check(PolyPointList *P, VertexNumList *VNL, EqList *EL);
471 /*
472 Returns 1 if P is reflexive and 0 otherwise.
473 Only in the reflexive case *VNL and *EL are calculated.
474 */
475 
476 void Make_Dual_Poly(PolyPointList *P, VertexNumList *VNL, EqList *EL,
477 		    PolyPointList *DP);
478 /*
479 Given P, VNL and EL for a reflexive polytope, the complete list *DP
480 of lattice points of the dual polytope is determined.
481 */
482 
483 void Complete_Poly(Long VPM[][VERT_Nmax],EqList *E,int nv,PolyPointList *P);
484 /*
485 Given the vertex pairing matrix VPM, the EqList *E and the number nv of
486 vertices, the complete list of lattice points *P is determined.
487 */
488 
489 void RC_Calc_BaHo(PolyPointList *P, VertexNumList *VNL, EqList *EL,
490 		  PolyPointList *DP, BaHo *BH);
491 /*
492 Given *P, *VNL, *EL and *DP (points of dual polytope) as input, the elements
493 of *BH are calculated. *P must be reflexive; *P and *DP must be complete.
494 */
495 
496 
497 /*  ======  typedefs and functions (from Vertex.c) related to INCIs  ====  */
498 
499 #define                 INT_Nbits            32
500 #define                 LONG_LONG_Nbits      64
501 /*
502 These numbers should be set to the actual numbers of bits occupied by the
503 structures "unsigned int" and "unsigned long long" in your version of C.
504 If they are set to lower values, everything still works but may be
505 considerably slowed down.
506 */
507 
508 #if (VERT_Nmax <= INT_Nbits)
509 typedef		        unsigned int            INCI;
510 #elif (VERT_Nmax <= LONG_LONG_Nbits)
511 typedef		        unsigned long long	INCI;
512 #else
513 #define I_NUI     ((VERT_Nmax-1)/INT_Nbits+1)
514 typedef struct {unsigned int ui[I_NUI];}   INCI;
515 #endif
516 /*
517 An INCI encodes the incidence relations between a face and a list of
518 vertices as a bit pattern (1 if a vertex lies on the face, 0 otherwise).
519 Depending on the allowed number VERT_Nmax of vertices, a single "unsigned int"
520 or "unsigned long long" may be sufficient.
521 If VERT_Nmax is larger than the number of bits in a "long long integer", an
522 array of unsigned integers is used to simulate an integer type of the required
523 size.
524 */
525 
526 typedef struct {int nf[POLY_Dmax+1];			  /* #(faces)[dim]  */
527  	INCI v[POLY_Dmax+1][FACE_Nmax]; 		  /*  vertex info   */
528  	INCI f[POLY_Dmax+1][FACE_Nmax]; 		  /* V-on-dual info */
529  	Long nip[POLY_Dmax+1][FACE_Nmax];		   /* #IPs on face  */
530  	Long dip[POLY_Dmax+1][FACE_Nmax];} 	FaceInfo;  /* #IPs on dual  */
531 /*
532 nf[i] denotes the number of faces of dimension i
533    (the number of faces of dimension n-i-1 of the dual polytope).
534 v[i][j] encodes the incidence relation of the j'th dim-i face with the vertices
535 nip[i][j] is the number of interior points of the j'th dim-i face.
536 f[i][j] and dip[i][j] give the same informations for the dual (n-i-1
537    dimensional) faces, with f[i][j] referring to the dual vertices.
538 */
539 
540 #if (VERT_Nmax <= LONG_LONG_Nbits)
541 #define INCI_M2(x)     ((x) % 2)              /* value of first bit      */
542 #define	INCI_AND(x,y)  ((x) & (y))            /* bitwise logical and     */
543 #define	INCI_OR(x,y)   ((x) | (y))            /* bitwise logical or      */
544 #define	INCI_XOR(x,y)  ((x) ^ (y))            /* bitwise exclusive or    */
545 #define	INCI_EQ(x,y)   ((x) == (y))           /* check on equality       */
546 #define INCI_LE(x,y)   INCI_EQ(INCI_OR(x,y),y)/* bitwise less or equal */
547 #define INCI_EQ_0(x)   INCI_EQ(x,INCI_0())    /* check if all bits = 0   */
548 #define INCI_0()       (0)                    /* set all bits to 0       */
549 #define INCI_1()       (1)                    /* set only first bit to 1 */
550 #define INCI_D2(x)     ((x) / 2)              /* shift by one bit        */
551 #define INCI_PN(x,y)   (2 * (x) + !(y))       /* shift and set first bit */
552 /*
553 For an INCI defined as a single unsigned (long long) integer whose bits are
554 regarded as representing incidences, these are useful definitions.
555 INCI_PN is particularly useful when a new vertex is added: if x represents
556 an equation E w.r.t. some vertex list and y is the result of evaluating E
557 on some new vertex V, then INCI_PN(x,y) represents x w.r.t. the vertex list
558 enhanced by V.
559 */
560 
561 #else
562 #define INCI_M2(x)      ((x).ui[0] % 2)
563 INCI INCI_AND(INCI x, INCI y);
564 INCI INCI_OR(INCI x, INCI y);
565 INCI INCI_XOR(INCI x, INCI y);
566 int  INCI_EQ(INCI x, INCI y);
567 int  INCI_LE(INCI x, INCI y);
568 int  INCI_EQ_0(INCI x);
569 INCI INCI_0();
570 INCI INCI_1();
571 INCI INCI_D2(INCI x);
572 INCI INCI_PN(INCI x, Long y);
573 #endif
574 /*
575 If we need more bits than can be represented by a single unsigned long long,
576 these routines are designed to simulate the above definitions.
577 */
578 
579 int  INCI_abs(INCI X);
580 /*
581 Returns the number of bits of X whose value is 1.
582 */
583 
584 int  Print_INCI(INCI X);
585 /*
586 Prints X as a pattern of 0's and 1's, omitting the 0's after the last 1.
587 */
588 
589 INCI Eq_To_INCI(Equation *E, PolyPointList *P, VertexNumList *VNL);
590 /*
591 Converts *E to an INCI.
592 */
593 
594 void Make_Incidence(PolyPointList *P, VertexNumList *VNL, EqList *EL,
595                     FaceInfo *FI);
596 /*
597 Creates the structure FaceInfo *FI from *P, *VNL and *EL.
598 */
599 
600 void Print_FaceInfo(int n, FaceInfo *FI);
601 /*
602 Displays the information contained in the FaceInfo *FI.
603 */
604 
605 int QuickAnalysis(PolyPointList *_P, BaHo *_BH, FaceInfo *_FI);
606 /*
607 Fast computation of FaceInfo and Hodge numbers.
608 */
609