1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv=
"Content-Type" content=
"text/html;charset=iso-8859-1">
3 <title>verif_ehrhart.c Source File
</title>
4 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css">
6 <!-- Generated by Doxygen 1.2.15 -->
8 <a class=
"qindex" href=
"main.html">Main Page
</a> <a class=
"qindex" href=
"annotated.html">Compound List
</a> <a class=
"qindex" href=
"files.html">File List
</a> <a class=
"qindex" href=
"functions.html">Compound Members
</a> <a class=
"qindex" href=
"globals.html">File Members
</a> </center>
9 <hr><h1>verif_ehrhart.c
</h1><a href=
"verif__ehrhart_8c.html">Go to the documentation of this file.
</a><div class=
"fragment"><pre>00001 <font class=
"comment">/*************************************************/
</font>
10 00002 <font class=
"comment">/* verif_ehrhart.c */
</font>
11 00003 <font class=
"comment">/* program to compare effective number of points */
</font>
12 00004 <font class=
"comment">/* in a polytope with the corresponding */
</font>
13 00005 <font class=
"comment">/* evaluation of the Ehrhart polynomial. */
</font>
14 00006 <font class=
"comment">/* Parameters vary in range -RANGE to RANGE */
</font>
15 00007 <font class=
"comment">/* (define below) by default. */
</font>
16 00008 <font class=
"comment">/* Can be overridden by specifying */
</font>
17 00009 <font class=
"comment">/* -r
<RANGE
>, or -m
<min
> and -M
<max
> */
</font>
18 00010 <font class=
"comment">/* */
</font>
19 00011 <font class=
"comment">/* written by Vincent Loechner (c)
2000. */
</font>
20 00012 <font class=
"comment">/* loechner@icps.u-strasbg.fr */
</font>
21 00013 <font class=
"comment">/*************************************************/
</font>
23 00015 <font class=
"preprocessor">#include
<stdio.h
></font>
24 00016 <font class=
"preprocessor">#include
<string.h
></font>
25 00017 <font class=
"preprocessor">#include
<stdlib.h
></font>
27 00019 <font class=
"preprocessor">#include
<polylib/polylib.h
></font>
28 <a name=
"l00020"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a0">00020</a> <font class=
"preprocessor">#define MAXRAYS
1024</font>
29 00021 <font class=
"preprocessor"></font>
30 00022 <font class=
"comment">/* define this to print all the results */
</font>
31 00023 <font class=
"comment">/* else, only a progress bar is printed */
</font>
32 00024 <font class=
"comment">/* #define PRINT_ALL_RESULTS */
</font>
33 00025 <font class=
"comment">/* define this to continue the test after first error found */
</font>
34 00026 <font class=
"comment">/* #define DONT_BREAK_ON_ERROR */
</font>
36 00028 <font class=
"comment">/* RANGE : normal range for evalutations (-RANGE -
> RANGE) */
</font>
37 <a name=
"l00029"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a1">00029</a> <font class=
"preprocessor">#define RANGE
50</font>
38 00030 <font class=
"preprocessor"></font>
39 00031 <font class=
"comment">/* SRANGE : small range for evalutations */
</font>
40 <a name=
"l00032"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a2">00032</a> <font class=
"preprocessor">#define SRANGE
15</font>
41 00033 <font class=
"preprocessor"></font>
42 00034 <font class=
"comment">/* if dimension
>= BIDDIM, use SRANGE */
</font>
43 <a name=
"l00035"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a3">00035</a> <font class=
"preprocessor">#define BIGDIM
5</font>
44 00036 <font class=
"preprocessor"></font>
45 00037 <font class=
"comment">/* VSRANGE : very small range for evalutations */
</font>
46 <a name=
"l00038"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a4">00038</a> <font class=
"preprocessor">#define VSRANGE
5</font>
47 00039 <font class=
"preprocessor"></font>
48 00040 <font class=
"comment">/* if dimension
>= VBIDDIM, use VSRANGE */
</font>
49 <a name=
"l00041"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a5">00041</a> <font class=
"preprocessor">#define VBIGDIM
8</font>
50 00042 <font class=
"preprocessor"></font>
51 <a name=
"l00043"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a6">00043</a> <a class=
"code" href=
"arithmetique_8h.html#a93">Value
</a> <a class=
"code" href=
"verif__ehrhart_8c.html#a6">min
</a>,
<a class=
"code" href=
"verif__ehrhart_8c.html#a7">max
</a>;
53 00045 <font class=
"preprocessor">#ifdef DONT_BREAK_ON_ERROR
</font>
54 00046 <font class=
"preprocessor"></font><font class=
"preprocessor">#define PRINT_ALL_RESULTS
</font>
55 00047 <font class=
"preprocessor"></font><font class=
"preprocessor">#endif
</font>
56 00048 <font class=
"preprocessor"></font>
57 00049 <font class=
"preprocessor">#ifndef PRINT_ALL_RESULTS
</font>
58 <a name=
"l00050"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a8">00050</a> <font class=
"preprocessor"></font><font class=
"keywordtype">int
</font> <a class=
"code" href=
"verif__ehrhart_8c.html#a8">st
</a>;
59 00051 <font class=
"preprocessor">#endif
</font>
60 00052 <font class=
"preprocessor"></font>
61 00053 <font class=
"comment">/****************************************************/
</font>
62 00054 <font class=
"comment">/* function check_poly : */
</font>
63 00055 <font class=
"comment">/* scans the parameter space from min to max (all */
</font>
64 00056 <font class=
"comment">/* directions). Computes the number of points in */
</font>
65 00057 <font class=
"comment">/* the polytope using both methods, and compare them*/
</font>
66 00058 <font class=
"comment">/* returns
1 on success */
</font>
67 00059 <font class=
"comment">/****************************************************/
</font>
69 <a name=
"l00061"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a9">00061</a> <font class=
"keywordtype">int
</font> <a class=
"code" href=
"verif__ehrhart_8c.html#a9">check_poly
</a>(Polyhedron *S,Polyhedron *C,Enumeration *en,
70 00062 <font class=
"keywordtype">int
</font> nparam,
<font class=
"keywordtype">int
</font> pos,
<a class=
"code" href=
"arithmetique_8h.html#a93">Value
</a> *z) {
72 00064 <font class=
"keywordtype">int
</font> cc,k;
73 00065 <a class=
"code" href=
"arithmetique_8h.html#a93">Value
</a> c,tmp,*ctmp;
75 00067 <a class=
"code" href=
"arithmetique_8h.html#a10">value_init
</a>(c);
<a class=
"code" href=
"arithmetique_8h.html#a10">value_init
</a>(tmp);
77 00069 <font class=
"keywordflow">if
</font>(pos == nparam) {
79 00071 <font class=
"comment">/* Computes the ehrhart polynomial */
</font>
80 00072 <a class=
"code" href=
"arithmetique_8h.html#a11">value_assign
</a>(c,*(ctmp=compute_poly(en,
&z[S-
>Dimension-nparam+
1])));
82 00074 <font class=
"comment">/* if c=
0 we may be out of context. */
</font>
83 00075 <font class=
"comment">/* scanning is useless in this case*/
</font>
84 00076 <font class=
"keywordflow">if
</font>(!in_domain(C,
&z[S-
>Dimension-nparam+
1])) {
86 00078 <font class=
"comment">/* ok */
</font> ;
88 00080 <font class=
"keywordflow">else
</font> {
90 00082 <font class=
"preprocessor">#ifdef PRINT_ALL_RESULTS
</font>
91 00083 <font class=
"preprocessor"></font> printf(
<font class=
"stringliteral">"EP( "</font>);
92 00084 <a class=
"code" href=
"arithmetique_8h.html#a16">value_print
</a>(stdout,
<a class=
"code" href=
"arithmetique_8h.html#a5">VALUE_FMT
</a>,z[S-
>Dimension-nparam+
1]);
93 00085 <font class=
"keywordflow">for
</font>(k=S-
>Dimension-nparam+
2;k
<=S-
>Dimension;++k) {
94 00086 printf(
<font class=
"stringliteral">", "</font>);
95 00087 <a class=
"code" href=
"arithmetique_8h.html#a16">value_print
</a>(stdout,
<a class=
"code" href=
"arithmetique_8h.html#a5">VALUE_FMT
</a>,z[k]);
97 00089 printf(
<font class=
"stringliteral">" ) = "</font>);
98 00090 <a class=
"code" href=
"arithmetique_8h.html#a16">value_print
</a>(stdout,
<a class=
"code" href=
"arithmetique_8h.html#a5">VALUE_FMT
</a>,c);
99 00091 printf(
<font class=
"stringliteral">" "</font>);
100 00092 <font class=
"preprocessor">#endif
</font>
101 00093 <font class=
"preprocessor"></font>
102 00094 <font class=
"comment">/* Count manually the number of points */
</font>
103 00095 cc=count_points(
1,S,z);
104 00096 <font class=
"preprocessor">#ifdef PRINT_ALL_RESULTS
</font>
105 00097 <font class=
"preprocessor"></font> printf(
<font class=
"stringliteral">", count = %d. "</font>,cc);
106 00098 <font class=
"preprocessor">#endif
</font>
107 00099 <font class=
"preprocessor"></font>
108 00100 <a class=
"code" href=
"arithmetique_8h.html#a12">value_set_si
</a>(tmp,cc);
109 00101 <font class=
"keywordflow">if
</font>(
<a class=
"code" href=
"arithmetique_8h.html#a23">value_ne
</a>(tmp,c)) {
110 00102 printf(
<font class=
"stringliteral">"\n"</font>);
111 00103 fflush(stdout);
112 00104 fprintf(stderr,
<font class=
"stringliteral">"Error !\n"</font>);
113 00105 fprintf(stderr,
<font class=
"stringliteral">"EP( "</font>);
114 00106 <a class=
"code" href=
"arithmetique_8h.html#a16">value_print
</a>(stderr,
<a class=
"code" href=
"arithmetique_8h.html#a5">VALUE_FMT
</a>,z[S-
>Dimension-nparam+
1]);
115 00107 <font class=
"keywordflow">for
</font>(k=S-
>Dimension-nparam+
2;k
<=S-
>Dimension;++k) {
116 00108 fprintf(stderr,
<font class=
"stringliteral">", "</font>);
117 00109 <a class=
"code" href=
"arithmetique_8h.html#a16">value_print
</a>(stderr,
<a class=
"code" href=
"arithmetique_8h.html#a5">VALUE_FMT
</a>,z[k]);
119 00111 fprintf(stderr,
<font class=
"stringliteral">" ) should be %d,"</font>,cc);
120 00112 fprintf(stderr,
<font class=
"stringliteral">" while EP eval gives "</font>);
121 00113 <a class=
"code" href=
"arithmetique_8h.html#a16">value_print
</a>(stderr,
<a class=
"code" href=
"arithmetique_8h.html#a5">VALUE_FMT
</a>,c);
122 00114 fprintf(stderr,
<font class=
"stringliteral">".\n"</font>);
123 00115 <font class=
"preprocessor">#ifndef DONT_BREAK_ON_ERROR
</font>
124 00116 <font class=
"preprocessor"></font> <a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(c);
<a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(tmp);
125 00117 <font class=
"keywordflow">return
</font>(
0);
126 00118 <font class=
"preprocessor">#endif
</font>
127 00119 <font class=
"preprocessor"></font> }
129 00121 <font class=
"preprocessor">#ifdef PRINT_ALL_RESULTS
</font>
130 00122 <font class=
"preprocessor"></font> <font class=
"keywordflow">else
</font>
131 00123 printf(
<font class=
"stringliteral">"OK.\n"</font>);
132 00124 <font class=
"preprocessor">#endif
</font>
133 00125 <font class=
"preprocessor"></font> }
135 00127 <font class=
"keywordflow">else
</font>
136 00128 <font class=
"keywordflow">for
</font>(
<a class=
"code" href=
"arithmetique_8h.html#a11">value_assign
</a>(tmp,
<a class=
"code" href=
"verif__ehrhart_8c.html#a6">min
</a>);
<a class=
"code" href=
"arithmetique_8h.html#a27">value_le
</a>(tmp,
<a class=
"code" href=
"verif__ehrhart_8c.html#a7">max
</a>);
<a class=
"code" href=
"arithmetique_8h.html#a45">value_increment
</a>(tmp,tmp)) {
138 00130 <font class=
"preprocessor">#ifndef PRINT_ALL_RESULTS
</font>
139 00131 <font class=
"preprocessor"></font> k =
<a class=
"code" href=
"arithmetique_8h.html#a7">VALUE_TO_INT
</a>(tmp);
140 00132 <font class=
"keywordflow">if
</font>(!pos
&& !(k%
<a class=
"code" href=
"verif__ehrhart_8c.html#a8">st
</a>)) {
141 00133 printf(
<font class=
"stringliteral">"o"</font>);
142 00134 fflush(stdout);
144 00136 <font class=
"preprocessor">#endif
</font>
145 00137 <font class=
"preprocessor"></font>
146 00138 <a class=
"code" href=
"arithmetique_8h.html#a11">value_assign
</a>(z[pos+S-
>Dimension-nparam+
1],tmp);
147 00139 <font class=
"keywordflow">if
</font>(!
<a class=
"code" href=
"verif__ehrhart_8c.html#a9">check_poly
</a>(S,C,en,nparam,pos+
1,z)) {
148 00140 <a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(c);
<a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(tmp);
149 00141 <font class=
"keywordflow">return
</font>(
0);
152 00144 <a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(c);
<a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(tmp);
153 00145 <font class=
"keywordflow">return
</font>(
1);
154 00146 }
<font class=
"comment">/* check_poly */
</font>
156 <a name=
"l00148"></a><a class=
"code" href=
"verif__ehrhart_8c.html#a10">00148</a> <font class=
"keywordtype">int
</font> <a class=
"code" href=
"c2p_8c.html#a1">main
</a>(
<font class=
"keywordtype">int
</font> argc,
<font class=
"keywordtype">char
</font> *argv[]) {
158 00150 Matrix *C1, *P1;
159 00151 Polyhedron *C, *P, *S;
160 00152 Polyhedron *CC, *PP;
161 00153 Enumeration *en;
162 00154 <a class=
"code" href=
"arithmetique_8h.html#a93">Value
</a> *p, tmp;
163 00155 <font class=
"keywordtype">int
</font> i,j;
164 00156 <font class=
"keywordtype">int
</font> m,M;
166 00158 <font class=
"comment">/******* Read the input *********/
</font>
167 00159 P1 =
<a class=
"code" href=
"matrix_8c.html#a4">Matrix_Read
</a>();
168 00160 C1 =
<a class=
"code" href=
"matrix_8c.html#a4">Matrix_Read
</a>();
170 00162 <font class=
"keywordflow">if
</font>(C1-
>NbColumns
< 2) {
171 00163 fprintf(stderr,
<font class=
"stringliteral">"Not enough parameters !\n"</font>);
175 00167 P =
<a class=
"code" href=
"polyhedron_8c.html#a24">Constraints2Polyhedron
</a>(P1,
<a class=
"code" href=
"verif__ehrhart_8c.html#a0">MAXRAYS
</a>);
176 00168 C =
<a class=
"code" href=
"polyhedron_8c.html#a24">Constraints2Polyhedron
</a>(C1,
<a class=
"code" href=
"verif__ehrhart_8c.html#a0">MAXRAYS
</a>);
177 00169 <a class=
"code" href=
"matrix_8c.html#a1">Matrix_Free
</a>(C1);
178 00170 <a class=
"code" href=
"matrix_8c.html#a1">Matrix_Free
</a>(P1);
180 00172 <font class=
"comment">/******* Read the options: initialize min and max ********/
</font>
181 00173 <font class=
"keywordflow">if
</font>(P-
>Dimension
>=
<a class=
"code" href=
"verif__ehrhart_8c.html#a5">VBIGDIM
</a>)
182 00174 M =
<a class=
"code" href=
"verif__ehrhart_8c.html#a4">VSRANGE
</a>;
183 00175 <font class=
"keywordflow">else
</font> <font class=
"keywordflow">if
</font>(P-
>Dimension
>=
<a class=
"code" href=
"verif__ehrhart_8c.html#a3">BIGDIM
</a>)
184 00176 M =
<a class=
"code" href=
"verif__ehrhart_8c.html#a2">SRANGE
</a>;
185 00177 <font class=
"keywordflow">else
</font>
186 00178 M =
<a class=
"code" href=
"verif__ehrhart_8c.html#a1">RANGE
</a>;
188 00180 <font class=
"keywordflow">if
</font>(argc !=
1 ) {
189 00181 <font class=
"keywordflow">for
</font>(i=
1;i
<argc;i++) {
190 00182 <font class=
"keywordflow">if
</font>(!strncmp(argv[i],
<font class=
"stringliteral">"-m"</font>,
2)) {
192 00184 <font class=
"comment">/* min specified */
</font>
193 00185 m = atoi(
&argv[i][
2]);
195 00187 <font class=
"keywordflow">else
</font> <font class=
"keywordflow">if
</font>(!strncmp(argv[i],
<font class=
"stringliteral">"-M"</font>,
2)) {
197 00189 <font class=
"comment">/* max specified */
</font>
198 00190 M = atoi(
&argv[i][
2]);
200 00192 <font class=
"keywordflow">else
</font> <font class=
"keywordflow">if
</font>(!strncmp(argv[i],
<font class=
"stringliteral">"-r"</font>,
2)) {
202 00194 <font class=
"comment">/* range specified */
</font>
203 00195 M = atoi(
&argv[i][
2]);
206 00198 <font class=
"keywordflow">else
</font> {
207 00199 fprintf(stderr,
<font class=
"stringliteral">"Unknown option: %s\n"</font>,argv[i]);
208 00200 fprintf(stderr,
<font class=
"stringliteral">"Usage: %s [-m<>][-M<>][-r<>]\n"</font>,argv[
0]);
209 00201 <font class=
"keywordflow">return
</font>(-
1);
213 00205 <font class=
"keywordflow">if
</font>(m
> M) {
214 00206 fprintf(stderr,
<font class=
"stringliteral">"Nothing to do: min > max !\n"</font>);
215 00207 <font class=
"keywordflow">return
</font>(
0);
217 00209 <a class=
"code" href=
"arithmetique_8h.html#a10">value_init
</a>(
<a class=
"code" href=
"verif__ehrhart_8c.html#a6">min
</a>);
218 00210 <a class=
"code" href=
"arithmetique_8h.html#a10">value_init
</a>(
<a class=
"code" href=
"verif__ehrhart_8c.html#a7">max
</a>);
219 00211 <a class=
"code" href=
"arithmetique_8h.html#a12">value_set_si
</a>(
<a class=
"code" href=
"verif__ehrhart_8c.html#a6">min
</a>,m);
220 00212 <a class=
"code" href=
"arithmetique_8h.html#a12">value_set_si
</a>(
<a class=
"code" href=
"verif__ehrhart_8c.html#a7">max
</a>,M);
221 00213 <a class=
"code" href=
"arithmetique_8h.html#a10">value_init
</a>(tmp);
223 00215 <font class=
"comment">/******* Compute true context *******/
</font>
224 00216 CC =
<a class=
"code" href=
"polyhedron_8c.html#a47">align_context
</a>(C,P-
>Dimension,
<a class=
"code" href=
"verif__ehrhart_8c.html#a0">MAXRAYS
</a>);
225 00217 PP =
<a class=
"code" href=
"polyhedron_8c.html#a32">DomainIntersection
</a>(P,CC,
<a class=
"code" href=
"verif__ehrhart_8c.html#a0">MAXRAYS
</a>);
226 00218 <a class=
"code" href=
"polyhedron_8c.html#a19">Domain_Free
</a>(CC);
227 00219 C1 =
<a class=
"code" href=
"matrix_8c.html#a0">Matrix_Alloc
</a>(C-
>Dimension+
1,P-
>Dimension+
1);
229 00221 <font class=
"keywordflow">for
</font>(i=
0;i
<C1-
>NbRows;i++)
230 00222 <font class=
"keywordflow">for
</font>(j=
0;j
<C1-
>NbColumns;j++)
231 00223 <font class=
"keywordflow">if
</font>(i==j-P-
>Dimension+C-
>Dimension)
232 00224 <a class=
"code" href=
"arithmetique_8h.html#a12">value_set_si
</a>(C1-
>p[i][j],
1);
233 00225 <font class=
"keywordflow">else
</font>
234 00226 <a class=
"code" href=
"arithmetique_8h.html#a12">value_set_si
</a>(C1-
>p[i][j],
0);
235 00227 CC =
<a class=
"code" href=
"polyhedron_8c.html#a52">Polyhedron_Image
</a>(PP,C1,
<a class=
"code" href=
"verif__ehrhart_8c.html#a0">MAXRAYS
</a>);
236 00228 <a class=
"code" href=
"polyhedron_8c.html#a19">Domain_Free
</a>(C);
239 00231 <font class=
"comment">/******* Compute EP *********/
</font>
240 00232 en = Polyhedron_Enumerate(P,C,
<a class=
"code" href=
"verif__ehrhart_8c.html#a0">MAXRAYS
</a>,NULL);
242 00234 <font class=
"comment">/******* Initializations for check *********/
</font>
243 00235 p = (
<a class=
"code" href=
"arithmetique_8h.html#a93">Value
</a> *)malloc(
<font class=
"keyword">sizeof
</font>(
<a class=
"code" href=
"arithmetique_8h.html#a93">Value
</a>) * (P-
>Dimension+
2));
244 00236 <font class=
"keywordflow">for
</font>(i=
0;i
<=P-
>Dimension;i++) {
245 00237 <a class=
"code" href=
"arithmetique_8h.html#a10">value_init
</a>(p[i]);
246 00238 <a class=
"code" href=
"arithmetique_8h.html#a12">value_set_si
</a>(p[i],
0);
248 00240 <a class=
"code" href=
"arithmetique_8h.html#a10">value_init
</a>(p[i]);
249 00241 <a class=
"code" href=
"arithmetique_8h.html#a12">value_set_si
</a>(p[i],
1);
251 00243 <font class=
"comment">/* S = scanning list of polyhedra */
</font>
252 00244 S =
<a class=
"code" href=
"polyhedron_8c.html#a48">Polyhedron_Scan
</a>(P,C,
<a class=
"code" href=
"verif__ehrhart_8c.html#a0">MAXRAYS
</a>);
254 00246 <font class=
"preprocessor">#ifndef PRINT_ALL_RESULTS
</font>
255 00247 <font class=
"preprocessor"></font> <font class=
"keywordflow">if
</font>(C-
>Dimension
> 0) {
256 00248 <a class=
"code" href=
"arithmetique_8h.html#a48">value_substract
</a>(tmp,
<a class=
"code" href=
"verif__ehrhart_8c.html#a7">max
</a>,
<a class=
"code" href=
"verif__ehrhart_8c.html#a6">min
</a>);
257 00249 <font class=
"keywordflow">if
</font> (
<a class=
"code" href=
"arithmetique_8h.html#a7">VALUE_TO_INT
</a>(tmp)
> 80)
258 00250 <a class=
"code" href=
"verif__ehrhart_8c.html#a8">st
</a> =
1+(
<a class=
"code" href=
"arithmetique_8h.html#a7">VALUE_TO_INT
</a>(tmp))/
80;
259 00251 <font class=
"keywordflow">else
</font>
260 00252 <a class=
"code" href=
"verif__ehrhart_8c.html#a8">st
</a>=
1;
261 00253 <font class=
"keywordflow">for
</font>(i=
<a class=
"code" href=
"arithmetique_8h.html#a7">VALUE_TO_INT
</a>(
<a class=
"code" href=
"verif__ehrhart_8c.html#a6">min
</a>);i
<=
<a class=
"code" href=
"arithmetique_8h.html#a7">VALUE_TO_INT
</a>(
<a class=
"code" href=
"verif__ehrhart_8c.html#a7">max
</a>);i+=
<a class=
"code" href=
"verif__ehrhart_8c.html#a8">st
</a>)
262 00254 printf(
<font class=
"stringliteral">"."</font>);
263 00255 printf(
<font class=
"stringliteral">"\r"</font> );
264 00256 fflush(stdout);
266 00258 <font class=
"preprocessor">#endif
</font>
267 00259 <font class=
"preprocessor"></font>
268 00260 <font class=
"comment">/******* CHECK NOW *********/
</font>
269 00261 <font class=
"keywordflow">if
</font>(!
<a class=
"code" href=
"verif__ehrhart_8c.html#a9">check_poly
</a>(S,C,en,C-
>Dimension,
0,p)) {
270 00262 fprintf(stderr,
<font class=
"stringliteral">"Check failed !\n"</font>);
271 00263 <font class=
"keywordflow">for
</font>(i=
0;i
<=(P-
>Dimension+
1);i++)
272 00264 <a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(p[i]);
273 00265 <a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(tmp);
274 00266 <font class=
"keywordflow">return
</font>(-
1);
277 00269 <font class=
"preprocessor">#ifndef PRINT_ALL_RESULTS
</font>
278 00270 <font class=
"preprocessor"></font> printf(
<font class=
"stringliteral">"\n"</font> );
279 00271 <font class=
"preprocessor">#endif
</font>
280 00272 <font class=
"preprocessor"></font>
281 00273 <font class=
"keywordflow">for
</font>(i=
0;i
<=(P-
>Dimension+
1);i++)
282 00274 <a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(p[i]);
283 00275 <a class=
"code" href=
"arithmetique_8h.html#a14">value_clear
</a>(tmp);
284 00276 <font class=
"keywordflow">return
</font>(
0);
285 00277 }
<font class=
"comment">/* main */
</font>
290 </pre></div><hr><address align=
"right"><small>Generated on Fri Nov
8 12:
10:
07 2002 for Polylib by
291 <a href=
"http://www.doxygen.org/index.html">
292 <img src=
"doxygen.png" alt=
"doxygen" align=
"middle" border=
0
293 width=
110 height=
53></a>1.2.15 </small></address>