Revision 1921 trunk/src/linad99/setin.cpp
setin.cpp (revision 1921)  

196  196 
dvector& v=(dvector&) _v; 
197  197 
int min=x.indexmin(); 
198  198 
int max=min+n1; 
199 
#ifdef SAFE_ARRAYS 

200  199 
if (max >x.indexmax()) 
201  200 
{ 
202  201 
cerr << "index out of range in set_value_patial(const dvar_vector&, ... " 
203  202 
<< endl; 
204  203 
} 
205 
#endif 

206  204 
for (int i=min;i<=max;i++) 
207  205 
{ 
208  206 
v(ii++)=x(i); 
...  ...  
220  218 
dvector& v=(dvector&) _v; 
221  219 
int min=x.indexmin(); 
222  220 
int max=min+n1; 
223 
#ifdef SAFE_ARRAYS 

224  221 
if (max >x.indexmax()) 
225  222 
{ 
226  223 
cerr << "index out of range in set_value_patial(const dvar_vector&, ... " 
227  224 
<< endl; 
228  225 
} 
229 
#endif 

230  226 
for (int i=min;i<=max;i++) 
231  227 
{ 
232  228 
v(ii++)=boundpin(x(i),fmin,fmax); 
...  ...  
259  255 
dvector& v=(dvector&) _v; 
260  256 
int min=x.indexmin(); 
261  257 
int max=min+n1; 
262 
#ifdef SAFE_ARRAYS 

263  258 
if (max >x.indexmax()) 
264  259 
{ 
265  260 
cerr << "index out of range in set_value_patial(const dvar_vector&, ... " 
266  261 
<< endl; 
267  262 
} 
268 
#endif 

269  263 
for (int i=min;i<=max;i++) 
270  264 
{ 
271  265 
v(ii++)=value(x(i)); 
...  ...  
283  277 
int min=x.indexmin(); 
284  278 
int max=min+n1; 
285  279 
dvector& v=(dvector&) _v; 
286 
#ifdef SAFE_ARRAYS 

287  280 
if (max >x.indexmax()) 
288  281 
{ 
289  282 
cerr << "index out of range in set_value_patial(const dvar_vector&, ... " 
290  283 
<< endl; 
291  284 
} 
292 
#endif 

293  285 
for (int i=min;i<=max;i++) 
294  286 
{ 
295  287 
v(ii++)=boundpin(x(i),fmin,fmax); 
Also available in: Unified diff