C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
ivector.inl
1 /*
2 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
3 **
4 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
5 ** Universitaet Karlsruhe, Germany
6 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
7 ** Universitaet Wuppertal, Germany
8 **
9 ** This library is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU Library General Public
11 ** License as published by the Free Software Foundation; either
12 ** version 2 of the License, or (at your option) any later version.
13 **
14 ** This library is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** Library General Public License for more details.
18 **
19 ** You should have received a copy of the GNU Library General Public
20 ** License along with this library; if not, write to the Free
21 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 
24 /* CVS $Id: ivector.inl,v 1.27 2014/01/30 17:23:46 cxsc Exp $ */
25 
26 #ifndef _CXSC_IVECTOR_INL_INCLUDED
27 #define _CXSC_IVECTOR_INL_INCLUDED
28 
29 namespace cxsc {
30 
31  INLINE ivector::ivector () throw():dat(NULL),l(1),u(0),size(0)
32  {
33  }
34 
35  INLINE ivector::ivector(const int &i) throw():l(1),u(i),size(i)
36  {
37  dat=new interval[i];
38  }
39 
40 #ifdef OLD_CXSC
41  INLINE ivector::ivector(const class index &i) throw():l(1),u(i._int()),size(i._int())
42  {
43  dat=new interval[i._int()];
44  }
45 #endif
46 
47  INLINE ivector::ivector(const int &i1,const int &i2)
48 #if(CXSC_INDEX_CHECK)
49  throw(ERROR_IVECTOR_WRONG_BOUNDARIES,ERROR_IVECTOR_NO_MORE_MEMORY):l(i1),u(i2),size(i2-i1+1)
50 #else
51  throw():l(i1),u(i2),size(i2-i1+1)
52 #endif
53  {
54 #if(CXSC_INDEX_CHECK)
55  if(i1>i2) cxscthrow(ERROR_IVECTOR_WRONG_BOUNDARIES("ivector::ivector(const int &i1,const int &i2)"));
56 #endif
57  dat=new interval[size];
58  }
59 
60  INLINE ivector::ivector(const ivector_slice &rs) throw():l(rs.start),u(rs.end),size(rs.end-rs.start+1)
61  {
62  dat=new interval[size];
63  for(int i=0, j=l-rs.l;i<size;i++,j++)
64  dat[i]=rs.dat[j];
65  }
66 
67  INLINE ivector::ivector(const ivector &v) throw():l(v.l),u(v.u),size(v.size)
68  {
69  dat=new interval[size];
70  for (int i=0;i<size;i++)
71  dat[i]=v.dat[i];
72  }
73 
74  INLINE ivector::ivector(const interval &r) throw():l(1),u(1),size(1)
75  {
76  dat=new interval[1];
77  *dat=r;
78  }
79 
80  INLINE ivector::ivector(const rvector_slice &rs) throw():l(rs.start),u(rs.end),size(rs.end-rs.start+1)
81  {
82  dat=new interval[size];
83  for(int i=0, j=l-rs.l;i<size;i++,j++)
84  dat[i]=rs.dat[j];
85  }
86 
87  INLINE ivector::ivector(const rvector &v) throw():l(v.l),u(v.u),size(v.size)
88  {
89  dat=new interval[size];
90  for (int i=0;i<size;i++)
91  dat[i]=v.dat[i];
92  }
93 
94  INLINE ivector::ivector(const real &r) throw():l(1),u(1),size(1)
95  {
96  dat=new interval[1];
97  *dat=r;
98  }
99 
100  INLINE interval & ivector::operator [](const int &i) const
101 #if(CXSC_INDEX_CHECK)
102  throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
103 #else
104  throw()
105 #endif
106  {
107 #if(CXSC_INDEX_CHECK)
108  if(i<l||i>u) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector::operator [](const int &i) const"));
109 #endif
110  return dat[i-l];
111  }
112 
113  INLINE interval & ivector::operator [](const int &i)
114 #if(CXSC_INDEX_CHECK)
115  throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
116 #else
117  throw()
118 #endif
119  {
120 #if(CXSC_INDEX_CHECK)
121  if(i<l||i>u) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector::operator [](const int &i)"));
122 #endif
123  return dat[i-l];
124  }
125 
126  INLINE interval & ivector_slice::operator [](const int &i) const
127 #if(CXSC_INDEX_CHECK)
128  throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
129 #else
130  throw()
131 #endif
132  {
133 #if(CXSC_INDEX_CHECK)
134  if(i<start||i>end) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector_slice::operator [](const int &i) const"));
135 #endif
136  return dat[i-l];
137  }
138 
139  INLINE interval & ivector_slice::operator [](const int &i)
140 #if(CXSC_INDEX_CHECK)
141  throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
142 #else
143  throw()
144 #endif
145  {
146 #if(CXSC_INDEX_CHECK)
147  if(i<start||i>end) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector_slice::operator [](const int &i)"));
148 #endif
149  return dat[i-l];
150  }
151 
152 
153  INLINE ivector_slice ivector::operator ()(const int &i)
154 #if(CXSC_INDEX_CHECK)
155  throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
156 #else
157  throw()
158 #endif
159  {
160 #if(CXSC_INDEX_CHECK)
161  if(1<l||i>u) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector::operator ()(const int &i)"));
162 #endif
163  return ivector_slice(*this,1,i);
164  }
165 
166  INLINE ivector_slice ivector::operator ()(const int &i1,const int &i2)
167 #if(CXSC_INDEX_CHECK)
168  throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
169 #else
170  throw()
171 #endif
172  {
173 #if(CXSC_INDEX_CHECK)
174  if(i1<l||i2>u) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector::operator ()(const int &i1,const int &i2)"));
175 #endif
176  return ivector_slice(*this,i1,i2);
177  }
178 
180 #if(CXSC_INDEX_CHECK)
181  throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
182 #else
183  throw()
184 #endif
185  {
186 #if(CXSC_INDEX_CHECK)
187  if(1<start||i>end) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector_slice::operator ()(const int &i)"));
188 #endif
189  return ivector_slice(*this,1,i);
190  }
191 
192  INLINE ivector_slice ivector_slice::operator ()(const int &i1,const int &i2)
193 #if(CXSC_INDEX_CHECK)
194  throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
195 #else
196  throw()
197 #endif
198  {
199 #if(CXSC_INDEX_CHECK)
200  if(i1<start||i2>end) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector_slice::operator ()(const int &i1,const int &i2)"));
201 #endif
202  return ivector_slice(*this,i1,i2);
203  }
204 
205  INLINE interval::interval(const ivector &rv)
206 #if(CXSC_INDEX_CHECK)
207  throw(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ)
208 #else
209  throw()
210 #endif
211  {
212 #if(CXSC_INDEX_CHECK)
213  if(rv.size>1) cxscthrow(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ("interval::interval(const ivector &rv)"));
214  else if(rv.size<1) cxscthrow(ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ("interval::interval(const ivector &rv)"));
215 #endif
216  *this=rv.dat[0];
217  }
218 
220 #if(CXSC_INDEX_CHECK)
221  throw(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ)
222 #else
223  throw()
224 #endif
225  {
226 #if(CXSC_INDEX_CHECK)
227  if(sl.size>1) cxscthrow(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ("interval::interval(const ivector_slice &sl)"));
228  else if(sl.size<1) cxscthrow(ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ("interval::interval(const ivector_slice &sl)"));
229 #endif
230  *this=sl.dat[sl.start-sl.l];
231  }
232 
238  INLINE ivector _ivector(const interval &r) throw() { return ivector(r); }
244  INLINE ivector _ivector(const real &r) throw() { return ivector(r); }
250  INLINE ivector _ivector(const rvector_slice &rs) throw() { return ivector(rs); }
256  INLINE ivector _ivector(const rvector &rs) throw() { return ivector(rs); }
262  INLINE ivector _ivector(const rmatrix_subv &rs) throw() { return ivector(rs); }
263  INLINE ivector &ivector::operator =(const ivector &rv) throw() { return _vvassign<ivector,ivector,interval>(*this,rv); }
264  INLINE ivector &ivector::operator =(const interval &r) throw() { return _vsassign<ivector,interval>(*this,r); }
265  INLINE ivector &ivector::operator =(const rvector &rv) throw() { return _vvassign<ivector,rvector,interval>(*this,rv); }
266  INLINE ivector &ivector::operator =(const real &r) throw() { return _vsassign<ivector,real>(*this,r); }
267  INLINE ivector::operator void*() throw() { return _vvoid(*this); }
269 #if(CXSC_INDEX_CHECK)
270  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
271 #else
272  throw()
273 #endif
274  { return _vsvsassign(*this,sl); }
276 #if(CXSC_INDEX_CHECK)
277  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
278 #else
279  throw()
280 #endif
281  { return _vsvassign(*this,rv); }
282  INLINE ivector_slice & ivector_slice::operator =(const interval &r) throw() { return _vssassign<ivector_slice,interval>(*this,r); }
284 #if(CXSC_INDEX_CHECK)
285  throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
286 #else
287  throw()
288 #endif
289  { return _vsvassign(*this,ivector(m)); }
291 #if(CXSC_INDEX_CHECK)
292  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
293 #else
294  throw()
295 #endif
296  { return _vsvsassign(*this,sl); }
298 #if(CXSC_INDEX_CHECK)
299  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
300 #else
301  throw()
302 #endif
303  { return _vsvassign(*this,rv); }
304  INLINE ivector_slice & ivector_slice::operator =(const real &r) throw() { return _vssassign(*this,r); }
305  INLINE ivector_slice::operator void*() throw() { return _vsvoid(*this); }
306 
307 //=======================================================================
308 //======================== Vector Functions =============================
309 
310 
311  INLINE ivector &SetInf(ivector &iv,const rvector &rv)
312 #if(CXSC_INDEX_CHECK)
313  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
314 #else
315  throw()
316 #endif
317  { return _vvsetinf(iv,rv); }
318  INLINE ivector_slice &SetInf(ivector_slice &iv,const rvector &rv)
319 #if(CXSC_INDEX_CHECK)
320  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
321 #else
322  throw()
323 #endif
324  { return _vsvsetinf(iv,rv); }
325  INLINE ivector &SetInf(ivector &iv,const rvector_slice &rv)
326 #if(CXSC_INDEX_CHECK)
327  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
328 #else
329  throw()
330 #endif
331  { return _vvssetinf(iv,rv); }
332  INLINE ivector_slice &SetInf(ivector_slice &iv,const rvector_slice &rv)
333 #if(CXSC_INDEX_CHECK)
334  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
335 #else
336  throw()
337 #endif
338  { return _vsvssetinf(iv,rv); }
339  INLINE ivector &UncheckedSetInf(ivector &iv,const rvector &rv)
340 #if(CXSC_INDEX_CHECK)
341  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
342 #else
343  throw()
344 #endif
345  { return _vvusetinf(iv,rv); }
346  INLINE ivector_slice &UncheckedSetInf(ivector_slice &iv,const rvector &rv)
347 #if(CXSC_INDEX_CHECK)
348  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
349 #else
350  throw()
351 #endif
352  { return _vsvusetinf(iv,rv); }
353  INLINE ivector &UncheckedSetInf(ivector &iv,const rvector_slice &rv)
354 #if(CXSC_INDEX_CHECK)
355  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
356 #else
357  throw()
358 #endif
359  { return _vvsusetinf(iv,rv); }
360  INLINE ivector_slice &UncheckedSetInf(ivector_slice &iv,const rvector_slice &rv)
361 #if(CXSC_INDEX_CHECK)
362  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
363 #else
364  throw()
365 #endif
366  { return _vsvsusetinf(iv,rv); }
367 
368  INLINE ivector &SetSup(ivector &iv,const rvector &rv)
369 #if(CXSC_INDEX_CHECK)
370  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
371 #else
372  throw()
373 #endif
374  { return _vvsetsup(iv,rv); }
375  INLINE ivector_slice &SetSup(ivector_slice &iv,const rvector &rv)
376 #if(CXSC_INDEX_CHECK)
377  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
378 #else
379  throw()
380 #endif
381  { return _vsvsetsup(iv,rv); }
382  INLINE ivector &SetSup(ivector &iv,const rvector_slice &rv)
383 #if(CXSC_INDEX_CHECK)
384  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
385 #else
386  throw()
387 #endif
388  { return _vvssetsup(iv,rv); }
389  INLINE ivector_slice &SetSup(ivector_slice &iv,const rvector_slice &rv)
390 #if(CXSC_INDEX_CHECK)
391  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
392 #else
393  throw()
394 #endif
395  { return _vsvssetsup(iv,rv); }
396  INLINE ivector &UncheckedSetSup(ivector &iv,const rvector &rv)
397 #if(CXSC_INDEX_CHECK)
398  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
399 #else
400  throw()
401 #endif
402  { return _vvusetsup(iv,rv); }
403  INLINE ivector_slice &UncheckedSetSup(ivector_slice &iv,const rvector &rv)
404 #if(CXSC_INDEX_CHECK)
405  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
406 #else
407  throw()
408 #endif
409  { return _vsvusetsup(iv,rv); }
410  INLINE ivector &UncheckedSetSup(ivector &iv,const rvector_slice &rv)
411 #if(CXSC_INDEX_CHECK)
412  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
413 #else
414  throw()
415 #endif
416  { return _vvsusetsup(iv,rv); }
417  INLINE ivector_slice &UncheckedSetSup(ivector_slice &iv,const rvector_slice &rv)
418 #if(CXSC_INDEX_CHECK)
419  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
420 #else
421  throw()
422 #endif
423  { return _vsvsusetsup(iv,rv); }
424 
425  INLINE ivector &SetSup(ivector &iv,const real &r) throw() { return _vssetsup(iv,r); }
426  INLINE ivector &SetInf(ivector &iv,const real &r) throw() { return _vssetinf(iv,r); }
427  INLINE ivector &UncheckedSetSup(ivector &iv,const real &r) throw() { return _vsusetsup(iv,r); }
428  INLINE ivector &SetUncheckedInf(ivector &iv,const real &r) throw() { return _vsusetinf(iv,r); }
429  INLINE ivector_slice &SetSup(ivector_slice &iv,const real &r) throw() { return _vsssetsup(iv,r); }
430  INLINE ivector_slice &SetInf(ivector_slice &iv,const real &r) throw() { return _vsssetinf(iv,r); }
431  INLINE ivector_slice &UncheckedSetSup(ivector_slice &iv,const real &r) throw() { return _vssusetsup(iv,r); }
432  INLINE ivector_slice &SetUncheckedInf(ivector_slice &iv,const real &r) throw() { return _vssusetinf(iv,r); }
433 
434  INLINE void Resize(ivector &rv) throw() { _vresize(rv); }
435  INLINE void Resize(ivector &rv, const int &len)
436 #if(CXSC_INDEX_CHECK)
437  throw(ERROR__WRONG_BOUNDARIES<ivector>)
438 #else
439  throw()
440 #endif
441  { _vresize<class ivector,class interval>(rv,len); }
442  INLINE void Resize(ivector &rv, const int &lb, const int &ub)
443 #if(CXSC_INDEX_CHECK)
444  throw(ERROR__WRONG_BOUNDARIES<ivector>)
445 #else
446  throw()
447 #endif
448  { _vresize<class ivector,class interval>(rv,lb,ub); }
449 
450  INLINE ivector abs(const ivector &rv) throw() { return _vabs<ivector,ivector>(rv); }
451  INLINE ivector abs(const ivector_slice &sl) throw() { return _vsabs<ivector_slice,ivector>(sl); }
452  INLINE rvector absmin(const ivector &rv) throw() {
453  rvector x(Lb(rv),Ub(rv));
454  for(int i=Lb(rv) ; i<=Ub(rv) ; i++)
455  x[i] = AbsMin(rv[i]);
456  return x;
457  }
458  INLINE rvector absmin(const ivector_slice &sl) throw() {
459  rvector x(Lb(sl),Ub(sl));
460  for(int i=Lb(sl) ; i<=Ub(sl) ; i++)
461  x[i] = AbsMin(sl[i]);
462  return x;
463  }
464  INLINE rvector absmax(const ivector &rv) throw() {
465  rvector x(Lb(rv),Ub(rv));
466  for(int i=Lb(rv) ; i<=Ub(rv) ; i++)
467  x[i] = AbsMax(rv[i]);
468  return x;
469  }
470  INLINE rvector absmax(const ivector_slice &sl) throw() {
471  rvector x(Lb(sl),Ub(sl));
472  for(int i=Lb(sl) ; i<=Ub(sl) ; i++)
473  x[i] = AbsMax(sl[i]);
474  return x;
475  }
476  INLINE rvector diam(const ivector &v) throw() { return _vdiam<ivector,rvector>(v); }
477  INLINE rvector diam(const ivector_slice &v) throw() { return _vsdiam<ivector_slice,rvector>(v); }
478  INLINE rvector mid(const ivector &v) throw() { return _vmid<ivector,rvector>(v); }
479  INLINE rvector mid(const ivector_slice &v) throw() { return _vsmid<ivector_slice,rvector>(v); }
480  INLINE rvector Inf(const ivector &v) throw() { return _vinf<ivector,rvector>(v); }
481  INLINE rvector Inf(const ivector_slice &v) throw() { return _vsinf<ivector_slice,rvector>(v); }
482  INLINE rvector Sup(const ivector &v) throw() { return _vsup<ivector,rvector>(v); }
483  INLINE rvector Sup(const ivector_slice &v) throw() { return _vssup<ivector_slice,rvector>(v); }
484  INLINE bool operator !(const ivector &rv) throw() { return _vnot(rv); }
485  INLINE bool operator !(const ivector_slice &sl) throw() { return _vsnot(sl); }
486 
487 //======================= Vector / Scalar ===============================
488 
489 //----------------------------- Interval ---------------------------
490 
491  INLINE ivector operator *(const ivector &rv, const interval &s) throw() { return _vsmult<ivector,interval,ivector>(rv,s); }
492  INLINE ivector operator *(const ivector_slice &sl, const interval &s) throw() { return _vssmult<ivector_slice,interval,ivector>(sl,s); }
493  INLINE ivector operator *(const interval &s, const ivector &rv) throw() { return _vsmult<ivector,interval,ivector>(rv,s); }
494  INLINE ivector operator *(const interval &s, const ivector_slice &sl) throw() { return _vssmult<ivector_slice,interval,ivector>(sl,s); }
495  INLINE ivector &operator *=(ivector &rv,const interval &r) throw() { return _vsmultassign(rv,r); }
496  INLINE ivector_slice &ivector_slice::operator *=(const interval &r) throw() { return _vssmultassign(*this,r); }
497 
498  INLINE ivector operator /(const ivector &rv, const interval &s) throw() { return _vsdiv<ivector,interval,ivector>(rv,s); }
499  INLINE ivector operator /(const ivector_slice &sl, const interval &s) throw() { return _vssdiv<ivector_slice,interval,ivector>(sl,s); }
500  INLINE ivector &operator /=(ivector &rv,const interval &r) throw() { return _vsdivassign(rv,r); }
501  INLINE ivector_slice &ivector_slice::operator /=(const interval &r) throw() { return _vssdivassign(*this,r); }
502 
503 //---------------------------- Real --------------------------------------
504 
505  INLINE ivector operator *(const ivector &rv, const real &s) throw() { return _vsmult<ivector,real,ivector>(rv,s); }
506  INLINE ivector operator *(const ivector_slice &sl, const real &s) throw() { return _vssmult<ivector_slice,real,ivector>(sl,s); }
507  INLINE ivector operator *(const real &s, const ivector &rv) throw() { return _vsmult<ivector,real,ivector>(rv,s); }
508  INLINE ivector operator *(const real &s, const ivector_slice &sl) throw() { return _vssmult<ivector_slice,real,ivector>(sl,s); }
509  INLINE ivector &operator *=(ivector &rv,const real &r) throw() { return _vsmultassign(rv,r); }
510  INLINE ivector_slice &ivector_slice::operator *=(const real &r) throw() { return _vssmultassign(*this,r); }
511 
512  INLINE ivector operator /(const ivector &rv, const real &s) throw() { return _vsdiv<ivector,real,ivector>(rv,s); }
513  INLINE ivector operator /(const ivector_slice &sl, const real &s) throw() { return _vssdiv<ivector_slice,real,ivector>(sl,s); }
514  INLINE ivector &operator /=(ivector &rv,const real &r) throw() { return _vsdivassign(rv,r); }
515  INLINE ivector_slice &ivector_slice::operator /=(const real &r) throw() { return _vssdivassign(*this,r); }
516 
517  INLINE ivector operator *(const rvector &rv, const interval &s) throw() { return _vsmult<rvector,interval,ivector>(rv,s); }
518  INLINE ivector operator *(const rvector_slice &sl, const interval &s) throw() { return _vssmult<rvector_slice,interval,ivector>(sl,s); }
519  INLINE ivector operator *(const interval &s, const rvector &rv) throw() { return _vsmult<rvector,interval,ivector>(rv,s); }
520  INLINE ivector operator *(const interval &s, const rvector_slice &sl) throw() { return _vssmult<rvector_slice,interval,ivector>(sl,s); }
521 
522  INLINE ivector operator /(const rvector &rv, const interval &s) throw() { return _vsdiv<rvector,interval,ivector>(rv,s); }
523  INLINE ivector operator /(const rvector_slice &sl, const interval &s) throw() { return _vssdiv<rvector_slice,interval,ivector>(sl,s); }
524 
525 //======================= Vector / Vector ===============================
526 
527 
528  INLINE std::ostream &operator <<(std::ostream &s, const ivector &rv) throw() { return _vout(s,rv); }
529  INLINE std::ostream &operator <<(std::ostream &o, const ivector_slice &sl) throw() { return _vsout(o,sl); }
530  INLINE std::istream &operator >>(std::istream &s, ivector &rv) throw() { return _vin(s,rv); }
531  INLINE std::istream &operator >>(std::istream &s, ivector_slice &rv) throw() { return _vsin(s,rv); }
532 
533 //----------------------- Interval / Interval ---------------------------
534  INLINE ivector & ivector::operator =(const ivector_slice &sl) throw() { return _vvsassign<ivector,ivector_slice,interval>(*this,sl); }
535 
536 
537  INLINE interval operator *(const ivector & rv1, const ivector &rv2)
538 #if(CXSC_INDEX_CHECK)
539  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
540 #else
541  throw()
542 #endif
543  { return _vvimult<ivector,ivector,interval>(rv1,rv2); }
544  INLINE interval operator *(const ivector_slice &sl, const ivector &rv)
545 #if(CXSC_INDEX_CHECK)
546  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
547 #else
548  throw()
549 #endif
550  { return _vsvimult<ivector_slice,ivector,interval>(sl,rv); }
551  INLINE interval operator *(const ivector &rv, const ivector_slice &sl)
552 #if(CXSC_INDEX_CHECK)
553  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
554 #else
555  throw()
556 #endif
557  { return _vsvimult<ivector_slice,ivector,interval>(sl,rv); }
558  INLINE interval operator *(const ivector_slice & sl1, const ivector_slice &sl2)
559 #if(CXSC_INDEX_CHECK)
560  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
561 #else
562  throw()
563 #endif
564  { return _vsvsimult<ivector_slice,ivector_slice,interval>(sl1,sl2); }
565 
566  INLINE const ivector &operator +(const ivector &rv) throw() { return rv; }
567  INLINE ivector operator +(const ivector_slice &sl) throw() { return sl; }
568  INLINE ivector operator +(const ivector &rv1, const ivector &rv2)
569 #if(CXSC_INDEX_CHECK)
570  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
571 #else
572  throw()
573 #endif
574  { return _vvplus<ivector,ivector,ivector>(rv1,rv2); }
575  INLINE ivector operator +(const ivector &rv, const ivector_slice &sl)
576 #if(CXSC_INDEX_CHECK)
577  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
578 #else
579  throw()
580 #endif
581  { return _vvsplus<ivector,ivector_slice,ivector>(rv,sl); }
582  INLINE ivector operator +(const ivector_slice &sl, const ivector &rv)
583 #if(CXSC_INDEX_CHECK)
584  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
585 #else
586  throw()
587 #endif
588  { return _vvsplus<ivector,ivector_slice,ivector>(rv,sl); }
589  INLINE ivector operator +(const ivector_slice &sl1, const ivector_slice &sl2)
590 #if(CXSC_INDEX_CHECK)
591  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
592 #else
593  throw()
594 #endif
595  { return _vsvsplus<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
596  INLINE ivector & operator +=(ivector &rv1, const ivector &rv2)
597 #if(CXSC_INDEX_CHECK)
598  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
599 #else
600  throw()
601 #endif
602  { return _vvplusassign(rv1,rv2); }
603  INLINE ivector &operator +=(ivector &rv, const ivector_slice &sl)
604 #if(CXSC_INDEX_CHECK)
605  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
606 #else
607  throw()
608 #endif
609  { return _vvsplusassign(rv,sl); }
611 #if(CXSC_INDEX_CHECK)
612  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
613 #else
614  throw()
615 #endif
616  { return _vsvplusassign(*this,rv); }
618 #if(CXSC_INDEX_CHECK)
619  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
620 #else
621  throw()
622 #endif
623  { return _vsvsplusassign(*this,sl2); }
624 
625  INLINE ivector operator -(const ivector &rv) throw() { return _vminus(rv); }
626  INLINE ivector operator -(const ivector_slice &sl) throw() { return _vsminus<ivector_slice,ivector>(sl); }
627  INLINE ivector operator -(const ivector &rv1, const ivector &rv2)
628 #if(CXSC_INDEX_CHECK)
629  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
630 #else
631  throw()
632 #endif
633  { return _vvminus<ivector,ivector,ivector>(rv1,rv2); }
634  INLINE ivector operator -(const ivector &rv, const ivector_slice &sl)
635 #if(CXSC_INDEX_CHECK)
636  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
637 #else
638  throw()
639 #endif
640  { return _vvsminus<ivector,ivector_slice,ivector>(rv,sl); }
641  INLINE ivector operator -(const ivector_slice &sl, const ivector &rv)
642 #if(CXSC_INDEX_CHECK)
643  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
644 #else
645  throw()
646 #endif
647  { return _vsvminus<ivector_slice,ivector,ivector>(sl,rv); }
648  INLINE ivector operator -(const ivector_slice &sl1, const ivector_slice &sl2)
649 #if(CXSC_INDEX_CHECK)
650  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
651 #else
652  throw()
653 #endif
654  { return _vsvsminus<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
655  INLINE ivector & operator -=(ivector &rv1, const ivector &rv2)
656 #if(CXSC_INDEX_CHECK)
657  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
658 #else
659  throw()
660 #endif
661  { return _vvminusassign(rv1,rv2); }
662  INLINE ivector &operator -=(ivector &rv, const ivector_slice &sl)
663 #if(CXSC_INDEX_CHECK)
664  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
665 #else
666  throw()
667 #endif
668  { return _vvsminusassign(rv,sl); }
670 #if(CXSC_INDEX_CHECK)
671  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
672 #else
673  throw()
674 #endif
675  { return _vsvminusassign(*this,rv); }
677 #if(CXSC_INDEX_CHECK)
678  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
679 #else
680  throw()
681 #endif
682  { return _vsvsminusassign(*this,sl2); }
683 
684  INLINE ivector operator |(const ivector &rv1, const ivector &rv2)
685 #if(CXSC_INDEX_CHECK)
686  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
687 #else
688  throw()
689 #endif
690  { return _vvconv<ivector,ivector,ivector>(rv1,rv2); }
691  INLINE ivector operator |(const ivector &rv, const ivector_slice &sl)
692 #if(CXSC_INDEX_CHECK)
693  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
694 #else
695  throw()
696 #endif
697  { return _vvsconv<ivector,ivector_slice,ivector>(rv,sl); }
698  INLINE ivector operator |(const ivector_slice &sl, const ivector &rv)
699 #if(CXSC_INDEX_CHECK)
700  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
701 #else
702  throw()
703 #endif
704  { return _vvsconv<ivector,ivector_slice,ivector>(rv,sl); }
705  INLINE ivector operator |(const ivector_slice &sl1, const ivector_slice &sl2)
706 #if(CXSC_INDEX_CHECK)
707  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
708 #else
709  throw()
710 #endif
711  { return _vsvsconv<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
712  INLINE ivector & operator |=(ivector &rv1, const ivector &rv2)
713 #if(CXSC_INDEX_CHECK)
714  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
715 #else
716  throw()
717 #endif
718  { return _vvconvassign(rv1,rv2); }
719  INLINE ivector &operator |=(ivector &rv, const ivector_slice &sl)
720 #if(CXSC_INDEX_CHECK)
721  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
722 #else
723  throw()
724 #endif
725  { return _vvsconvassign(rv,sl); }
727 #if(CXSC_INDEX_CHECK)
728  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
729 #else
730  throw()
731 #endif
732  { return _vsvconvassign(*this,rv); }
734 #if(CXSC_INDEX_CHECK)
735  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
736 #else
737  throw()
738 #endif
739  { return _vsvsconvassign(*this,sl2); }
740 
741  INLINE ivector operator &(const ivector &rv1, const ivector &rv2)
742 #if(CXSC_INDEX_CHECK)
743  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
744 #else
745  throw()
746 #endif
747  { return _vvsect<ivector,ivector,ivector>(rv1,rv2); }
748  INLINE ivector operator &(const ivector &rv, const ivector_slice &sl)
749 #if(CXSC_INDEX_CHECK)
750  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
751 #else
752  throw()
753 #endif
754  { return _vvssect<ivector,ivector_slice,ivector>(rv,sl); }
755  INLINE ivector operator &(const ivector_slice &sl, const ivector &rv)
756 #if(CXSC_INDEX_CHECK)
757  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
758 #else
759  throw()
760 #endif
761  { return _vvssect<ivector,ivector_slice,ivector>(rv,sl); }
762  INLINE ivector operator &(const ivector_slice &sl1, const ivector_slice &sl2)
763 #if(CXSC_INDEX_CHECK)
764  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
765 #else
766  throw()
767 #endif
768  { return _vsvssect<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
769  INLINE ivector & operator &=(ivector &rv1, const ivector &rv2)
770 #if(CXSC_INDEX_CHECK)
771  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
772 #else
773  throw()
774 #endif
775  { return _vvsectassign(rv1,rv2); }
776  INLINE ivector &operator &=(ivector &rv, const ivector_slice &sl)
777 #if(CXSC_INDEX_CHECK)
778  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
779 #else
780  throw()
781 #endif
782  { return _vvssectassign(rv,sl); }
784 #if(CXSC_INDEX_CHECK)
785  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
786 #else
787  throw()
788 #endif
789  { return _vsvsectassign(*this,rv); }
791 #if(CXSC_INDEX_CHECK)
792  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
793 #else
794  throw()
795 #endif
796  { return _vsvssectassign(*this,sl2); }
797 
798  INLINE bool operator ==(const ivector &rv1, const ivector &rv2) throw() { return _vveq(rv1,rv2); }
799  INLINE bool operator ==(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvseq(sl1,sl2); }
800  INLINE bool operator ==(const ivector_slice &sl, const ivector &rv) throw() { return _vsveq(sl,rv); }
801  INLINE bool operator ==(const ivector &rv, const ivector_slice &sl) throw() { return _vsveq(sl,rv); }
802  INLINE bool operator !=(const ivector &rv1, const ivector &rv2) throw() { return _vvneq(rv1,rv2); }
803  INLINE bool operator !=(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsneq(sl1,sl2); }
804  INLINE bool operator !=(const ivector_slice &sl, const ivector &rv) throw() { return _vsvneq(sl,rv); }
805  INLINE bool operator !=(const ivector &rv, const ivector_slice &sl) throw() { return _vsvneq(sl,rv); }
806  INLINE bool operator <(const ivector &rv1, const ivector &rv2) throw() { return _vvless(rv1,rv2); }
807  INLINE bool operator <(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsless(sl1,sl2); }
808  INLINE bool operator < (const ivector_slice &sl, const ivector &rv) throw() { return _vsvless(sl,rv); }
809  INLINE bool operator < (const ivector &rv, const ivector_slice &sl) throw() { return _vvsless(rv,sl); }
810  INLINE bool operator <=(const ivector &rv1, const ivector &rv2) throw() { return _vvleq(rv1,rv2); }
811  INLINE bool operator <=(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsleq(sl1,sl2); }
812  INLINE bool operator <=(const ivector_slice &sl, const ivector &rv) throw() { return _vsvleq(sl,rv); }
813  INLINE bool operator <=(const ivector &rv, const ivector_slice &sl) throw() { return _vvsleq(rv,sl); }
814  INLINE bool operator >(const ivector &rv1, const ivector &rv2) throw() { return _vvless(rv2,rv1); }
815  INLINE bool operator >(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsless(sl2,sl1); }
816  INLINE bool operator >(const ivector_slice &sl, const ivector &rv) throw() { return _vvsless(rv,sl); }
817  INLINE bool operator >(const ivector &rv, const ivector_slice &sl) throw() { return _vsvless(sl,rv); }
818  INLINE bool operator >=(const ivector &rv1, const ivector &rv2) throw() { return _vvleq(rv2,rv1); }
819  INLINE bool operator >=(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsleq(sl2,sl1); }
820  INLINE bool operator >=(const ivector_slice &sl, const ivector &rv) throw() { return _vvsleq(rv,sl); }
821  INLINE bool operator >=(const ivector &rv, const ivector_slice &sl) throw() { return _vsvleq(sl,rv); }
822 
823 //-------------------------------- Interval / Real --------------------------------
824 
825  INLINE ivector & ivector::operator =(const rvector_slice &sl) throw() { return _vvsassign<ivector,rvector_slice,interval>(*this,sl); }
826 
827 
828  INLINE interval operator *(const rvector & rv1, const ivector &rv2)
829 #if(CXSC_INDEX_CHECK)
830  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
831 #else
832  throw()
833 #endif
834  { return _vvimult<rvector,ivector,interval>(rv1,rv2); }
835  INLINE interval operator *(const rvector_slice &sl, const ivector &rv)
836 #if(CXSC_INDEX_CHECK)
837  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
838 #else
839  throw()
840 #endif
841  { return _vsvimult<rvector_slice,ivector,interval>(sl,rv); }
842  INLINE interval operator *(const rvector &rv, const ivector_slice &sl)
843 #if(CXSC_INDEX_CHECK)
844  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
845 #else
846  throw()
847 #endif
848  { return _vsvimult<ivector_slice,rvector,interval>(sl,rv); }
849  INLINE interval operator *(const rvector_slice & sl1, const ivector_slice &sl2)
850 #if(CXSC_INDEX_CHECK)
851  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
852 #else
853  throw()
854 #endif
855  { return _vsvsimult<rvector_slice,ivector_slice,interval>(sl1,sl2); }
856 
857  INLINE interval operator *(const ivector & rv1, const rvector &rv2)
858 #if(CXSC_INDEX_CHECK)
859  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
860 #else
861  throw()
862 #endif
863  { return _vvimult<rvector,ivector,interval>(rv2,rv1); }
864  INLINE interval operator *(const ivector_slice &sl, const rvector &rv)
865 #if(CXSC_INDEX_CHECK)
866  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
867 #else
868  throw()
869 #endif
870  { return _vsvimult<ivector_slice,rvector,interval>(sl,rv); }
871  INLINE interval operator *(const ivector &rv, const rvector_slice &sl)
872 #if(CXSC_INDEX_CHECK)
873  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
874 #else
875  throw()
876 #endif
877  { return _vsvimult<rvector_slice,ivector,interval>(sl,rv); }
878  INLINE interval operator *(const ivector_slice & sl1, const rvector_slice &sl2)
879 #if(CXSC_INDEX_CHECK)
880  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
881 #else
882  throw()
883 #endif
884  { return _vsvsimult<rvector_slice,ivector_slice,interval>(sl2,sl1); }
885 
886  INLINE ivector operator +(const rvector &rv1, const ivector &rv2)
887 #if(CXSC_INDEX_CHECK)
888  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
889 #else
890  throw()
891 #endif
892  { return _vvplus<rvector,ivector,ivector>(rv1,rv2); }
893  INLINE ivector operator +(const rvector &rv, const ivector_slice &sl)
894 #if(CXSC_INDEX_CHECK)
895  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
896 #else
897  throw()
898 #endif
899  { return _vvsplus<rvector,ivector_slice,ivector>(rv,sl); }
900  INLINE ivector operator +(const rvector_slice &sl, const ivector &rv)
901 #if(CXSC_INDEX_CHECK)
902  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
903 #else
904  throw()
905 #endif
906  { return _vvsplus<ivector,rvector_slice,ivector>(rv,sl); }
907  INLINE ivector operator +(const rvector_slice &sl1, const ivector_slice &sl2)
908 #if(CXSC_INDEX_CHECK)
909  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
910 #else
911  throw()
912 #endif
913  { return _vsvsplus<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
914 
915  INLINE ivector operator +(const ivector &rv1, const rvector &rv2)
916 #if(CXSC_INDEX_CHECK)
917  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
918 #else
919  throw()
920 #endif
921  { return _vvplus<rvector,ivector,ivector>(rv2,rv1); }
922  INLINE ivector operator +(const ivector &rv, const rvector_slice &sl)
923 #if(CXSC_INDEX_CHECK)
924  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
925 #else
926  throw()
927 #endif
928  { return _vvsplus<ivector,rvector_slice,ivector>(rv,sl); }
929  INLINE ivector operator +(const ivector_slice &sl, const rvector &rv)
930 #if(CXSC_INDEX_CHECK)
931  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
932 #else
933  throw()
934 #endif
935  { return _vvsplus<rvector,ivector_slice,ivector>(rv,sl); }
936  INLINE ivector operator +(const ivector_slice &sl1, const rvector_slice &sl2)
937 #if(CXSC_INDEX_CHECK)
938  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
939 #else
940  throw()
941 #endif
942  { return _vsvsplus<rvector_slice,ivector_slice,ivector>(sl2,sl1); }
943 
944  INLINE ivector & operator +=(ivector &rv1, const rvector &rv2)
945 #if(CXSC_INDEX_CHECK)
946  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
947 #else
948  throw()
949 #endif
950  { return _vvplusassign(rv1,rv2); }
951  INLINE ivector &operator +=(ivector &rv, const rvector_slice &sl)
952 #if(CXSC_INDEX_CHECK)
953  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
954 #else
955  throw()
956 #endif
957  { return _vvsplusassign(rv,sl); }
959 #if(CXSC_INDEX_CHECK)
960  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
961 #else
962  throw()
963 #endif
964  { return _vsvplusassign(*this,rv); }
966 #if(CXSC_INDEX_CHECK)
967  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
968 #else
969  throw()
970 #endif
971  { return _vsvsplusassign(*this,sl2); }
972 
973  INLINE ivector operator -(const rvector &rv1, const ivector &rv2)
974 #if(CXSC_INDEX_CHECK)
975  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
976 #else
977  throw()
978 #endif
979  { return _vvminus<rvector,ivector,ivector>(rv1,rv2); }
980  INLINE ivector operator -(const rvector &rv, const ivector_slice &sl)
981 #if(CXSC_INDEX_CHECK)
982  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
983 #else
984  throw()
985 #endif
986  { return _vvsminus<rvector,ivector_slice,ivector>(rv,sl); }
987  INLINE ivector operator -(const rvector_slice &sl, const ivector &rv)
988 #if(CXSC_INDEX_CHECK)
989  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
990 #else
991  throw()
992 #endif
993  { return _vsvminus<rvector_slice,ivector,ivector>(sl,rv); }
994  INLINE ivector operator -(const rvector_slice &sl1, const ivector_slice &sl2)
995 #if(CXSC_INDEX_CHECK)
996  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
997 #else
998  throw()
999 #endif
1000  { return _vsvsminus<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
1001 
1002  INLINE ivector operator -(const ivector &rv1, const rvector &rv2)
1003 #if(CXSC_INDEX_CHECK)
1004  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1005 #else
1006  throw()
1007 #endif
1008  { return _vvminus<ivector,rvector,ivector>(rv1,rv2); }
1009  INLINE ivector operator -(const ivector &rv, const rvector_slice &sl)
1010 #if(CXSC_INDEX_CHECK)
1011  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1012 #else
1013  throw()
1014 #endif
1015  { return _vvsminus<ivector,rvector_slice,ivector>(rv,sl); }
1016  INLINE ivector operator -(const ivector_slice &sl, const rvector &rv)
1017 #if(CXSC_INDEX_CHECK)
1018  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1019 #else
1020  throw()
1021 #endif
1022  { return _vsvminus<ivector_slice,rvector,ivector>(sl,rv); }
1023  INLINE ivector operator -(const ivector_slice &sl1, const rvector_slice &sl2)
1024 #if(CXSC_INDEX_CHECK)
1025  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1026 #else
1027  throw()
1028 #endif
1029  { return _vsvsminus<ivector_slice,rvector_slice,ivector>(sl1,sl2); }
1030 
1031  INLINE ivector & operator -=(ivector &rv1, const rvector &rv2)
1032 #if(CXSC_INDEX_CHECK)
1033  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1034 #else
1035  throw()
1036 #endif
1037  { return _vvminusassign(rv1,rv2); }
1038  INLINE ivector &operator -=(ivector &rv, const rvector_slice &sl)
1039 #if(CXSC_INDEX_CHECK)
1040  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1041 #else
1042  throw()
1043 #endif
1044  { return _vvsminusassign(rv,sl); }
1046 #if(CXSC_INDEX_CHECK)
1047  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1048 #else
1049  throw()
1050 #endif
1051  { return _vsvminusassign(*this,rv); }
1053 #if(CXSC_INDEX_CHECK)
1054  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1055 #else
1056  throw()
1057 #endif
1058  { return _vsvsminusassign(*this,sl2); }
1059 
1060  INLINE ivector operator |(const rvector &rv1, const rvector &rv2)
1061 #if(CXSC_INDEX_CHECK)
1062  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
1063 #else
1064  throw()
1065 #endif
1066  { return _vvconv<rvector,rvector,ivector>(rv1,rv2); }
1067  INLINE ivector operator |(const rvector &rv, const rvector_slice &sl)
1068 #if(CXSC_INDEX_CHECK)
1069  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
1070 #else
1071  throw()
1072 #endif
1073  { return _vvsconv<rvector,rvector_slice,ivector>(rv,sl); }
1074  INLINE ivector operator |(const rvector_slice &sl, const rvector &rv)
1075 #if(CXSC_INDEX_CHECK)
1076  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
1077 #else
1078  throw()
1079 #endif
1080  { return _vvsconv<rvector,rvector_slice,ivector>(rv,sl); }
1081  INLINE ivector operator |(const rvector_slice &sl1, const rvector_slice &sl2)
1082 #if(CXSC_INDEX_CHECK)
1083  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
1084 #else
1085  throw()
1086 #endif
1087  { return _vsvsconv<rvector_slice,rvector_slice,ivector>(sl1,sl2); }
1088  INLINE ivector operator |(const rvector &rv1, const ivector &rv2)
1089 #if(CXSC_INDEX_CHECK)
1090  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1091 #else
1092  throw()
1093 #endif
1094  { return _vvconv<rvector,ivector,ivector>(rv1,rv2); }
1095  INLINE ivector operator |(const rvector &rv, const ivector_slice &sl)
1096 #if(CXSC_INDEX_CHECK)
1097  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1098 #else
1099  throw()
1100 #endif
1101  { return _vvsconv<rvector,ivector_slice,ivector>(rv,sl); }
1102  INLINE ivector operator |(const rvector_slice &sl, const ivector &rv)
1103 #if(CXSC_INDEX_CHECK)
1104  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1105 #else
1106  throw()
1107 #endif
1108  { return _vvsconv<ivector,rvector_slice,ivector>(rv,sl); }
1109  INLINE ivector operator |(const rvector_slice &sl1, const ivector_slice &sl2)
1110 #if(CXSC_INDEX_CHECK)
1111  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1112 #else
1113  throw()
1114 #endif
1115  { return _vsvsconv<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
1116 
1117  INLINE ivector operator |(const ivector &rv1, const rvector &rv2)
1118 #if(CXSC_INDEX_CHECK)
1119  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1120 #else
1121  throw()
1122 #endif
1123  { return _vvconv<rvector,ivector,ivector>(rv2,rv1); }
1124  INLINE ivector operator |(const ivector &rv, const rvector_slice &sl)
1125 #if(CXSC_INDEX_CHECK)
1126  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1127 #else
1128  throw()
1129 #endif
1130  { return _vvsconv<ivector,rvector_slice,ivector>(rv,sl); }
1131  INLINE ivector operator |(const ivector_slice &sl, const rvector &rv)
1132 #if(CXSC_INDEX_CHECK)
1133  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1134 #else
1135  throw()
1136 #endif
1137  { return _vvsconv<rvector,ivector_slice,ivector>(rv,sl); }
1138  INLINE ivector operator |(const ivector_slice &sl1, const rvector_slice &sl2)
1139 #if(CXSC_INDEX_CHECK)
1140  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1141 #else
1142  throw()
1143 #endif
1144  { return _vsvsconv<rvector_slice,ivector_slice,ivector>(sl2,sl1); }
1145 
1146  INLINE ivector & operator |=(ivector &rv1, const rvector &rv2)
1147 #if(CXSC_INDEX_CHECK)
1148  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1149 #else
1150  throw()
1151 #endif
1152  { return _vvconvassign(rv1,rv2); }
1153  INLINE ivector &operator |=(ivector &rv, const rvector_slice &sl)
1154 #if(CXSC_INDEX_CHECK)
1155  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1156 #else
1157  throw()
1158 #endif
1159  { return _vvsconvassign(rv,sl); }
1161 #if(CXSC_INDEX_CHECK)
1162  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1163 #else
1164  throw()
1165 #endif
1166  { return _vsvconvassign(*this,rv); }
1168 #if(CXSC_INDEX_CHECK)
1169  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1170 #else
1171  throw()
1172 #endif
1173  { return _vsvsconvassign(*this,sl2); }
1174 
1175  INLINE ivector operator &(const rvector &rv1, const ivector &rv2)
1176 #if(CXSC_INDEX_CHECK)
1177  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1178 #else
1179  throw()
1180 #endif
1181  { return _vvsect<rvector,ivector,ivector>(rv1,rv2); }
1182  INLINE ivector operator &(const rvector &rv, const ivector_slice &sl)
1183 #if(CXSC_INDEX_CHECK)
1184  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1185 #else
1186  throw()
1187 #endif
1188  { return _vvssect<rvector,ivector_slice,ivector>(rv,sl); }
1189  INLINE ivector operator &(const rvector_slice &sl, const ivector &rv)
1190 #if(CXSC_INDEX_CHECK)
1191  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1192 #else
1193  throw()
1194 #endif
1195  { return _vvssect<ivector,rvector_slice,ivector>(rv,sl); }
1196  INLINE ivector operator &(const rvector_slice &sl1, const ivector_slice &sl2)
1197 #if(CXSC_INDEX_CHECK)
1198  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1199 #else
1200  throw()
1201 #endif
1202  { return _vsvssect<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
1203 
1204  INLINE ivector operator &(const ivector &rv1, const rvector &rv2)
1205 #if(CXSC_INDEX_CHECK)
1206  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1207 #else
1208  throw()
1209 #endif
1210  { return _vvsect<rvector,ivector,ivector>(rv2,rv1); }
1211  INLINE ivector operator &(const ivector &rv, const rvector_slice &sl)
1212 #if(CXSC_INDEX_CHECK)
1213  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1214 #else
1215  throw()
1216 #endif
1217  { return _vvssect<ivector,rvector_slice,ivector>(rv,sl); }
1218  INLINE ivector operator &(const ivector_slice &sl, const rvector &rv)
1219 #if(CXSC_INDEX_CHECK)
1220  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1221 #else
1222  throw()
1223 #endif
1224  { return _vvssect<rvector,ivector_slice,ivector>(rv,sl); }
1225  INLINE ivector operator &(const ivector_slice &sl1, const rvector_slice &sl2)
1226 #if(CXSC_INDEX_CHECK)
1227  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1228 #else
1229  throw()
1230 #endif
1231  { return _vsvssect<rvector_slice,ivector_slice,ivector>(sl2,sl1); }
1232 
1233  INLINE ivector & operator &=(ivector &rv1, const rvector &rv2)
1234 #if(CXSC_INDEX_CHECK)
1235  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1236 #else
1237  throw()
1238 #endif
1239  { return _vvsectassign(rv1,rv2); }
1240  INLINE ivector &operator &=(ivector &rv, const rvector_slice &sl)
1241 #if(CXSC_INDEX_CHECK)
1242  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1243 #else
1244  throw()
1245 #endif
1246  { return _vvssectassign(rv,sl); }
1248 #if(CXSC_INDEX_CHECK)
1249  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1250 #else
1251  throw()
1252 #endif
1253  { return _vsvsectassign(*this,rv); }
1255 #if(CXSC_INDEX_CHECK)
1256  throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
1257 #else
1258  throw()
1259 #endif
1260  { return _vsvssectassign(*this,sl2); }
1261 
1262 
1265  ivector x(*this);
1266  for(int i=0 ; i<VecLen(x) ; i++)
1267  x[i+Lb(x)] = (*this)[p[i+Lb(p)]+Lb(*this)];
1268  return x;
1269  }
1270 
1271 } // namespace cxsc
1272 
1273 #endif // _CXSC_IVECTOR_INL_INCLUDED
cxsc::AbsMax
real AbsMax(const interval &x)
Computes the greatest absolute value .
Definition: interval.cpp:303
cxsc::ivector::VecLen
friend int VecLen(const ivector &rv)
Returns the dimension of the vector.
Definition: ivector.hpp:912
cxsc::ivector_slice::operator[]
interval & operator[](const int &i) const
Operator for accessing the single elements of the vector (read-only)
Definition: ivector.inl:126
cxsc::ivector::Lb
friend int Lb(const ivector &rv)
Returns the lower bound of the vector.
Definition: ivector.hpp:908
cxsc::absmax
rvector absmax(const imatrix_subv &mv)
Returns the absolute maximum value of the matrix.
Definition: imatrix.inl:502
cxsc::mid
cvector mid(const cimatrix_subv &mv)
Returns the middle of the matrix.
Definition: cimatrix.inl:739
cxsc::operator*=
cimatrix & operator*=(cimatrix &m, const cinterval &c)
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
cxsc::interval
The Scalar Type interval.
Definition: interval.hpp:54
cxsc::ivector_slice::operator/=
ivector_slice & operator/=(const interval &r)
Implementation of division and allocation operation.
Definition: ivector.inl:501
cxsc::intvector
The Data Type intvector.
Definition: intvector.hpp:51
cxsc::diam
cvector diam(const cimatrix_subv &mv)
Returns the diameter of the matrix.
Definition: cimatrix.inl:738
cxsc::ivector_slice::operator=
ivector_slice & operator=(const sivector &sl)
Implementation of standard assigning operator.
Definition: sivector.hpp:2194
cxsc::rvector
The Data Type rvector.
Definition: rvector.hpp:57
cxsc::ivector_slice
The Data Type ivector_slice.
Definition: ivector.hpp:962
cxsc::ivector::operator=
ivector & operator=(const ivector &rv)
Implementation of standard assigning operator.
Definition: ivector.inl:263
cxsc::ivector::ivector
ivector()
Constructor of class ivector.
Definition: ivector.inl:31
cxsc::rvector_slice
The Data Type rvector_slice.
Definition: rvector.hpp:1063
cxsc::SetUncheckedInf
cimatrix_subv & SetUncheckedInf(cimatrix_subv &iv, const complex &r)
Returns the matrix with the new unchecked given infimum value.
Definition: cimatrix.inl:890
cxsc::abs
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.
Definition: cimatrix.inl:737
cxsc::ivector_slice::operator-=
ivector_slice & operator-=(const ivector &rv)
Implementation of subtraction and allocation operation.
Definition: ivector.inl:669
cxsc::imatrix
The Data Type imatrix.
Definition: imatrix.hpp:659
cxsc::operator*
civector operator*(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
cxsc::operator/=
cimatrix & operator/=(cimatrix &m, const cinterval &c)
Implementation of division and allocation operation.
Definition: cimatrix.inl:1623
cxsc::ivector
The Data Type ivector.
Definition: ivector.hpp:54
cxsc::_ivector
INLINE ivector _ivector(const rmatrix &sl)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: ivecrmat.inl:57
cxsc::absmin
rvector absmin(const imatrix_subv &mv)
Returns the absolute minimum value of the matrix.
Definition: imatrix.inl:496
cxsc::rmatrix_subv
The Data Type rmatrix_subv.
Definition: rmatrix.hpp:53
cxsc::ivector_slice::operator()
ivector_slice & operator()()
Operator for accessing the whole vector.
Definition: ivector.hpp:1420
cxsc::ivector_slice::operator|=
ivector_slice & operator|=(const ivector &rv)
Allocates the convex hull of the arguments to the first argument.
Definition: ivector.inl:726
cxsc
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
cxsc::Lb
int Lb(const cimatrix &rm, const int &i)
Returns the lower bound index.
Definition: cimatrix.inl:1156
cxsc::ivector::operator[]
interval & operator[](const int &i) const
Operator for accessing the single elements of the vector (read-only)
Definition: ivector.inl:100
cxsc::operator+=
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc)
Implementation of standard algebraic addition and allocation operation.
Definition: cdot.inl:251
cxsc::ivector_slice::operator*=
ivector_slice & operator*=(const interval &r)
Implementation of multiplication and allocation operation.
Definition: ivector.inl:496
cxsc::ivector::operator()
ivector & operator()()
Operator for accessing the whole vector.
Definition: ivector.hpp:934
cxsc::Ub
int Ub(const cimatrix &rm, const int &i)
Returns the upper bound index.
Definition: cimatrix.inl:1163
cxsc::operator/
civector operator/(const cimatrix_subv &rv, const cinterval &s)
Implementation of division operation.
Definition: cimatrix.inl:730
cxsc::AbsMin
real AbsMin(const interval &x)
Computes the smallest absolute value .
Definition: interval.cpp:293
cxsc::ivector_slice::operator+=
ivector_slice & operator+=(const ivector &rv)
Implementation of addition and allocation operation.
Definition: ivector.inl:610
cxsc::Resize
void Resize(cimatrix &A)
Resizes the matrix.
Definition: cimatrix.inl:1211
cxsc::interval::interval
interval()
Constructor of class interval.
Definition: interval.hpp:64
cxsc::real
The Scalar Type real.
Definition: real.hpp:113
cxsc::ivector_slice::operator&=
ivector_slice & operator&=(const ivector &rv)
Allocates the intersection of the arguments to the first argument.
Definition: ivector.inl:783