Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Dynlift/cayley_trick.ads, Revision 1.1.1.1
1.1 maekawa 1: with Standard_Integer_Vectors; use Standard_Integer_Vectors;
2: with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists;
3: with Triangulations; use Triangulations;
4: with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions;
5:
6: package Cayley_Trick is
7:
8: -- DESCRIPTION :
9: -- This procedure provides some routines for constructing a mixed
10: -- subdivision by applicaton of the dynamic lifting algorithm to
11: -- the Cayley trick.
12:
13: -- OPTIONS :
14: -- 1. choice of the order of the points
15: -- 2. for vertices or not: allows to add interior points
16: -- 3. with maximum value on the lifting function or not
17:
18: -- VERSIONS :
19: -- 1. with or without output generics, before flattening or after new cell
20: -- 2. with as result only the mixed subdivision or the whole triangulation
21:
22: -- BASIC VERSION : WITHOUT OUTPUT GENERICS :
23:
24: procedure Dynamic_Cayley
25: ( n : in natural; mix : in Vector;
26: supports : in Array_of_Lists; order,inter : in boolean;
27: maxli : in natural; lifted : out Array_of_Lists;
28: mixsub : out Mixed_Subdivision; numtri : out natural );
29:
30: procedure Dynamic_Cayley
31: ( n : in natural; mix : in Vector;
32: supports : in Array_of_Lists; order,inter : in boolean;
33: maxli : in natural; lifted : out Array_of_Lists;
34: t : in out Triangulation );
35:
36: -- DESCRIPTION :
37: -- Application of the dynamic lifting algorithm to the Cayley trick.
38:
39: -- ON ENTRY :
40: -- n length of the vectors in the supports;
41: -- mix type of mixture;
42: -- supports lists of integer vector of length n;
43: -- order if true, then the points are already ordered and will
44: -- be processed like they occur in the list,
45: -- if false, then a random order will be chosen;
46: -- inter if true, then the list may contain interior points,
47: -- i.e. points x in conv(l\{x}),
48: -- if false, no interior points occur in the list;
49: -- maxli maximum value of the lifting function,
50: -- if = 0, then no flattening will be applied,
51: -- i.e. there is no maximum lifting value,
52: -- if > 0, then no points will be given a lifting value
53: -- greater than maxli.
54:
55: -- ON RETURN :
56: -- lifted the lifted supports;
57: -- mixsub the mixed subdivision;
58: -- numtri number of simplices in the triangulation of the
59: -- auxiliary polytope;
60: -- t triangulation of the auxiliary polytope.
61:
62: -- EXTENDED VERSIONS : WITH OUTPUT GENERICS
63:
64: generic
65: with procedure Before_Flattening
66: ( mixsub : in out Mixed_Subdivision;
67: lifted : in Array_of_Lists );
68:
69: -- DESCRIPTION :
70: -- Before flattening, the current mixed subdivision with
71: -- the current lists of lifted points are given.
72:
73: procedure Dynamic_Cayley_with_Flat
74: ( n : in natural; mix : in Vector;
75: supports : in Array_of_Lists; order,inter : in boolean;
76: maxli : in natural; lifted : out Array_of_Lists;
77: mixsub : out Mixed_Subdivision; numtri : out natural );
78:
79: generic
80: with procedure Before_Flattening
81: ( mixsub : in out Mixed_Subdivision;
82: lifted : in Array_of_Lists );
83: procedure Dynamic_Cayley_with_Flatt
84: ( n : in natural; mix : in Vector;
85: supports : in Array_of_Lists; order,inter : in boolean;
86: maxli : in natural; lifted : out Array_of_Lists;
87: t : in out Triangulation );
88:
89: -- DESCRIPTION :
90: -- Application of the dynamic lifting algorithm to the Cayley trick.
91: -- Before flattening, the generic procedure will be invoked.
92: -- The parameters have the same meaning as in the basic version.
93:
94: generic
95: with procedure Process_New_Cells
96: ( mixsub : in out Mixed_Subdivision;
97: i : in natural; point : in vector );
98:
99: -- DESCRIPTION :
100: -- After the addition of a new point to the ith component,
101: -- this point together with the new mixed cells are returned.
102: -- For the initial cell, i=0.
103:
104: procedure Dynamic_Cayley_with_New
105: ( n : in natural; mix : in Vector;
106: supports : in Array_of_Lists; order,inter : in boolean;
107: maxli : in natural; lifted : out Array_of_Lists;
108: mixsub : out Mixed_Subdivision; numtri : out natural );
109:
110: generic
111: with procedure Process_New_Cells
112: ( mixsub : in out Mixed_Subdivision;
113: i : in natural; point : in vector );
114: procedure Dynamic_Cayley_with_Newt
115: ( n : in natural; mix : in Vector;
116: supports : in Array_of_Lists; order,inter : in boolean;
117: maxli : in natural; lifted : out Array_of_Lists;
118: t : in out Triangulation );
119:
120: -- DESCRIPTION :
121: -- Application of the dynamic lifting algorithm to the Cayley trick.
122: -- After each addition of a point, the generic procedure will
123: -- be invoked.
124: -- The parameters have the same meaning as in the basic version.
125:
126: generic
127: with procedure Before_Flattening
128: ( mixsub : in out Mixed_Subdivision;
129: lifted : in Array_of_Lists );
130:
131: -- DESCRIPTION :
132: -- Before flattening, the current mixed subdivision with
133: -- the current lists of lifted points are given.
134:
135: with procedure Process_New_Cells
136: ( mixsub : in out Mixed_Subdivision;
137: i : in natural; point : in vector );
138:
139: -- DESCRIPTION :
140: -- After the addition of a new point to the ith component,
141: -- this point together with the new simplices are returned.
142: -- For the initial cell, i=0.
143:
144: procedure Dynamic_Cayley_with_Flat_and_New
145: ( n : in natural; mix : in Vector;
146: supports : in Array_of_Lists; order,inter : in boolean;
147: maxli : in natural; lifted : out Array_of_Lists;
148: mixsub : out Mixed_Subdivision; numtri : out natural );
149:
150: generic
151: with procedure Before_Flattening
152: ( mixsub : in out Mixed_Subdivision;
153: lifted : in Array_of_Lists );
154: with procedure Process_New_Cells
155: ( mixsub : in out Mixed_Subdivision;
156: i : in natural; point : in vector );
157: procedure Dynamic_Cayley_with_Flat_and_Newt
158: ( n : in natural; mix : in Vector;
159: supports : in Array_of_Lists; order,inter : in boolean;
160: maxli : in natural; lifted : out Array_of_Lists;
161: t : in out Triangulation );
162:
163:
164: -- DESCRIPTION :
165: -- Application of the dynamic lifting algorithm to the list l.
166: -- Before flattening, the first generic procedure will be invoked.
167: -- After each addition of a point, the second generic procedure
168: -- will be invoked.
169: -- The parameters have the same meaning as in the basic version.
170:
171: end Cayley_Trick;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>