fixed a small bug in eval ehrhart
[polylib.git] / doc / codeDoc / html / disjoint__union__adj_8c-source.html
blob8eb448c17d45afedc740148437028ded9e72891d
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>disjoint_union_adj.c Source File</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.2.15 -->
7 <center>
8 <a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
9 <hr><h1>disjoint_union_adj.c</h1><a href="disjoint__union__adj_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/* Polyhedron disjoint intersections</font>
10 00002 <font class="comment"> */</font>
11 00003
12 00004 <font class="comment">/*</font>
13 00005 <font class="comment"> disjoint_union_adj computes the disjoint union of the given list of domains.</font>
14 00006 <font class="comment"> input:</font>
15 00007 <font class="comment"> (integer) # of polyhedra</font>
16 00008 <font class="comment"> list of polyhedra in the usual matrix (constraints) format</font>
17 00009 <font class="comment"></font>
18 00010 <font class="comment"> output:</font>
19 00011 <font class="comment"> list of polyhedra (constraint matrices) having their facets in common</font>
20 00012 <font class="comment"></font>
21 00013 <font class="comment">*/</font>
22 00014
23 00015 <font class="preprocessor">#include &lt;stdio.h&gt;</font>
24 00016 <font class="preprocessor">#include &lt;stdlib.h&gt;</font>
25 00017
26 00018 <font class="preprocessor">#include &lt;polylib/polylib.h&gt;</font>
27 00019
28 <a name="l00020"></a><a class="code" href="disjoint__union__adj_8c.html#a0">00020</a> <font class="preprocessor">#define WS 200</font>
29 00021 <font class="preprocessor"></font>
30 00022
31 00023 <font class="comment">/* Procedure to print constraints of a domain */</font>
32 <a name="l00024"></a><a class="code" href="disjoint__union__adj_8c.html#a1">00024</a> <font class="keywordtype">void</font> <a class="code" href="disjoint__union__sep_8c.html#a1">AffContraintes</a>(Polyhedron *p)
33 00025 {
34 00026 <font class="keywordflow">for</font>( ;p;p=p-&gt;next)
35 00027 {
36 00028 <a class="code" href="polyhedron_8c.html#a57">Polyhedron_PrintConstraints</a>(stdout, P_VALUE_FMT, p );
37 00029 printf(<font class="stringliteral">"\n"</font>);
38 00030 }
39 00031 }
40 00032
41 00033
42 <a name="l00034"></a><a class="code" href="disjoint__union__adj_8c.html#a2">00034</a> <font class="keywordtype">int</font> <a class="code" href="c2p_8c.html#a1">main</a>() {
43 00035
44 00036 <font class="keywordtype">int</font> np, i;
45 00037
46 00038 Matrix *a;
47 00039 Polyhedron *A, *tmp, *DD;
48 00040
49 00041 scanf( <font class="stringliteral">"%d"</font>, &amp;np );
50 00042
51 00043 A = NULL;
52 00044 <font class="keywordflow">for</font>( i=0 ; i&lt;np ; i++ )
53 00045 {
54 00046 a = <a class="code" href="matrix_8c.html#a4">Matrix_Read</a>();
55 00047 tmp = <a class="code" href="polyhedron_8c.html#a24">Constraints2Polyhedron</a>(a,<a class="code" href="disjoint__union__adj_8c.html#a0">WS</a>);
56 00048 <a class="code" href="matrix_8c.html#a1">Matrix_Free</a>(a);
57 00049 tmp -&gt;next = A;
58 00050 A = tmp;
59 00051 }
60 00052
61 00053
62 00054 DD = <a class="code" href="polyhedron_8c.html#a56">Disjoint_Domain</a>( A, 1, <a class="code" href="disjoint__union__adj_8c.html#a0">WS</a> );
63 00055
64 00056 <a class="code" href="disjoint__union__sep_8c.html#a1">AffContraintes</a>(DD);
65 00057
66 00058 <font class="keywordflow">return</font> 0;
67 00059 }
68 00060
69 00061
70 00062
71 </pre></div><hr><address align="right"><small>Generated on Fri Nov 8 12:10:06 2002 for Polylib by
72 <a href="http://www.doxygen.org/index.html">
73 <img src="doxygen.png" alt="doxygen" align="middle" border=0
74 width=110 height=53></a>1.2.15 </small></address>
75 </body>
76 </html>