This file is indexed.

/usr/share/doc/coinor-libflopc++-doc/html/MP__set_8hpp_source.html is in coinor-libflopc++-doc 1.0.6-3.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FLOPC++: MP_set.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FLOPC++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">MP_set.hpp</div>  </div>
</div>
<div class="contents">
<a href="MP__set_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ******************** FlopCpp **********************************************</span>
<a name="l00002"></a>00002 <span class="comment">// File: MP_set.hpp</span>
<a name="l00003"></a>00003 <span class="comment">// $Id$</span>
<a name="l00004"></a>00004 <span class="comment">// Author: Tim Helge Hultberg (thh@mat.ua.pt)</span>
<a name="l00005"></a>00005 <span class="comment">// Copyright (C) 2003 Tim Helge Hultberg</span>
<a name="l00006"></a>00006 <span class="comment">// All Rights Reserved.</span>
<a name="l00007"></a>00007 <span class="comment">// ****************************************************************************</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef _MP_set_hpp_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define _MP_set_hpp_</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;sstream&gt;</span>
<a name="l00014"></a>00014 <span class="keyword">using</span> std::cout;
<a name="l00015"></a>00015 <span class="keyword">using</span> std::endl;
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00018"></a>00018 <span class="keyword">using</span> std::string;
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="MP__domain_8hpp.html">MP_domain.hpp</a>&quot;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="MP__index_8hpp.html">MP_index.hpp</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="MP__utilities_8hpp.html">MP_utilities.hpp</a>&quot;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="keyword">namespace </span>flopc {
<a name="l00025"></a>00025 
<a name="l00030"></a><a class="code" href="classflopc_1_1MP__set__base.html">00030</a>   <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a &quot;set&quot;.">MP_set_base</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1MP__index.html" title="Representation of an index.This is one of the main public interface classes. It is used to iterate th...">MP_index</a> , <span class="keyword">public</span> <a class="code" href="classflopc_1_1Named.html" title="Utility interface class for adding a string name onto a structure.">Named</a> {
<a name="l00031"></a>00031   <span class="keyword">public</span>:
<a name="l00032"></a><a class="code" href="classflopc_1_1MP__set__base.html#acc545be567549c6379c70950ffe7a032">00032</a>     <a class="code" href="classflopc_1_1MP__set__base.html#acc545be567549c6379c70950ffe7a032">MP_set_base</a>() : <a class="code" href="classflopc_1_1MP__set__base.html#a95b541cd3f921238cd22c33c7fc92933">Cyclic</a>(false) {}
<a name="l00033"></a>00033 
<a name="l00034"></a>00034     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__set__base.html#a452804fd87bd5b35988e3e53760e7739">size</a>() <span class="keyword">const</span> = 0;
<a name="l00035"></a>00035     <span class="keyword">virtual</span> <a class="code" href="classflopc_1_1MP__set__base.html#ad55b0bc8b9123d4db16e0bb21513b220">operator MP_domain</a>() <span class="keyword">const</span> = 0;
<a name="l00036"></a>00036     <span class="keyword">virtual</span> <a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a> <a class="code" href="classflopc_1_1MP__set__base.html#a593c68a3ded33ffbe59a003b5ef6a5b5">operator()</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i) <span class="keyword">const</span> = 0;
<a name="l00037"></a>00037  
<a name="l00038"></a><a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">00038</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">check</a>(<span class="keywordtype">int</span> i)<span class="keyword"> const </span>{
<a name="l00039"></a>00039       <span class="keywordflow">if</span> ((i&gt;=0) &amp;&amp; (i&lt;<a class="code" href="classflopc_1_1MP__set__base.html#a452804fd87bd5b35988e3e53760e7739">size</a>())) {
<a name="l00040"></a>00040         <span class="keywordflow">return</span> i;
<a name="l00041"></a>00041       } <span class="keywordflow">else</span> {
<a name="l00042"></a>00042         <span class="keywordflow">if</span> (<a class="code" href="classflopc_1_1MP__set__base.html#a95b541cd3f921238cd22c33c7fc92933">Cyclic</a> == <span class="keyword">true</span>) {
<a name="l00043"></a>00043           <span class="keywordflow">return</span> <a class="code" href="namespaceflopc.html#a08dd4589d5c34c15a6436de89b100d27" title="return the strictly positive modulus of two integers">mod</a>(i,<a class="code" href="classflopc_1_1MP__set__base.html#a452804fd87bd5b35988e3e53760e7739">size</a>());
<a name="l00044"></a>00044         } <span class="keywordflow">else</span> {
<a name="l00045"></a>00045           <span class="keywordflow">return</span> <a class="code" href="namespaceflopc.html#ac260440d0c7db7b8b6bb659a90d7883a" title="Distinct return value on conditions where an index goes out of bounds.">outOfBound</a>;
<a name="l00046"></a>00046         }
<a name="l00047"></a>00047       }
<a name="l00048"></a>00048     }
<a name="l00049"></a><a class="code" href="classflopc_1_1MP__set__base.html#a73f1a85f84c089b2a4a7d6f3c70e37cb">00049</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__set__base.html#a73f1a85f84c089b2a4a7d6f3c70e37cb">checkStage</a>(<span class="keywordtype">int</span> i)<span class="keyword"> const </span>{
<a name="l00050"></a>00050       <span class="keywordflow">if</span> ((i&gt;=0) &amp;&amp; (i&lt;<a class="code" href="classflopc_1_1MP__set__base.html#a452804fd87bd5b35988e3e53760e7739">size</a>())) {
<a name="l00051"></a>00051         <span class="keywordflow">return</span> i*<a class="code" href="classflopc_1_1MP__set__base.html#aea0fabb7bae5ff08b0877798d26cfeed">isStage</a>();
<a name="l00052"></a>00052       } <span class="keywordflow">else</span> {
<a name="l00053"></a>00053         <span class="keywordflow">if</span> (<a class="code" href="classflopc_1_1MP__set__base.html#a95b541cd3f921238cd22c33c7fc92933">Cyclic</a> == <span class="keyword">true</span>) {
<a name="l00054"></a>00054           <span class="keywordflow">return</span> <a class="code" href="namespaceflopc.html#a08dd4589d5c34c15a6436de89b100d27" title="return the strictly positive modulus of two integers">mod</a>(i,<a class="code" href="classflopc_1_1MP__set__base.html#a452804fd87bd5b35988e3e53760e7739">size</a>())*<a class="code" href="classflopc_1_1MP__set__base.html#aea0fabb7bae5ff08b0877798d26cfeed">isStage</a>();
<a name="l00055"></a>00055         } <span class="keywordflow">else</span> {
<a name="l00056"></a>00056           <span class="keywordflow">return</span> <a class="code" href="namespaceflopc.html#ac260440d0c7db7b8b6bb659a90d7883a" title="Distinct return value on conditions where an index goes out of bounds.">outOfBound</a>;
<a name="l00057"></a>00057         }
<a name="l00058"></a>00058       }
<a name="l00059"></a>00059     }
<a name="l00061"></a><a class="code" href="classflopc_1_1MP__set__base.html#aea0fabb7bae5ff08b0877798d26cfeed">00061</a>     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__set__base.html#aea0fabb7bae5ff08b0877798d26cfeed">isStage</a>()<span class="keyword"> const </span>{
<a name="l00062"></a>00062       <span class="keywordflow">return</span> 0;
<a name="l00063"></a>00063     }
<a name="l00064"></a>00064 
<a name="l00065"></a><a class="code" href="classflopc_1_1MP__set__base.html#a95b541cd3f921238cd22c33c7fc92933">00065</a>     <span class="keywordtype">bool</span> <a class="code" href="classflopc_1_1MP__set__base.html#a95b541cd3f921238cd22c33c7fc92933">Cyclic</a>;
<a name="l00066"></a>00066   };
<a name="l00067"></a>00067 
<a name="l00068"></a>00068     
<a name="l00079"></a><a class="code" href="classflopc_1_1MP__set.html">00079</a>   <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a &quot;set&quot;.">MP_set_base</a> {
<a name="l00080"></a>00080   <span class="keyword">public</span>:
<a name="l00082"></a><a class="code" href="classflopc_1_1MP__set.html#af32ca4ffdefde75ee2e47ad08e2e5b08">00082</a>     <a class="code" href="classflopc_1_1MP__set.html#af32ca4ffdefde75ee2e47ad08e2e5b08" title="constructs a set with specific cardinality.">MP_set</a>(<span class="keywordtype">int</span> i = 0): <a class="code" href="classflopc_1_1MP__set.html#aa3262c7bcec4d1e96737b6b9e951533d">cardinality</a>(i) {}
<a name="l00087"></a><a class="code" href="classflopc_1_1MP__set.html#af58bc0876f09c4d493b547659dd6cf42">00087</a>     <a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a> <a class="code" href="classflopc_1_1MP__set.html#af58bc0876f09c4d493b547659dd6cf42" title="Constructs an MP_domain on the stack given an index expression into the set.">operator()</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i)<span class="keyword"> const </span>{
<a name="l00088"></a>00088       <span class="keywordflow">return</span> i-&gt;getDomain(const_cast&lt;MP_set*&gt;(<span class="keyword">this</span>));
<a name="l00089"></a>00089     }
<a name="l00091"></a><a class="code" href="classflopc_1_1MP__set.html#a3b1503473ec3b1587c59fc35e540fd88">00091</a>     <a class="code" href="classflopc_1_1MP__set.html#a3b1503473ec3b1587c59fc35e540fd88" title="constructs an MP_domain from the MP_set.">operator MP_domain</a>()<span class="keyword"> const </span>{
<a name="l00092"></a>00092       <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classflopc_1_1MP__index.html#a7ca05da16155e016a81533aae5d7ae0b">MP_domain_set</a>(<span class="keyword">this</span>,const_cast&lt;MP_set*&gt;(<span class="keyword">this</span>));
<a name="l00093"></a>00093     }
<a name="l00097"></a><a class="code" href="classflopc_1_1MP__set.html#a38f6df70902d4f1137f88fc8fd623c0b">00097</a>     <a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a> <a class="code" href="classflopc_1_1MP__set.html#a38f6df70902d4f1137f88fc8fd623c0b" title="constructs a domain by subsetting this MP_set where the MP_boolean evaluates to &#39;true&#39;">such_that</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__boolean.html" title="Reference counted class for all &quot;boolean&quot; types of data.This contains counters to ConstantBase pointe...">MP_boolean</a>&amp; b) {
<a name="l00098"></a>00098       <span class="keywordflow">return</span> (<a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a>(<span class="keyword">new</span> <a class="code" href="classflopc_1_1MP__index.html#a7ca05da16155e016a81533aae5d7ae0b">MP_domain_set</a>(<span class="keyword">this</span>,<span class="keyword">this</span>))).<a class="code" href="classflopc_1_1MP__domain.html#a2f7c02cf9c982e91249b60efdaf74d6b" title="Special conditional creation of a subset.">such_that</a>(b);
<a name="l00099"></a>00099     }
<a name="l00103"></a><a class="code" href="classflopc_1_1MP__set.html#ad1cb24ad38603ac9b96d23b569dd51f7">00103</a>     <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__set.html#ad1cb24ad38603ac9b96d23b569dd51f7">cyclic</a>() {
<a name="l00104"></a>00104       <a class="code" href="classflopc_1_1MP__set__base.html#a95b541cd3f921238cd22c33c7fc92933">Cyclic</a> = <span class="keyword">true</span>;
<a name="l00105"></a>00105     }
<a name="l00107"></a><a class="code" href="classflopc_1_1MP__set.html#aa4d9b1ab91d3194fb21103c61510c9d5">00107</a>     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__set.html#aa4d9b1ab91d3194fb21103c61510c9d5" title="getter for the cardinality of this MP_set.">size</a>()<span class="keyword"> const </span>{
<a name="l00108"></a>00108       <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__set.html#aa3262c7bcec4d1e96737b6b9e951533d">cardinality</a>;
<a name="l00109"></a>00109     }
<a name="l00110"></a><a class="code" href="classflopc_1_1MP__set.html#a037c7aa9b0310b87656aaab2a5936f33">00110</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__set.html#a037c7aa9b0310b87656aaab2a5936f33">last</a>() {
<a name="l00111"></a>00111       <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__set.html#aa3262c7bcec4d1e96737b6b9e951533d">cardinality</a>-1;
<a name="l00112"></a>00112     }
<a name="l00114"></a>00114     <span class="keyword">static</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a> &amp;<a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct &#39;empty&#39; MP_set.">getEmpty</a>();
<a name="l00115"></a>00115   <span class="keyword">private</span>:
<a name="l00116"></a><a class="code" href="classflopc_1_1MP__set.html#a052a22b1e31417faf8a59aeb77462058">00116</a>     <span class="keyword">static</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a> <a class="code" href="classflopc_1_1MP__set.html#a052a22b1e31417faf8a59aeb77462058">Empty</a>;
<a name="l00117"></a><a class="code" href="classflopc_1_1MP__set.html#aa3262c7bcec4d1e96737b6b9e951533d">00117</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__set.html#aa3262c7bcec4d1e96737b6b9e951533d">cardinality</a>;
<a name="l00118"></a>00118   };
<a name="l00119"></a>00119     
<a name="l00120"></a><a class="code" href="classflopc_1_1MP__stage.html">00120</a>   <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__stage.html">MP_stage</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a> {
<a name="l00121"></a>00121   <span class="keyword">public</span>:
<a name="l00122"></a><a class="code" href="classflopc_1_1MP__stage.html#a4d213e6bc52c8cf2f93fd72f785a86ea">00122</a>     <a class="code" href="classflopc_1_1MP__stage.html#a4d213e6bc52c8cf2f93fd72f785a86ea">MP_stage</a>(<span class="keywordtype">int</span> i = 0): <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>(i) {}
<a name="l00123"></a><a class="code" href="classflopc_1_1MP__stage.html#a97192fcaf81829f102c40fb101478892">00123</a>     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__stage.html#a97192fcaf81829f102c40fb101478892">isStage</a>()<span class="keyword"> const </span>{
<a name="l00124"></a>00124       <span class="keywordflow">return</span> 1;
<a name="l00125"></a>00125     }
<a name="l00126"></a>00126   };
<a name="l00127"></a>00127 
<a name="l00128"></a>00128   <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> nbr&gt; <span class="keyword">class </span>MP_subset;
<a name="l00129"></a>00129 
<a name="l00135"></a><a class="code" href="classflopc_1_1InsertFunctor.html">00135</a>   <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> nbr&gt; <span class="keyword">class </span><a class="code" href="classflopc_1_1InsertFunctor.html" title="Internal representation of a &quot;set&quot;.">InsertFunctor</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1Functor.html" title="Function object. Often used.">Functor</a> {
<a name="l00136"></a>00136   <span class="keyword">public</span>:
<a name="l00137"></a><a class="code" href="classflopc_1_1InsertFunctor.html#a44662e61d7202b0174af7919b9eafab4">00137</a>     <a class="code" href="classflopc_1_1InsertFunctor.html#a44662e61d7202b0174af7919b9eafab4">InsertFunctor</a>( <a class="code" href="classflopc_1_1MP__subset.html" title="Internal representation of a &quot;set&quot;.">MP_subset&lt;nbr&gt;</a>* s, vector&lt;MP_index_exp&gt; i) 
<a name="l00138"></a>00138       : <a class="code" href="classflopc_1_1InsertFunctor.html#a997e0f93459cd6aa7902ae52a07a2ab9">S</a>(s), <a class="code" href="classflopc_1_1InsertFunctor.html#a7d1c0f5086b6f8ce293d25eede13c6dc">I</a>(i) {}
<a name="l00139"></a><a class="code" href="classflopc_1_1InsertFunctor.html#ac4c7a31454ee5c99931df0e7b738aaab">00139</a>     <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1InsertFunctor.html#ac4c7a31454ee5c99931df0e7b738aaab">operator()</a>()<span class="keyword"> const </span>{ 
<a name="l00140"></a>00140       vector&lt;int&gt; elm(nbr);
<a name="l00141"></a>00141       <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;nbr; i++) {
<a name="l00142"></a>00142         elm[i] = <a class="code" href="classflopc_1_1InsertFunctor.html#a7d1c0f5086b6f8ce293d25eede13c6dc">I</a>[i]-&gt;evaluate();
<a name="l00143"></a>00143       }
<a name="l00144"></a>00144       <a class="code" href="classflopc_1_1InsertFunctor.html#a997e0f93459cd6aa7902ae52a07a2ab9">S</a>-&gt;insert(elm);
<a name="l00145"></a>00145     }
<a name="l00146"></a>00146   <span class="keyword">private</span>:
<a name="l00147"></a><a class="code" href="classflopc_1_1InsertFunctor.html#a997e0f93459cd6aa7902ae52a07a2ab9">00147</a>     <a class="code" href="classflopc_1_1MP__subset.html" title="Internal representation of a &quot;set&quot;.">MP_subset&lt;nbr&gt;</a>* <a class="code" href="classflopc_1_1InsertFunctor.html#a997e0f93459cd6aa7902ae52a07a2ab9">S</a>;
<a name="l00148"></a><a class="code" href="classflopc_1_1InsertFunctor.html#a7d1c0f5086b6f8ce293d25eede13c6dc">00148</a>     vector&lt;MP_index_exp&gt; <a class="code" href="classflopc_1_1InsertFunctor.html#a7d1c0f5086b6f8ce293d25eede13c6dc">I</a>;
<a name="l00149"></a>00149   };
<a name="l00150"></a>00150 
<a name="l00151"></a>00151   <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> nbr&gt; <span class="keyword">class </span><a class="code" href="classflopc_1_1SubsetRef.html" title="Internal representation of a &quot;set&quot;.">SubsetRef</a>;
<a name="l00152"></a>00152 
<a name="l00161"></a>00161   <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> nbr&gt;
<a name="l00162"></a><a class="code" href="classflopc_1_1MP__subset.html">00162</a>   <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__subset.html" title="Internal representation of a &quot;set&quot;.">MP_subset</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a> {
<a name="l00163"></a><a class="code" href="classflopc_1_1MP__subset.html#ad7a5476185b2efaefb5e20ce0238c173">00163</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__domain__subset.html" title="Range over which some other constuct is defined. Uses subsetting.This is one of the main public inter...">MP_domain_subset</a>&lt;nbr&gt;;
<a name="l00164"></a><a class="code" href="classflopc_1_1MP__subset.html#a2511ed43e091b30b199d36d6eabf3694">00164</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classflopc_1_1SubsetRef.html" title="Internal representation of a &quot;set&quot;.">SubsetRef</a>&lt;nbr&gt;;
<a name="l00165"></a>00165   <span class="keyword">public</span>:
<a name="l00166"></a><a class="code" href="classflopc_1_1MP__subset.html#a3016602b10eea3ae634f4d779cd2127f">00166</a>     <a class="code" href="classflopc_1_1MP__subset.html#a3016602b10eea3ae634f4d779cd2127f">MP_subset</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>&amp; s1, 
<a name="l00167"></a>00167               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>&amp; s2=<a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct &#39;empty&#39; MP_set.">MP_set::getEmpty</a>(), 
<a name="l00168"></a>00168               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>&amp; s3=<a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct &#39;empty&#39; MP_set.">MP_set::getEmpty</a>(), 
<a name="l00169"></a>00169               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>&amp; s4=<a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct &#39;empty&#39; MP_set.">MP_set::getEmpty</a>(), 
<a name="l00170"></a>00170               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>&amp; s5=<a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct &#39;empty&#39; MP_set.">MP_set::getEmpty</a>()) {
<a name="l00171"></a>00171       <a class="code" href="classflopc_1_1MP__subset.html#aea50253a1ceed25074be4cd94a4dd2ec">S</a> = makeVector&lt;nbr,const MP_set*&gt;(&amp;s1,&amp;s2,&amp;s3,&amp;s4,&amp;s5);
<a name="l00172"></a>00172     }
<a name="l00173"></a>00173 
<a name="l00174"></a><a class="code" href="classflopc_1_1MP__subset.html#a2d9ab55a5b0bd9999fd2512348bd46a3">00174</a>     <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__subset.html#a2d9ab55a5b0bd9999fd2512348bd46a3">display</a>(<span class="keyword">const</span> std::string&amp; s = <span class="stringliteral">&quot;&quot;</span>)<span class="keyword"> const </span>{
<a name="l00175"></a>00175       std::map&lt;std::vector&lt;int&gt;, <span class="keywordtype">int</span>&gt;::const_iterator i;
<a name="l00176"></a>00176       cout&lt;&lt;s&lt;&lt;endl;
<a name="l00177"></a>00177       <span class="keywordflow">for</span> (i = <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.begin(); i != <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.end(); i++) {
<a name="l00178"></a>00178         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j&lt;nbr; j++) {
<a name="l00179"></a>00179           cout&lt;&lt;(*i).first[j]&lt;&lt;<span class="stringliteral">&quot;  &quot;</span>;
<a name="l00180"></a>00180         }
<a name="l00181"></a>00181         cout&lt;&lt;endl;
<a name="l00182"></a>00182       }
<a name="l00183"></a>00183     }
<a name="l00184"></a>00184 
<a name="l00185"></a><a class="code" href="classflopc_1_1MP__subset.html#a54329220c24b64cf962a8b7059caba91">00185</a>     <a class="code" href="classflopc_1_1MP__subset.html#a54329220c24b64cf962a8b7059caba91">MP_subset</a>(vector&lt;const MP_set*&gt; s) : <a class="code" href="classflopc_1_1MP__subset.html#aea50253a1ceed25074be4cd94a4dd2ec">S</a>(s) {}
<a name="l00186"></a>00186 
<a name="l00187"></a><a class="code" href="classflopc_1_1MP__subset.html#a5b14272bd25e0d949295e591d5d40124">00187</a>     <a class="code" href="classflopc_1_1MP__subset.html#a5b14272bd25e0d949295e591d5d40124">~MP_subset</a>() {}
<a name="l00188"></a>00188 
<a name="l00189"></a><a class="code" href="classflopc_1_1MP__subset.html#aa03b340fc82e4d69e96e2ef69be12ec2">00189</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__subset.html#aa03b340fc82e4d69e96e2ef69be12ec2">operator()</a>(<span class="keywordtype">int</span> i1, <span class="keywordtype">int</span> i2=0, <span class="keywordtype">int</span> i3=0, <span class="keywordtype">int</span> i4=0, <span class="keywordtype">int</span> i5=0) {
<a name="l00190"></a>00190       std::map&lt;vector&lt;int&gt;, <span class="keywordtype">int</span>&gt;::const_iterator <a class="code" href="group__PublicInterface.html#ga8e1c2165d6c219a5e06e795ae43aaecc" title="for returning non-negative value of the constant.This is used in the formation of an expression...">pos</a>;
<a name="l00191"></a>00191       pos = <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.find(makeVector&lt;nbr&gt;(i1, i2, i3, i4, i5));
<a name="l00192"></a>00192       <span class="keywordflow">if</span> (pos==<a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.end()) {
<a name="l00193"></a>00193         <span class="keywordflow">return</span> <a class="code" href="namespaceflopc.html#ac260440d0c7db7b8b6bb659a90d7883a" title="Distinct return value on conditions where an index goes out of bounds.">outOfBound</a>;
<a name="l00194"></a>00194       } <span class="keywordflow">else</span> {
<a name="l00195"></a>00195         <span class="keywordflow">return</span> pos-&gt;second;
<a name="l00196"></a>00196       }
<a name="l00197"></a>00197     }
<a name="l00198"></a>00198 
<a name="l00199"></a><a class="code" href="classflopc_1_1MP__subset.html#a98b8f24de4d9200cc32d891f4717a377">00199</a>     <a class="code" href="classflopc_1_1SubsetRef.html" title="Internal representation of a &quot;set&quot;.">SubsetRef&lt;nbr&gt;</a>&amp; <a class="code" href="classflopc_1_1MP__subset.html#aa03b340fc82e4d69e96e2ef69be12ec2">operator()</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i1, 
<a name="l00200"></a>00200                                <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i2=<a class="code" href="classflopc_1_1MP__index.html#aae7a076f76ef214c86209cd72d48108b" title="returns a reference to the distinct &quot;empty&quot; index.">MP_index::getEmpty</a>(),  
<a name="l00201"></a>00201                                <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i3=<a class="code" href="classflopc_1_1MP__index.html#aae7a076f76ef214c86209cd72d48108b" title="returns a reference to the distinct &quot;empty&quot; index.">MP_index::getEmpty</a>(),
<a name="l00202"></a>00202                                <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i4=<a class="code" href="classflopc_1_1MP__index.html#aae7a076f76ef214c86209cd72d48108b" title="returns a reference to the distinct &quot;empty&quot; index.">MP_index::getEmpty</a>(),
<a name="l00203"></a>00203                                <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i5=<a class="code" href="classflopc_1_1MP__index.html#aae7a076f76ef214c86209cd72d48108b" title="returns a reference to the distinct &quot;empty&quot; index.">MP_index::getEmpty</a>()) {
<a name="l00204"></a>00204       <span class="keywordflow">return</span> *<span class="keyword">new</span> <a class="code" href="classflopc_1_1SubsetRef.html" title="Internal representation of a &quot;set&quot;.">SubsetRef&lt;nbr&gt;</a>(<span class="keyword">this</span>,i1,i2,i3,i4,i5);
<a name="l00205"></a>00205     }
<a name="l00206"></a>00206 
<a name="l00207"></a><a class="code" href="classflopc_1_1MP__subset.html#a7f8decafad8d676dcf150585e3cf3755">00207</a>     <a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a>&amp; <a class="code" href="classflopc_1_1MP__subset.html#a7f8decafad8d676dcf150585e3cf3755">operator()</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1SUBSETREF.html" title="Internal representation of a &quot;set&quot;.">SUBSETREF</a>&amp; s) {
<a name="l00208"></a>00208       <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a>(s);
<a name="l00209"></a>00209     }
<a name="l00210"></a>00210 
<a name="l00211"></a><a class="code" href="classflopc_1_1MP__subset.html#aeb7e29ed4995af9b3100fb0de6383057">00211</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__subset.html#aeb7e29ed4995af9b3100fb0de6383057">evaluate</a>(<span class="keyword">const</span> vector&lt;MP_index*&gt;&amp; I)<span class="keyword"> const </span>{
<a name="l00212"></a>00212       vector&lt;int&gt; vi;
<a name="l00213"></a>00213       <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k=0; k&lt;nbr; k++) {
<a name="l00214"></a>00214         <span class="keywordtype">int</span> temp = I[k]-&gt;evaluate();
<a name="l00215"></a>00215         vi.push_back(temp);
<a name="l00216"></a>00216       }
<a name="l00217"></a>00217       std::map&lt;vector&lt;int&gt;, <span class="keywordtype">int</span>&gt;::const_iterator <a class="code" href="group__PublicInterface.html#ga8e1c2165d6c219a5e06e795ae43aaecc" title="for returning non-negative value of the constant.This is used in the formation of an expression...">pos</a>;
<a name="l00218"></a>00218       pos = <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.find(vi);
<a name="l00219"></a>00219       <span class="keywordflow">if</span> (pos==<a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.end()) {
<a name="l00220"></a>00220         <span class="keywordflow">return</span> <a class="code" href="namespaceflopc.html#ac260440d0c7db7b8b6bb659a90d7883a" title="Distinct return value on conditions where an index goes out of bounds.">outOfBound</a>;
<a name="l00221"></a>00221       } <span class="keywordflow">else</span> {
<a name="l00222"></a>00222         <span class="keywordflow">return</span> pos-&gt;second;
<a name="l00223"></a>00223       }
<a name="l00224"></a>00224     }
<a name="l00225"></a>00225     
<a name="l00226"></a><a class="code" href="classflopc_1_1MP__subset.html#acbe6ad66d2d1ba2eb43831b8bc73ca42">00226</a>     <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__subset.html#acbe6ad66d2d1ba2eb43831b8bc73ca42">insert</a>(<span class="keyword">const</span> vector&lt;int&gt; &amp;args) {
<a name="l00227"></a>00227       <span class="keywordtype">bool</span> isOk = <span class="keyword">true</span>;
<a name="l00228"></a>00228       <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;nbr; i++) {
<a name="l00229"></a>00229         <span class="keywordflow">if</span> ( <a class="code" href="classflopc_1_1MP__subset.html#aea50253a1ceed25074be4cd94a4dd2ec">S</a>[i]-&gt;<a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">check</a>(args[i]) == <a class="code" href="namespaceflopc.html#ac260440d0c7db7b8b6bb659a90d7883a" title="Distinct return value on conditions where an index goes out of bounds.">outOfBound</a> ) {
<a name="l00230"></a>00230           isOk = <span class="keyword">false</span>;
<a name="l00231"></a>00231         }
<a name="l00232"></a>00232       }
<a name="l00233"></a>00233       <span class="keywordflow">if</span> (isOk == <span class="keyword">true</span>) {
<a name="l00234"></a>00234         std::map&lt;vector&lt;int&gt;, <span class="keywordtype">int</span>&gt;::const_iterator <a class="code" href="group__PublicInterface.html#ga8e1c2165d6c219a5e06e795ae43aaecc" title="for returning non-negative value of the constant.This is used in the formation of an expression...">pos</a>;
<a name="l00235"></a>00235         pos = <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.find(args);
<a name="l00236"></a>00236         <span class="keywordflow">if</span> (pos==<a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.end()) {  <span class="comment">// insert if not existent</span>
<a name="l00237"></a>00237           <span class="keyword">const</span> <span class="keywordtype">int</span> v = <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.size();
<a name="l00238"></a>00238           <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>[args] = v;
<a name="l00239"></a>00239         }
<a name="l00240"></a>00240       }
<a name="l00241"></a>00241     }
<a name="l00242"></a><a class="code" href="classflopc_1_1MP__subset.html#a12d8381dc97875288f2f365ec2c5299d">00242</a>     <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__subset.html#a12d8381dc97875288f2f365ec2c5299d">insert</a>(<span class="keywordtype">int</span> i1, <span class="keywordtype">int</span> i2=0, <span class="keywordtype">int</span> i3=0, <span class="keywordtype">int</span> i4=0, <span class="keywordtype">int</span> i5=0) {
<a name="l00243"></a>00243       <a class="code" href="classflopc_1_1MP__subset.html#acbe6ad66d2d1ba2eb43831b8bc73ca42">insert</a>(makeVector&lt;nbr&gt;(i1, i2, i3, i4, i5));
<a name="l00244"></a>00244     }
<a name="l00245"></a><a class="code" href="classflopc_1_1MP__subset.html#a5a9180653b74a4beddc502a8ec035a74">00245</a>     <span class="keyword">const</span> <a class="code" href="classflopc_1_1InsertFunctor.html" title="Internal representation of a &quot;set&quot;.">InsertFunctor&lt;nbr&gt;</a>&amp; <a class="code" href="classflopc_1_1MP__subset.html#acbe6ad66d2d1ba2eb43831b8bc73ca42">insert</a>(<a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a> i1, 
<a name="l00246"></a>00246                                      <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a> i2=<a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(), 
<a name="l00247"></a>00247                                      <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a> i3=<a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(), 
<a name="l00248"></a>00248                                      <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a> i4=<a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(), 
<a name="l00249"></a>00249                                      <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a> i5=<a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>()) {
<a name="l00250"></a>00250       <span class="keywordflow">return</span> *<span class="keyword">new</span> <a class="code" href="classflopc_1_1InsertFunctor.html" title="Internal representation of a &quot;set&quot;.">InsertFunctor&lt;nbr&gt;</a>(<span class="keyword">this</span>,makeVector&lt;nbr&gt;(i1, i2, i3, i4, i5));
<a name="l00251"></a>00251     }
<a name="l00252"></a><a class="code" href="classflopc_1_1MP__subset.html#a23eb4849ac278efa12fff38e46e65788">00252</a>     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1MP__subset.html#a23eb4849ac278efa12fff38e46e65788" title="getter for the cardinality of this MP_set.">size</a>()<span class="keyword"> const </span>{
<a name="l00253"></a>00253       <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>.size();
<a name="l00254"></a>00254     }
<a name="l00255"></a>00255 
<a name="l00256"></a>00256   <span class="keyword">private</span>:
<a name="l00257"></a><a class="code" href="classflopc_1_1MP__subset.html#aea50253a1ceed25074be4cd94a4dd2ec">00257</a>     vector&lt;const MP_set*&gt; <a class="code" href="classflopc_1_1MP__subset.html#aea50253a1ceed25074be4cd94a4dd2ec">S</a>; 
<a name="l00258"></a><a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">00258</a>     std::map&lt;std::vector&lt;int&gt;, <span class="keywordtype">int</span>&gt; <a class="code" href="classflopc_1_1MP__subset.html#ab099b5c64f167f1698e481dc47f50469">elements</a>;
<a name="l00259"></a>00259   };
<a name="l00260"></a>00260 
<a name="l00269"></a><a class="code" href="classflopc_1_1SUBSETREF.html">00269</a>   <span class="keyword">class </span><a class="code" href="classflopc_1_1SUBSETREF.html" title="Internal representation of a &quot;set&quot;.">SUBSETREF</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1MP__index__base.html" title="Internal representation of a index.">MP_index_base</a> {
<a name="l00270"></a>00270   <span class="keyword">public</span>:
<a name="l00271"></a><a class="code" href="classflopc_1_1SUBSETREF.html#af034fa9a7d3f38f0450c354041311147">00271</a>     <span class="keyword">virtual</span> <a class="code" href="classflopc_1_1MP__index.html" title="Representation of an index.This is one of the main public interface classes. It is used to iterate th...">MP_index</a>* <a class="code" href="classflopc_1_1SUBSETREF.html#af034fa9a7d3f38f0450c354041311147">getIndex</a>()<span class="keyword"> const </span>{
<a name="l00272"></a>00272       <span class="keywordflow">return</span> 0;
<a name="l00273"></a>00273     }
<a name="l00274"></a><a class="code" href="classflopc_1_1SUBSETREF.html#a48fc7dfb94ca254af545ca63f7fe8133">00274</a>     <span class="keyword">virtual</span> <a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a> <a class="code" href="classflopc_1_1SUBSETREF.html#a48fc7dfb94ca254af545ca63f7fe8133">getDomain</a>(<a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>* s)<span class="keyword"> const </span>{
<a name="l00275"></a>00275       <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__domain.html#acd2840f77274ad4bbdd481ce3223f4d0" title="returns a reference to the &quot;empty&quot; set.">MP_domain::getEmpty</a>();
<a name="l00276"></a>00276     }
<a name="l00277"></a><a class="code" href="classflopc_1_1SUBSETREF.html#a7b2860793dc1ea3c91cbda2a251bc089">00277</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1SUBSETREF.html#a7b2860793dc1ea3c91cbda2a251bc089">evaluate</a>()<span class="keyword"> const </span>{
<a name="l00278"></a>00278       <span class="keywordflow">return</span> 0;
<a name="l00279"></a>00279     }
<a name="l00280"></a>00280   };
<a name="l00281"></a>00281 
<a name="l00289"></a>00289   <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> nbr&gt;
<a name="l00290"></a><a class="code" href="classflopc_1_1SubsetRef.html">00290</a>   <span class="keyword">class </span><a class="code" href="classflopc_1_1SubsetRef.html" title="Internal representation of a &quot;set&quot;.">SubsetRef</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1SUBSETREF.html" title="Internal representation of a &quot;set&quot;.">SUBSETREF</a> {
<a name="l00291"></a>00291   <span class="keyword">public</span>:
<a name="l00292"></a><a class="code" href="classflopc_1_1SubsetRef.html#a5334b617deb96877c094ac465fc72f94">00292</a>     <a class="code" href="classflopc_1_1SubsetRef.html#a5334b617deb96877c094ac465fc72f94">SubsetRef</a>(<a class="code" href="classflopc_1_1MP__subset.html" title="Internal representation of a &quot;set&quot;.">MP_subset&lt;nbr&gt;</a>* s, 
<a name="l00293"></a>00293               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i1,
<a name="l00294"></a>00294               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i2,
<a name="l00295"></a>00295               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i3,
<a name="l00296"></a>00296               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i4,
<a name="l00297"></a>00297               <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>&amp; i5) : 
<a name="l00298"></a>00298       <a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">S</a>(s),<a class="code" href="classflopc_1_1SubsetRef.html#a2d03a9905f520f3955a7f33c97f36818">I1</a>(i1),<a class="code" href="classflopc_1_1SubsetRef.html#ac8c2bec18f657b7c5c40a1820b492745">I2</a>(i2),<a class="code" href="classflopc_1_1SubsetRef.html#a25e1f81ceb4ec271d4f5867fe0541e6c">I3</a>(i3),<a class="code" href="classflopc_1_1SubsetRef.html#a29f4ea83947aefa0440dda232f3a7936">I4</a>(i4),<a class="code" href="classflopc_1_1SubsetRef.html#ad54ec99bc678c75897dadfa08b2d778d">I5</a>(i5) {} 
<a name="l00299"></a>00299     
<a name="l00300"></a><a class="code" href="classflopc_1_1SubsetRef.html#a40a0eb6d0e2c821e5df1ee8ea5b82d8c">00300</a>     <a class="code" href="classflopc_1_1SubsetRef.html#a40a0eb6d0e2c821e5df1ee8ea5b82d8c">operator MP_domain</a>()<span class="keyword"> const </span>{
<a name="l00301"></a>00301 <span class="comment">//          MP_domain_base* base;</span>
<a name="l00302"></a>00302 <span class="comment">//          base = new MP_domain_subset&lt;nbr&gt;(S,</span>
<a name="l00303"></a>00303 <span class="comment">//              makeVector&lt;nbr&gt;(I1-&gt;getIndex(), I2-&gt;getIndex(), </span>
<a name="l00304"></a>00304 <span class="comment">//                              I3-&gt;getIndex(), I4-&gt;getIndex(), </span>
<a name="l00305"></a>00305 <span class="comment">//                              I5-&gt;getIndex()) );</span>
<a name="l00306"></a>00306 <span class="comment">//          base-&gt;such_that(B);</span>
<a name="l00307"></a>00307 <span class="comment">//          return base; </span>
<a name="l00308"></a>00308       <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classflopc_1_1MP__domain__subset.html" title="Range over which some other constuct is defined. Uses subsetting.This is one of the main public inter...">MP_domain_subset&lt;nbr&gt;</a>(<a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">S</a>,
<a name="l00309"></a>00309                                        makeVector&lt;nbr&gt;(<a class="code" href="classflopc_1_1SubsetRef.html#a2d03a9905f520f3955a7f33c97f36818">I1</a>-&gt;getIndex(), <a class="code" href="classflopc_1_1SubsetRef.html#ac8c2bec18f657b7c5c40a1820b492745">I2</a>-&gt;getIndex(), 
<a name="l00310"></a>00310                                                        <a class="code" href="classflopc_1_1SubsetRef.html#a25e1f81ceb4ec271d4f5867fe0541e6c">I3</a>-&gt;getIndex(), <a class="code" href="classflopc_1_1SubsetRef.html#a29f4ea83947aefa0440dda232f3a7936">I4</a>-&gt;getIndex(), 
<a name="l00311"></a>00311                                                        <a class="code" href="classflopc_1_1SubsetRef.html#ad54ec99bc678c75897dadfa08b2d778d">I5</a>-&gt;getIndex()) );
<a name="l00312"></a>00312     }
<a name="l00313"></a>00313     
<a name="l00314"></a><a class="code" href="classflopc_1_1SubsetRef.html#a80556acacd6004ece32d6d924fdcdb4b">00314</a>     <span class="keyword">virtual</span> <a class="code" href="classflopc_1_1MP__domain.html" title="Range over which some other constuct is defined.This is one of the main public interface classes...">MP_domain</a> <a class="code" href="classflopc_1_1SubsetRef.html#a80556acacd6004ece32d6d924fdcdb4b">getDomain</a>(<a class="code" href="classflopc_1_1MP__set.html" title="Representation of a set for indexing into some other construct.This is one of the main public interfa...">MP_set</a>* s)<span class="keyword"> const </span>{
<a name="l00315"></a>00315       <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classflopc_1_1MP__domain__subset.html" title="Range over which some other constuct is defined. Uses subsetting.This is one of the main public inter...">MP_domain_subset&lt;nbr&gt;</a>(<a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">S</a>,
<a name="l00316"></a>00316                                        makeVector&lt;nbr&gt;(<a class="code" href="classflopc_1_1SubsetRef.html#a2d03a9905f520f3955a7f33c97f36818">I1</a>-&gt;getIndex(), <a class="code" href="classflopc_1_1SubsetRef.html#ac8c2bec18f657b7c5c40a1820b492745">I2</a>-&gt;getIndex(), 
<a name="l00317"></a>00317                                                        <a class="code" href="classflopc_1_1SubsetRef.html#a25e1f81ceb4ec271d4f5867fe0541e6c">I3</a>-&gt;getIndex(), <a class="code" href="classflopc_1_1SubsetRef.html#a29f4ea83947aefa0440dda232f3a7936">I4</a>-&gt;getIndex(), 
<a name="l00318"></a>00318                                                        <a class="code" href="classflopc_1_1SubsetRef.html#ad54ec99bc678c75897dadfa08b2d778d">I5</a>-&gt;getIndex()) );
<a name="l00319"></a>00319     }
<a name="l00320"></a>00320 
<a name="l00321"></a>00321 <span class="comment">//     const MP_domain&amp; such_that(const MP_boolean&amp; b) {</span>
<a name="l00322"></a>00322 <span class="comment">//       return MP_domain().such_that(b);</span>
<a name="l00323"></a>00323 <span class="comment">//     }</span>
<a name="l00324"></a>00324 
<a name="l00325"></a><a class="code" href="classflopc_1_1SubsetRef.html#a22d20c2ca707676143e8b6e6c09d9ca2">00325</a>     <a class="code" href="classflopc_1_1SubsetRef.html" title="Internal representation of a &quot;set&quot;.">SubsetRef</a>&amp; <a class="code" href="classflopc_1_1SubsetRef.html#a22d20c2ca707676143e8b6e6c09d9ca2">such_that</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__boolean.html" title="Reference counted class for all &quot;boolean&quot; types of data.This contains counters to ConstantBase pointe...">MP_boolean</a>&amp; b) {
<a name="l00326"></a>00326       <a class="code" href="classflopc_1_1SubsetRef.html#adc59674fd1b0990626c708ac8475856f">B</a> = b;
<a name="l00327"></a>00327       <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00328"></a>00328     }
<a name="l00329"></a>00329 
<a name="l00330"></a><a class="code" href="classflopc_1_1SubsetRef.html#a605e7189820a1b31fb6b863dca329565">00330</a>     <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1SubsetRef.html#a605e7189820a1b31fb6b863dca329565">evaluate</a>()<span class="keyword"> const </span>{
<a name="l00331"></a>00331       vector&lt;MP_index_exp&gt; I = makeVector&lt;nbr&gt;(<a class="code" href="classflopc_1_1SubsetRef.html#a2d03a9905f520f3955a7f33c97f36818">I1</a>,<a class="code" href="classflopc_1_1SubsetRef.html#ac8c2bec18f657b7c5c40a1820b492745">I2</a>,<a class="code" href="classflopc_1_1SubsetRef.html#a25e1f81ceb4ec271d4f5867fe0541e6c">I3</a>,<a class="code" href="classflopc_1_1SubsetRef.html#a29f4ea83947aefa0440dda232f3a7936">I4</a>,<a class="code" href="classflopc_1_1SubsetRef.html#ad54ec99bc678c75897dadfa08b2d778d">I5</a>);
<a name="l00332"></a>00332       vector&lt;int&gt; vi;
<a name="l00333"></a>00333       <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k=0; k&lt;nbr; k++) {
<a name="l00334"></a>00334         <span class="keywordtype">int</span> temp = I[k]-&gt;evaluate();
<a name="l00335"></a>00335         vi.push_back(temp);
<a name="l00336"></a>00336       }
<a name="l00337"></a>00337       std::map&lt;vector&lt;int&gt;, <span class="keywordtype">int</span>&gt;::const_iterator <a class="code" href="group__PublicInterface.html#ga8e1c2165d6c219a5e06e795ae43aaecc" title="for returning non-negative value of the constant.This is used in the formation of an expression...">pos</a>;
<a name="l00338"></a>00338       pos = <a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">S</a>-&gt;elements.find(vi);
<a name="l00339"></a>00339       <span class="keywordflow">if</span> (pos==<a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">S</a>-&gt;elements.end()) {
<a name="l00340"></a>00340         <span class="keywordflow">return</span> <a class="code" href="namespaceflopc.html#ac260440d0c7db7b8b6bb659a90d7883a" title="Distinct return value on conditions where an index goes out of bounds.">outOfBound</a>;
<a name="l00341"></a>00341       } <span class="keywordflow">else</span> {
<a name="l00342"></a>00342         <span class="keywordflow">return</span> pos-&gt;second;
<a name="l00343"></a>00343       }
<a name="l00344"></a>00344 
<a name="l00345"></a>00345     }
<a name="l00346"></a><a class="code" href="classflopc_1_1SubsetRef.html#a7c454bd6876478a107f11be505ba34b4">00346</a>     <a class="code" href="classflopc_1_1MP__index.html" title="Representation of an index.This is one of the main public interface classes. It is used to iterate th...">MP_index</a>* <a class="code" href="classflopc_1_1SubsetRef.html#a7c454bd6876478a107f11be505ba34b4">getIndex</a>()<span class="keyword"> const </span>{
<a name="l00347"></a>00347       <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">S</a>;
<a name="l00348"></a>00348     }
<a name="l00349"></a><a class="code" href="classflopc_1_1SubsetRef.html#adc59674fd1b0990626c708ac8475856f">00349</a>     <a class="code" href="classflopc_1_1MP__boolean.html" title="Reference counted class for all &quot;boolean&quot; types of data.This contains counters to ConstantBase pointe...">MP_boolean</a> <a class="code" href="classflopc_1_1SubsetRef.html#adc59674fd1b0990626c708ac8475856f">B</a>;
<a name="l00350"></a><a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">00350</a>     <a class="code" href="classflopc_1_1MP__subset.html" title="Internal representation of a &quot;set&quot;.">MP_subset&lt;nbr&gt;</a>* <a class="code" href="classflopc_1_1SubsetRef.html#a4dfce7b18abfdf876c2efa63d846a7da">S</a>;
<a name="l00351"></a><a class="code" href="classflopc_1_1SubsetRef.html#ad54ec99bc678c75897dadfa08b2d778d">00351</a>     <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a> <a class="code" href="classflopc_1_1SubsetRef.html#a2d03a9905f520f3955a7f33c97f36818">I1</a>,<a class="code" href="classflopc_1_1SubsetRef.html#ac8c2bec18f657b7c5c40a1820b492745">I2</a>,<a class="code" href="classflopc_1_1SubsetRef.html#a25e1f81ceb4ec271d4f5867fe0541e6c">I3</a>,<a class="code" href="classflopc_1_1SubsetRef.html#a29f4ea83947aefa0440dda232f3a7936">I4</a>,<a class="code" href="classflopc_1_1SubsetRef.html#ad54ec99bc678c75897dadfa08b2d778d">I5</a>;
<a name="l00352"></a>00352   };
<a name="l00353"></a>00353 
<a name="l00354"></a>00354 } <span class="comment">// End of namespace flopc</span>
<a name="l00355"></a>00355 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Jun 28 2011 23:46:24 for FLOPC++ by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>