C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
ivector.inl
00001 /*
00002 **  CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
00003 **
00004 **  Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
00005 **                          Universitaet Karlsruhe, Germany
00006 **            (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
00007 **                          Universitaet Wuppertal, Germany   
00008 **
00009 **  This library is free software; you can redistribute it and/or
00010 **  modify it under the terms of the GNU Library General Public
00011 **  License as published by the Free Software Foundation; either
00012 **  version 2 of the License, or (at your option) any later version.
00013 **
00014 **  This library is distributed in the hope that it will be useful,
00015 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 **  Library General Public License for more details.
00018 **
00019 **  You should have received a copy of the GNU Library General Public
00020 **  License along with this library; if not, write to the Free
00021 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023 
00024 /* CVS $Id: ivector.inl,v 1.27 2014/01/30 17:23:46 cxsc Exp $ */
00025 
00026 #ifndef _CXSC_IVECTOR_INL_INCLUDED
00027 #define _CXSC_IVECTOR_INL_INCLUDED
00028 
00029 namespace cxsc {
00030 
00031         INLINE ivector::ivector () throw():dat(NULL),l(1),u(0),size(0)
00032         {
00033         }
00034 
00035         INLINE ivector::ivector(const int &i) throw():l(1),u(i),size(i)
00036         {
00037                 dat=new interval[i];
00038         }
00039 
00040 #ifdef OLD_CXSC
00041         INLINE ivector::ivector(const class index &i) throw():l(1),u(i._int()),size(i._int())
00042         {
00043                 dat=new interval[i._int()];
00044         }
00045 #endif
00046 
00047         INLINE ivector::ivector(const int &i1,const int &i2)
00048 #if(CXSC_INDEX_CHECK)
00049                 throw(ERROR_IVECTOR_WRONG_BOUNDARIES,ERROR_IVECTOR_NO_MORE_MEMORY):l(i1),u(i2),size(i2-i1+1)
00050 #else
00051         throw():l(i1),u(i2),size(i2-i1+1)
00052 #endif
00053         {
00054 #if(CXSC_INDEX_CHECK)
00055                 if(i1>i2) cxscthrow(ERROR_IVECTOR_WRONG_BOUNDARIES("ivector::ivector(const int &i1,const int &i2)"));
00056 #endif
00057                 dat=new interval[size];
00058         }
00059 
00060         INLINE ivector::ivector(const ivector_slice &rs) throw():l(rs.start),u(rs.end),size(rs.end-rs.start+1)
00061         {
00062                 dat=new interval[size];
00063                 for(int i=0, j=l-rs.l;i<size;i++,j++)
00064                         dat[i]=rs.dat[j];
00065         }
00066 
00067         INLINE ivector::ivector(const ivector &v) throw():l(v.l),u(v.u),size(v.size)
00068         {
00069                 dat=new interval[size];
00070                 for (int i=0;i<size;i++)
00071                         dat[i]=v.dat[i];
00072         }
00073 
00074         INLINE ivector::ivector(const interval &r) throw():l(1),u(1),size(1)
00075         {
00076                 dat=new interval[1];
00077                 *dat=r;
00078         }
00079         
00080         INLINE ivector::ivector(const rvector_slice &rs) throw():l(rs.start),u(rs.end),size(rs.end-rs.start+1)
00081         {
00082                 dat=new interval[size];
00083                 for(int i=0, j=l-rs.l;i<size;i++,j++)
00084                         dat[i]=rs.dat[j];
00085         }
00086 
00087         INLINE ivector::ivector(const rvector &v) throw():l(v.l),u(v.u),size(v.size)
00088         {
00089                 dat=new interval[size];
00090                 for (int i=0;i<size;i++)
00091                         dat[i]=v.dat[i];
00092         }
00093 
00094         INLINE ivector::ivector(const real &r) throw():l(1),u(1),size(1)
00095         {
00096                 dat=new interval[1];
00097                 *dat=r;
00098         }
00099         
00100         INLINE interval & ivector::operator [](const int &i) const
00101 #if(CXSC_INDEX_CHECK)
00102                 throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
00103 #else
00104         throw()
00105 #endif
00106         {
00107 #if(CXSC_INDEX_CHECK)
00108                 if(i<l||i>u) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector::operator [](const int &i) const"));
00109 #endif
00110                 return dat[i-l];
00111         }
00112 
00113         INLINE interval & ivector::operator [](const int &i) 
00114 #if(CXSC_INDEX_CHECK)
00115                 throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
00116 #else
00117         throw()
00118 #endif
00119         {
00120 #if(CXSC_INDEX_CHECK)
00121                 if(i<l||i>u) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector::operator [](const int &i)"));
00122 #endif
00123                 return dat[i-l];
00124         }
00125 
00126         INLINE interval & ivector_slice::operator [](const int &i) const
00127 #if(CXSC_INDEX_CHECK)
00128                 throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
00129 #else
00130         throw()
00131 #endif
00132         {
00133 #if(CXSC_INDEX_CHECK)
00134                 if(i<start||i>end) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector_slice::operator [](const int &i) const"));
00135 #endif
00136                 return dat[i-l];
00137         }
00138 
00139         INLINE interval & ivector_slice::operator [](const int &i) 
00140 #if(CXSC_INDEX_CHECK)
00141         throw(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC)
00142 #else
00143         throw()
00144 #endif
00145         {
00146 #if(CXSC_INDEX_CHECK)
00147                 if(i<start||i>end) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval & ivector_slice::operator [](const int &i)"));
00148 #endif
00149                 return dat[i-l];
00150         }
00151 
00152         
00153         INLINE ivector_slice ivector::operator ()(const int &i)
00154 #if(CXSC_INDEX_CHECK)
00155                 throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
00156 #else
00157         throw()
00158 #endif
00159         {
00160 #if(CXSC_INDEX_CHECK)
00161                 if(1<l||i>u) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector::operator ()(const int &i)"));
00162 #endif
00163                 return ivector_slice(*this,1,i);
00164         }
00165         
00166    INLINE ivector_slice ivector::operator ()(const int &i1,const int &i2)
00167 #if(CXSC_INDEX_CHECK)
00168                 throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
00169 #else
00170         throw()
00171 #endif
00172         {
00173 #if(CXSC_INDEX_CHECK)
00174                 if(i1<l||i2>u) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector::operator ()(const int &i1,const int &i2)"));
00175 #endif
00176                 return ivector_slice(*this,i1,i2);
00177         }
00178         
00179         INLINE ivector_slice ivector_slice::operator ()(const int &i)
00180 #if(CXSC_INDEX_CHECK)
00181                 throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
00182 #else
00183         throw()
00184 #endif
00185         {
00186 #if(CXSC_INDEX_CHECK)
00187                 if(1<start||i>end) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector_slice::operator ()(const int &i)"));
00188 #endif
00189                 return ivector_slice(*this,1,i);
00190         }
00191         
00192    INLINE ivector_slice ivector_slice::operator ()(const int &i1,const int &i2)
00193 #if(CXSC_INDEX_CHECK)
00194                 throw(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG)
00195 #else
00196         throw()
00197 #endif
00198         {
00199 #if(CXSC_INDEX_CHECK)
00200                 if(i1<start||i2>end) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("ivector_slice ivector_slice::operator ()(const int &i1,const int &i2)"));
00201 #endif
00202                 return ivector_slice(*this,i1,i2);
00203         }
00204         
00205         INLINE interval::interval(const ivector &rv)
00206 #if(CXSC_INDEX_CHECK)
00207                 throw(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ)
00208 #else
00209         throw()
00210 #endif
00211         {
00212 #if(CXSC_INDEX_CHECK)
00213                 if(rv.size>1) cxscthrow(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ("interval::interval(const ivector &rv)"));
00214                 else if(rv.size<1) cxscthrow(ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ("interval::interval(const ivector &rv)"));
00215 #endif
00216                 *this=rv.dat[0];
00217         }
00218         
00219         INLINE interval::interval(const ivector_slice &sl)
00220 #if(CXSC_INDEX_CHECK)
00221                 throw(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ)
00222 #else
00223         throw()
00224 #endif
00225         {
00226 #if(CXSC_INDEX_CHECK)
00227                 if(sl.size>1) cxscthrow(ERROR_IVECTOR_TYPE_CAST_OF_THICK_OBJ("interval::interval(const ivector_slice &sl)"));
00228                 else if(sl.size<1) cxscthrow(ERROR_IVECTOR_USE_OF_UNINITIALIZED_OBJ("interval::interval(const ivector_slice &sl)"));
00229 #endif
00230                 *this=sl.dat[sl.start-sl.l];
00231         }
00232 
00238         INLINE ivector _ivector(const interval &r) throw() { return ivector(r); }
00244         INLINE ivector _ivector(const real &r) throw() { return ivector(r); }
00250         INLINE ivector _ivector(const rvector_slice &rs) throw() { return ivector(rs); }
00256         INLINE ivector _ivector(const rvector &rs) throw() { return ivector(rs); }
00262         INLINE ivector _ivector(const rmatrix_subv &rs) throw() { return ivector(rs); }
00263         INLINE ivector &ivector::operator =(const ivector &rv) throw() { return _vvassign<ivector,ivector,interval>(*this,rv); }
00264         INLINE ivector &ivector::operator =(const interval &r) throw() { return _vsassign<ivector,interval>(*this,r); }
00265         INLINE ivector &ivector::operator =(const rvector &rv) throw() { return _vvassign<ivector,rvector,interval>(*this,rv); }
00266         INLINE ivector &ivector::operator =(const real &r) throw() { return _vsassign<ivector,real>(*this,r); }
00267         INLINE ivector::operator void*() throw() { return _vvoid(*this); }
00268         INLINE ivector_slice & ivector_slice::operator =(const ivector_slice &sl)
00269 #if(CXSC_INDEX_CHECK)
00270         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00271 #else
00272         throw()
00273 #endif
00274         { return _vsvsassign(*this,sl); }
00275         INLINE ivector_slice & ivector_slice::operator =(const ivector &rv)
00276 #if(CXSC_INDEX_CHECK)
00277         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00278 #else
00279         throw()
00280 #endif
00281         { return _vsvassign(*this,rv); }
00282         INLINE ivector_slice & ivector_slice::operator =(const interval &r) throw() { return _vssassign<ivector_slice,interval>(*this,r); }
00283         INLINE ivector_slice & ivector_slice::operator =(const imatrix &m)
00284 #if(CXSC_INDEX_CHECK)
00285         throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00286 #else
00287         throw()
00288 #endif
00289         { return _vsvassign(*this,ivector(m)); }
00290         INLINE ivector_slice & ivector_slice::operator =(const rvector_slice &sl)
00291 #if(CXSC_INDEX_CHECK)
00292         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00293 #else
00294         throw()
00295 #endif
00296         { return _vsvsassign(*this,sl); }
00297         INLINE ivector_slice & ivector_slice::operator =(const rvector &rv)
00298 #if(CXSC_INDEX_CHECK)
00299         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00300 #else
00301         throw()
00302 #endif
00303         { return _vsvassign(*this,rv); }
00304         INLINE ivector_slice & ivector_slice::operator =(const real &r) throw() { return _vssassign(*this,r); }
00305         INLINE ivector_slice::operator void*() throw() { return _vsvoid(*this); }
00306 
00307 //=======================================================================
00308 //======================== Vector Functions =============================
00309 
00310 
00311         INLINE ivector &SetInf(ivector &iv,const rvector &rv)
00312 #if(CXSC_INDEX_CHECK)
00313         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00314 #else
00315         throw()
00316 #endif
00317         { return _vvsetinf(iv,rv); }
00318         INLINE ivector_slice &SetInf(ivector_slice &iv,const rvector &rv)
00319 #if(CXSC_INDEX_CHECK)
00320         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00321 #else
00322         throw()
00323 #endif
00324         { return _vsvsetinf(iv,rv); }
00325         INLINE ivector &SetInf(ivector &iv,const rvector_slice &rv)
00326 #if(CXSC_INDEX_CHECK)
00327         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00328 #else
00329         throw()
00330 #endif
00331         { return _vvssetinf(iv,rv); }
00332         INLINE ivector_slice &SetInf(ivector_slice &iv,const rvector_slice &rv)
00333 #if(CXSC_INDEX_CHECK)
00334         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00335 #else
00336         throw()
00337 #endif
00338         { return _vsvssetinf(iv,rv); }
00339         INLINE ivector &UncheckedSetInf(ivector &iv,const rvector &rv)
00340 #if(CXSC_INDEX_CHECK)
00341         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00342 #else
00343         throw()
00344 #endif
00345         { return _vvusetinf(iv,rv); }
00346         INLINE ivector_slice &UncheckedSetInf(ivector_slice &iv,const rvector &rv)
00347 #if(CXSC_INDEX_CHECK)
00348         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00349 #else
00350         throw()
00351 #endif
00352         { return _vsvusetinf(iv,rv); }
00353         INLINE ivector &UncheckedSetInf(ivector &iv,const rvector_slice &rv)
00354 #if(CXSC_INDEX_CHECK)
00355         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00356 #else
00357         throw()
00358 #endif
00359         { return _vvsusetinf(iv,rv); }
00360         INLINE ivector_slice &UncheckedSetInf(ivector_slice &iv,const rvector_slice &rv)
00361 #if(CXSC_INDEX_CHECK)
00362         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00363 #else
00364         throw()
00365 #endif
00366         { return _vsvsusetinf(iv,rv); }
00367 
00368         INLINE ivector &SetSup(ivector &iv,const rvector &rv)
00369 #if(CXSC_INDEX_CHECK)
00370         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00371 #else
00372         throw()
00373 #endif
00374         { return _vvsetsup(iv,rv); }
00375         INLINE ivector_slice &SetSup(ivector_slice &iv,const rvector &rv)
00376 #if(CXSC_INDEX_CHECK)
00377         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00378 #else
00379         throw()
00380 #endif
00381         { return _vsvsetsup(iv,rv); }
00382         INLINE ivector &SetSup(ivector &iv,const rvector_slice &rv)
00383 #if(CXSC_INDEX_CHECK)
00384         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00385 #else
00386         throw()
00387 #endif
00388         { return _vvssetsup(iv,rv); }
00389         INLINE ivector_slice &SetSup(ivector_slice &iv,const rvector_slice &rv)
00390 #if(CXSC_INDEX_CHECK)
00391         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00392 #else
00393         throw()
00394 #endif
00395         { return _vsvssetsup(iv,rv); }
00396         INLINE ivector &UncheckedSetSup(ivector &iv,const rvector &rv)
00397 #if(CXSC_INDEX_CHECK)
00398         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00399 #else
00400         throw()
00401 #endif
00402         { return _vvusetsup(iv,rv); }
00403         INLINE ivector_slice &UncheckedSetSup(ivector_slice &iv,const rvector &rv)
00404 #if(CXSC_INDEX_CHECK)
00405         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00406 #else
00407         throw()
00408 #endif
00409         { return _vsvusetsup(iv,rv); }
00410         INLINE ivector &UncheckedSetSup(ivector &iv,const rvector_slice &rv)
00411 #if(CXSC_INDEX_CHECK)
00412         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00413 #else
00414         throw()
00415 #endif
00416         { return _vvsusetsup(iv,rv); }
00417         INLINE ivector_slice &UncheckedSetSup(ivector_slice &iv,const rvector_slice &rv)
00418 #if(CXSC_INDEX_CHECK)
00419         throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00420 #else
00421         throw()
00422 #endif
00423         { return _vsvsusetsup(iv,rv); }
00424 
00425         INLINE ivector &SetSup(ivector &iv,const real &r) throw() { return _vssetsup(iv,r); }
00426         INLINE ivector &SetInf(ivector &iv,const real &r) throw() { return _vssetinf(iv,r); }
00427         INLINE ivector &UncheckedSetSup(ivector &iv,const real &r) throw() { return _vsusetsup(iv,r); }
00428         INLINE ivector &SetUncheckedInf(ivector &iv,const real &r) throw() { return _vsusetinf(iv,r); }
00429         INLINE ivector_slice &SetSup(ivector_slice &iv,const real &r) throw() { return _vsssetsup(iv,r); }
00430         INLINE ivector_slice &SetInf(ivector_slice &iv,const real &r) throw() { return _vsssetinf(iv,r); }
00431         INLINE ivector_slice &UncheckedSetSup(ivector_slice &iv,const real &r) throw() { return _vssusetsup(iv,r); }
00432         INLINE ivector_slice &SetUncheckedInf(ivector_slice &iv,const real &r) throw() { return _vssusetinf(iv,r); }
00433 
00434         INLINE void Resize(ivector &rv) throw() { _vresize(rv); } 
00435         INLINE void Resize(ivector &rv, const int &len)
00436 #if(CXSC_INDEX_CHECK)
00437         throw(ERROR__WRONG_BOUNDARIES<ivector>)
00438 #else
00439         throw()
00440 #endif
00441         { _vresize<class ivector,class interval>(rv,len); }
00442         INLINE void Resize(ivector &rv, const int &lb, const int &ub)
00443 #if(CXSC_INDEX_CHECK)
00444         throw(ERROR__WRONG_BOUNDARIES<ivector>)
00445 #else
00446         throw()
00447 #endif
00448         { _vresize<class ivector,class interval>(rv,lb,ub); }
00449         
00450         INLINE ivector abs(const ivector &rv) throw() { return _vabs<ivector,ivector>(rv); }
00451         INLINE ivector abs(const ivector_slice &sl) throw() { return _vsabs<ivector_slice,ivector>(sl); }
00452         INLINE rvector absmin(const ivector &rv) throw() {
00453           rvector x(Lb(rv),Ub(rv));
00454           for(int i=Lb(rv) ; i<=Ub(rv) ; i++)
00455             x[i] = AbsMin(rv[i]);
00456           return x;
00457         }
00458         INLINE rvector absmin(const ivector_slice &sl) throw() { 
00459           rvector x(Lb(sl),Ub(sl));
00460           for(int i=Lb(sl) ; i<=Ub(sl) ; i++)
00461             x[i] = AbsMin(sl[i]);
00462           return x;
00463         }
00464         INLINE rvector absmax(const ivector &rv) throw() {
00465           rvector x(Lb(rv),Ub(rv));
00466           for(int i=Lb(rv) ; i<=Ub(rv) ; i++)
00467             x[i] = AbsMax(rv[i]);
00468           return x;
00469         }
00470         INLINE rvector absmax(const ivector_slice &sl) throw() { 
00471           rvector x(Lb(sl),Ub(sl));
00472           for(int i=Lb(sl) ; i<=Ub(sl) ; i++)
00473             x[i] = AbsMax(sl[i]);
00474           return x;
00475         }
00476         INLINE rvector diam(const ivector &v) throw() { return _vdiam<ivector,rvector>(v); }
00477         INLINE rvector diam(const ivector_slice &v) throw() { return _vsdiam<ivector_slice,rvector>(v); }
00478         INLINE rvector mid(const ivector &v) throw() { return _vmid<ivector,rvector>(v); }
00479         INLINE rvector mid(const ivector_slice &v) throw() { return _vsmid<ivector_slice,rvector>(v); }
00480         INLINE rvector Inf(const ivector &v) throw() { return _vinf<ivector,rvector>(v); }
00481         INLINE rvector Inf(const ivector_slice &v) throw() { return _vsinf<ivector_slice,rvector>(v); }
00482         INLINE rvector Sup(const ivector &v) throw() { return _vsup<ivector,rvector>(v); }
00483         INLINE rvector Sup(const ivector_slice &v) throw() { return _vssup<ivector_slice,rvector>(v); }
00484         INLINE bool operator !(const ivector &rv) throw() { return _vnot(rv); }
00485         INLINE bool operator !(const ivector_slice &sl) throw() { return _vsnot(sl); }
00486 
00487 //======================= Vector / Scalar ===============================
00488 
00489 //----------------------------- Interval ---------------------------
00490 
00491         INLINE ivector operator *(const ivector &rv, const interval &s) throw() { return _vsmult<ivector,interval,ivector>(rv,s); }
00492         INLINE ivector operator *(const ivector_slice &sl, const interval &s) throw() { return _vssmult<ivector_slice,interval,ivector>(sl,s); }
00493         INLINE ivector operator *(const interval &s, const ivector &rv) throw() { return _vsmult<ivector,interval,ivector>(rv,s); }
00494         INLINE ivector operator *(const interval &s, const ivector_slice &sl) throw() { return _vssmult<ivector_slice,interval,ivector>(sl,s); }
00495         INLINE ivector &operator *=(ivector &rv,const interval &r) throw() { return _vsmultassign(rv,r); }
00496         INLINE ivector_slice &ivector_slice::operator *=(const interval &r) throw() { return _vssmultassign(*this,r); }
00497 
00498         INLINE ivector operator /(const ivector &rv, const interval &s) throw() { return _vsdiv<ivector,interval,ivector>(rv,s); }
00499         INLINE ivector operator /(const ivector_slice &sl, const interval &s) throw() { return _vssdiv<ivector_slice,interval,ivector>(sl,s); }
00500         INLINE ivector &operator /=(ivector &rv,const interval &r) throw() { return _vsdivassign(rv,r); }
00501         INLINE ivector_slice &ivector_slice::operator /=(const interval &r) throw() { return _vssdivassign(*this,r); }
00502 
00503 //---------------------------- Real --------------------------------------
00504 
00505         INLINE ivector operator *(const ivector &rv, const real &s) throw() { return _vsmult<ivector,real,ivector>(rv,s); }
00506         INLINE ivector operator *(const ivector_slice &sl, const real &s) throw() { return _vssmult<ivector_slice,real,ivector>(sl,s); }
00507         INLINE ivector operator *(const real &s, const ivector &rv) throw() { return _vsmult<ivector,real,ivector>(rv,s); }
00508         INLINE ivector operator *(const real &s, const ivector_slice &sl) throw() { return _vssmult<ivector_slice,real,ivector>(sl,s); }
00509         INLINE ivector &operator *=(ivector &rv,const real &r) throw() { return _vsmultassign(rv,r); }
00510         INLINE ivector_slice &ivector_slice::operator *=(const real &r) throw() { return _vssmultassign(*this,r); }
00511 
00512         INLINE ivector operator /(const ivector &rv, const real &s) throw() { return _vsdiv<ivector,real,ivector>(rv,s); }
00513         INLINE ivector operator /(const ivector_slice &sl, const real &s) throw() { return _vssdiv<ivector_slice,real,ivector>(sl,s); }
00514         INLINE ivector &operator /=(ivector &rv,const real &r) throw() { return _vsdivassign(rv,r); }
00515         INLINE ivector_slice &ivector_slice::operator /=(const real &r) throw() { return _vssdivassign(*this,r); }
00516 
00517         INLINE ivector operator *(const rvector &rv, const interval &s) throw() { return _vsmult<rvector,interval,ivector>(rv,s); }
00518         INLINE ivector operator *(const rvector_slice &sl, const interval &s) throw() { return _vssmult<rvector_slice,interval,ivector>(sl,s); }
00519         INLINE ivector operator *(const interval &s, const rvector &rv) throw() { return _vsmult<rvector,interval,ivector>(rv,s); }
00520         INLINE ivector operator *(const interval &s, const rvector_slice &sl) throw() { return _vssmult<rvector_slice,interval,ivector>(sl,s); }
00521 
00522         INLINE ivector operator /(const rvector &rv, const interval &s) throw() { return _vsdiv<rvector,interval,ivector>(rv,s); }
00523         INLINE ivector operator /(const rvector_slice &sl, const interval &s) throw() { return _vssdiv<rvector_slice,interval,ivector>(sl,s); }
00524 
00525 //======================= Vector / Vector ===============================
00526 
00527 
00528         INLINE std::ostream &operator <<(std::ostream &s, const ivector &rv) throw() { return _vout(s,rv); }
00529         INLINE std::ostream &operator <<(std::ostream &o, const ivector_slice &sl) throw() { return _vsout(o,sl); }
00530         INLINE std::istream &operator >>(std::istream &s, ivector &rv) throw() { return _vin(s,rv); }
00531         INLINE std::istream &operator >>(std::istream &s, ivector_slice &rv) throw() { return _vsin(s,rv); }
00532         
00533 //----------------------- Interval / Interval ---------------------------
00534         INLINE ivector & ivector::operator =(const ivector_slice &sl) throw() { return _vvsassign<ivector,ivector_slice,interval>(*this,sl); }
00535 
00536 
00537         INLINE interval operator *(const ivector & rv1, const ivector &rv2)
00538 #if(CXSC_INDEX_CHECK)
00539         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00540 #else
00541         throw()
00542 #endif
00543         { return _vvimult<ivector,ivector,interval>(rv1,rv2); }
00544         INLINE interval operator *(const ivector_slice &sl, const ivector &rv)
00545 #if(CXSC_INDEX_CHECK)
00546         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00547 #else
00548         throw()
00549 #endif
00550         { return _vsvimult<ivector_slice,ivector,interval>(sl,rv); }
00551         INLINE interval operator *(const ivector &rv, const ivector_slice &sl)
00552 #if(CXSC_INDEX_CHECK)
00553         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00554 #else
00555         throw()
00556 #endif
00557         { return _vsvimult<ivector_slice,ivector,interval>(sl,rv); }
00558         INLINE interval operator *(const ivector_slice & sl1, const ivector_slice &sl2)
00559 #if(CXSC_INDEX_CHECK)
00560         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00561 #else
00562         throw()
00563 #endif
00564         { return _vsvsimult<ivector_slice,ivector_slice,interval>(sl1,sl2); }
00565         
00566         INLINE const ivector &operator +(const ivector &rv) throw() { return rv; }
00567         INLINE ivector operator +(const ivector_slice &sl) throw() { return sl; }
00568         INLINE ivector operator +(const ivector &rv1, const ivector &rv2)
00569 #if(CXSC_INDEX_CHECK)
00570         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00571 #else
00572         throw()
00573 #endif
00574         { return _vvplus<ivector,ivector,ivector>(rv1,rv2); }
00575         INLINE ivector operator +(const ivector &rv, const ivector_slice &sl)
00576 #if(CXSC_INDEX_CHECK)
00577         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00578 #else
00579         throw()
00580 #endif
00581         { return _vvsplus<ivector,ivector_slice,ivector>(rv,sl); }
00582         INLINE ivector operator +(const ivector_slice &sl, const ivector &rv)
00583 #if(CXSC_INDEX_CHECK)
00584         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00585 #else
00586         throw()
00587 #endif
00588         { return _vvsplus<ivector,ivector_slice,ivector>(rv,sl); }
00589         INLINE ivector operator +(const ivector_slice &sl1, const ivector_slice &sl2)
00590 #if(CXSC_INDEX_CHECK)
00591         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00592 #else
00593         throw()
00594 #endif
00595         { return _vsvsplus<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
00596         INLINE ivector & operator +=(ivector &rv1, const ivector &rv2)
00597 #if(CXSC_INDEX_CHECK)
00598         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00599 #else
00600         throw()
00601 #endif
00602         { return _vvplusassign(rv1,rv2); }
00603         INLINE ivector &operator +=(ivector &rv, const ivector_slice &sl)
00604 #if(CXSC_INDEX_CHECK)
00605         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00606 #else
00607         throw()
00608 #endif
00609         { return _vvsplusassign(rv,sl); }
00610         INLINE ivector_slice &ivector_slice::operator +=(const ivector &rv)
00611 #if(CXSC_INDEX_CHECK)
00612         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00613 #else
00614         throw()
00615 #endif
00616         { return _vsvplusassign(*this,rv); }
00617         INLINE ivector_slice &ivector_slice::operator +=(const ivector_slice &sl2)
00618 #if(CXSC_INDEX_CHECK)
00619         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00620 #else
00621         throw()
00622 #endif
00623         { return _vsvsplusassign(*this,sl2); }
00624 
00625         INLINE ivector operator -(const ivector &rv) throw() { return _vminus(rv); }
00626         INLINE ivector operator -(const ivector_slice &sl) throw() { return _vsminus<ivector_slice,ivector>(sl); }
00627         INLINE ivector operator -(const ivector &rv1, const ivector &rv2)
00628 #if(CXSC_INDEX_CHECK)
00629         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00630 #else
00631         throw()
00632 #endif
00633         { return _vvminus<ivector,ivector,ivector>(rv1,rv2); }
00634         INLINE ivector operator -(const ivector &rv, const ivector_slice &sl)
00635 #if(CXSC_INDEX_CHECK)
00636         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00637 #else
00638         throw()
00639 #endif
00640         { return _vvsminus<ivector,ivector_slice,ivector>(rv,sl); }
00641         INLINE ivector operator -(const ivector_slice &sl, const ivector &rv)
00642 #if(CXSC_INDEX_CHECK)
00643         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00644 #else
00645         throw()
00646 #endif
00647         { return _vsvminus<ivector_slice,ivector,ivector>(sl,rv); }
00648         INLINE ivector operator -(const ivector_slice &sl1, const ivector_slice &sl2)
00649 #if(CXSC_INDEX_CHECK)
00650         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00651 #else
00652         throw()
00653 #endif
00654         { return _vsvsminus<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
00655         INLINE ivector & operator -=(ivector &rv1, const ivector &rv2)
00656 #if(CXSC_INDEX_CHECK)
00657         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00658 #else
00659         throw()
00660 #endif
00661         { return _vvminusassign(rv1,rv2); }
00662         INLINE ivector &operator -=(ivector &rv, const ivector_slice &sl)
00663 #if(CXSC_INDEX_CHECK)
00664         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00665 #else
00666         throw()
00667 #endif
00668         { return _vvsminusassign(rv,sl); }
00669         INLINE ivector_slice &ivector_slice::operator -=(const ivector &rv)
00670 #if(CXSC_INDEX_CHECK)
00671         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00672 #else
00673         throw()
00674 #endif
00675         { return _vsvminusassign(*this,rv); }
00676         INLINE ivector_slice &ivector_slice::operator -=(const ivector_slice &sl2)
00677 #if(CXSC_INDEX_CHECK)
00678         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00679 #else
00680         throw()
00681 #endif
00682         { return _vsvsminusassign(*this,sl2); }
00683 
00684         INLINE ivector operator |(const ivector &rv1, const ivector &rv2)
00685 #if(CXSC_INDEX_CHECK)
00686         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00687 #else
00688         throw()
00689 #endif
00690         { return _vvconv<ivector,ivector,ivector>(rv1,rv2); }
00691         INLINE ivector operator |(const ivector &rv, const ivector_slice &sl)
00692 #if(CXSC_INDEX_CHECK)
00693         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00694 #else
00695         throw()
00696 #endif
00697         { return _vvsconv<ivector,ivector_slice,ivector>(rv,sl); }
00698         INLINE ivector operator |(const ivector_slice &sl, const ivector &rv)
00699 #if(CXSC_INDEX_CHECK)
00700         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00701 #else
00702         throw()
00703 #endif
00704         { return _vvsconv<ivector,ivector_slice,ivector>(rv,sl); }
00705         INLINE ivector operator |(const ivector_slice &sl1, const ivector_slice &sl2)
00706 #if(CXSC_INDEX_CHECK)
00707         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00708 #else
00709         throw()
00710 #endif
00711         { return _vsvsconv<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
00712         INLINE ivector & operator |=(ivector &rv1, const ivector &rv2)
00713 #if(CXSC_INDEX_CHECK)
00714         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00715 #else
00716         throw()
00717 #endif
00718         { return _vvconvassign(rv1,rv2); }
00719         INLINE ivector &operator |=(ivector &rv, const ivector_slice &sl)
00720 #if(CXSC_INDEX_CHECK)
00721         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00722 #else
00723         throw()
00724 #endif
00725         { return _vvsconvassign(rv,sl); }
00726         INLINE ivector_slice &ivector_slice::operator |=(const ivector &rv)
00727 #if(CXSC_INDEX_CHECK)
00728         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00729 #else
00730         throw()
00731 #endif
00732         { return _vsvconvassign(*this,rv); }
00733         INLINE ivector_slice &ivector_slice::operator |=(const ivector_slice &sl2)
00734 #if(CXSC_INDEX_CHECK)
00735         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00736 #else
00737         throw()
00738 #endif
00739         { return _vsvsconvassign(*this,sl2); }
00740 
00741         INLINE ivector operator &(const ivector &rv1, const ivector &rv2)
00742 #if(CXSC_INDEX_CHECK)
00743         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00744 #else
00745         throw()
00746 #endif
00747         { return _vvsect<ivector,ivector,ivector>(rv1,rv2); }
00748         INLINE ivector operator &(const ivector &rv, const ivector_slice &sl)
00749 #if(CXSC_INDEX_CHECK)
00750         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00751 #else
00752         throw()
00753 #endif
00754         { return _vvssect<ivector,ivector_slice,ivector>(rv,sl); }
00755         INLINE ivector operator &(const ivector_slice &sl, const ivector &rv)
00756 #if(CXSC_INDEX_CHECK)
00757         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00758 #else
00759         throw()
00760 #endif
00761         { return _vvssect<ivector,ivector_slice,ivector>(rv,sl); }
00762         INLINE ivector operator &(const ivector_slice &sl1, const ivector_slice &sl2)
00763 #if(CXSC_INDEX_CHECK)
00764         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00765 #else
00766         throw()
00767 #endif
00768         { return _vsvssect<ivector_slice,ivector_slice,ivector>(sl1,sl2); }
00769         INLINE ivector & operator &=(ivector &rv1, const ivector &rv2)
00770 #if(CXSC_INDEX_CHECK)
00771         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00772 #else
00773         throw()
00774 #endif
00775         { return _vvsectassign(rv1,rv2); }
00776         INLINE ivector &operator &=(ivector &rv, const ivector_slice &sl)
00777 #if(CXSC_INDEX_CHECK)
00778         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00779 #else
00780         throw()
00781 #endif
00782         { return _vvssectassign(rv,sl); }
00783         INLINE ivector_slice &ivector_slice::operator &=(const ivector &rv)
00784 #if(CXSC_INDEX_CHECK)
00785         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00786 #else
00787         throw()
00788 #endif
00789         { return _vsvsectassign(*this,rv); }
00790         INLINE ivector_slice &ivector_slice::operator &=(const ivector_slice &sl2)
00791 #if(CXSC_INDEX_CHECK)
00792         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00793 #else
00794         throw()
00795 #endif
00796         { return _vsvssectassign(*this,sl2); }
00797 
00798         INLINE bool operator ==(const ivector &rv1, const ivector &rv2) throw() { return _vveq(rv1,rv2); }
00799         INLINE bool operator ==(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvseq(sl1,sl2); }
00800         INLINE bool operator ==(const ivector_slice &sl, const ivector &rv) throw() { return _vsveq(sl,rv); }
00801         INLINE bool operator ==(const ivector &rv, const ivector_slice &sl) throw() { return _vsveq(sl,rv); }
00802         INLINE bool operator !=(const ivector &rv1, const ivector &rv2) throw() { return _vvneq(rv1,rv2); }
00803         INLINE bool operator !=(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsneq(sl1,sl2); }
00804         INLINE bool operator !=(const ivector_slice &sl, const ivector &rv) throw() { return _vsvneq(sl,rv); }
00805         INLINE bool operator !=(const ivector &rv, const ivector_slice &sl) throw() { return _vsvneq(sl,rv); }
00806         INLINE bool operator <(const ivector &rv1, const ivector &rv2) throw() { return _vvless(rv1,rv2); }
00807         INLINE bool operator <(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsless(sl1,sl2); }
00808         INLINE bool operator < (const ivector_slice &sl, const ivector &rv) throw() { return _vsvless(sl,rv); }
00809         INLINE bool operator < (const ivector &rv, const ivector_slice &sl) throw() { return _vvsless(rv,sl); }
00810         INLINE bool operator <=(const ivector &rv1, const ivector &rv2) throw() { return _vvleq(rv1,rv2); }
00811         INLINE bool operator <=(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsleq(sl1,sl2); }
00812         INLINE bool operator <=(const ivector_slice &sl, const ivector &rv) throw() { return _vsvleq(sl,rv); }
00813         INLINE bool operator <=(const ivector &rv, const ivector_slice &sl) throw() { return _vvsleq(rv,sl); }
00814         INLINE bool operator >(const ivector &rv1, const ivector &rv2) throw() { return _vvless(rv2,rv1); }
00815         INLINE bool operator >(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsless(sl2,sl1); }
00816         INLINE bool operator >(const ivector_slice &sl, const ivector &rv) throw() { return _vvsless(rv,sl); }
00817         INLINE bool operator >(const ivector &rv, const ivector_slice &sl) throw() { return _vsvless(sl,rv); }
00818         INLINE bool operator >=(const ivector &rv1, const ivector &rv2) throw() { return _vvleq(rv2,rv1); }
00819         INLINE bool operator >=(const ivector_slice &sl1, const ivector_slice &sl2) throw() { return _vsvsleq(sl2,sl1); }
00820         INLINE bool operator >=(const ivector_slice &sl, const ivector &rv) throw() { return _vvsleq(rv,sl); }
00821         INLINE bool operator >=(const ivector &rv, const ivector_slice &sl) throw() { return _vsvleq(sl,rv); }
00822 
00823 //-------------------------------- Interval / Real --------------------------------
00824 
00825         INLINE ivector & ivector::operator =(const rvector_slice &sl) throw() { return _vvsassign<ivector,rvector_slice,interval>(*this,sl); }
00826 
00827 
00828         INLINE interval operator *(const rvector & rv1, const ivector &rv2)
00829 #if(CXSC_INDEX_CHECK)
00830         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00831 #else
00832         throw()
00833 #endif
00834         { return _vvimult<rvector,ivector,interval>(rv1,rv2); }
00835         INLINE interval operator *(const rvector_slice &sl, const ivector &rv)
00836 #if(CXSC_INDEX_CHECK)
00837         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00838 #else
00839         throw()
00840 #endif
00841         { return _vsvimult<rvector_slice,ivector,interval>(sl,rv); }
00842         INLINE interval operator *(const rvector &rv, const ivector_slice &sl)
00843 #if(CXSC_INDEX_CHECK)
00844         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00845 #else
00846         throw()
00847 #endif
00848         { return _vsvimult<ivector_slice,rvector,interval>(sl,rv); }
00849         INLINE interval operator *(const rvector_slice & sl1, const ivector_slice &sl2)
00850 #if(CXSC_INDEX_CHECK)
00851         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00852 #else
00853         throw()
00854 #endif
00855         { return _vsvsimult<rvector_slice,ivector_slice,interval>(sl1,sl2); }
00856         
00857         INLINE interval operator *(const ivector & rv1, const rvector &rv2)
00858 #if(CXSC_INDEX_CHECK)
00859         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00860 #else
00861         throw()
00862 #endif
00863         { return _vvimult<rvector,ivector,interval>(rv2,rv1); }
00864         INLINE interval operator *(const ivector_slice &sl, const rvector &rv)
00865 #if(CXSC_INDEX_CHECK)
00866         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00867 #else
00868         throw()
00869 #endif
00870         { return _vsvimult<ivector_slice,rvector,interval>(sl,rv); }
00871         INLINE interval operator *(const ivector &rv, const rvector_slice &sl)
00872 #if(CXSC_INDEX_CHECK)
00873         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00874 #else
00875         throw()
00876 #endif
00877         { return _vsvimult<rvector_slice,ivector,interval>(sl,rv); }
00878         INLINE interval operator *(const ivector_slice & sl1, const rvector_slice &sl2)
00879 #if(CXSC_INDEX_CHECK)
00880         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00881 #else
00882         throw()
00883 #endif
00884         { return _vsvsimult<rvector_slice,ivector_slice,interval>(sl2,sl1); }
00885         
00886         INLINE ivector operator +(const rvector &rv1, const ivector &rv2)
00887 #if(CXSC_INDEX_CHECK)
00888         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00889 #else
00890         throw()
00891 #endif
00892         { return _vvplus<rvector,ivector,ivector>(rv1,rv2); }
00893         INLINE ivector operator +(const rvector &rv, const ivector_slice &sl)
00894 #if(CXSC_INDEX_CHECK)
00895         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00896 #else
00897         throw()
00898 #endif
00899         { return _vvsplus<rvector,ivector_slice,ivector>(rv,sl); }
00900         INLINE ivector operator +(const rvector_slice &sl, const ivector &rv)
00901 #if(CXSC_INDEX_CHECK)
00902         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00903 #else
00904         throw()
00905 #endif
00906         { return _vvsplus<ivector,rvector_slice,ivector>(rv,sl); }
00907         INLINE ivector operator +(const rvector_slice &sl1, const ivector_slice &sl2)
00908 #if(CXSC_INDEX_CHECK)
00909         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00910 #else
00911         throw()
00912 #endif
00913         { return _vsvsplus<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
00914 
00915         INLINE ivector operator +(const ivector &rv1, const rvector &rv2)
00916 #if(CXSC_INDEX_CHECK)
00917         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00918 #else
00919         throw()
00920 #endif
00921         { return _vvplus<rvector,ivector,ivector>(rv2,rv1); }
00922         INLINE ivector operator +(const ivector &rv, const rvector_slice &sl)
00923 #if(CXSC_INDEX_CHECK)
00924         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00925 #else
00926         throw()
00927 #endif
00928         { return _vvsplus<ivector,rvector_slice,ivector>(rv,sl); }
00929         INLINE ivector operator +(const ivector_slice &sl, const rvector &rv)
00930 #if(CXSC_INDEX_CHECK)
00931         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00932 #else
00933         throw()
00934 #endif
00935         { return _vvsplus<rvector,ivector_slice,ivector>(rv,sl); }
00936         INLINE ivector operator +(const ivector_slice &sl1, const rvector_slice &sl2)
00937 #if(CXSC_INDEX_CHECK)
00938         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00939 #else
00940         throw()
00941 #endif
00942         { return _vsvsplus<rvector_slice,ivector_slice,ivector>(sl2,sl1); }
00943 
00944         INLINE ivector & operator +=(ivector &rv1, const rvector &rv2)
00945 #if(CXSC_INDEX_CHECK)
00946         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00947 #else
00948         throw()
00949 #endif
00950         { return _vvplusassign(rv1,rv2); }
00951         INLINE ivector &operator +=(ivector &rv, const rvector_slice &sl)
00952 #if(CXSC_INDEX_CHECK)
00953         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00954 #else
00955         throw()
00956 #endif
00957         { return _vvsplusassign(rv,sl); }
00958         INLINE ivector_slice &ivector_slice::operator +=(const rvector &rv)
00959 #if(CXSC_INDEX_CHECK)
00960         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00961 #else
00962         throw()
00963 #endif
00964         { return _vsvplusassign(*this,rv); }
00965         INLINE ivector_slice &ivector_slice::operator +=(const rvector_slice &sl2)
00966 #if(CXSC_INDEX_CHECK)
00967         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00968 #else
00969         throw()
00970 #endif
00971         { return _vsvsplusassign(*this,sl2); }
00972 
00973         INLINE ivector operator -(const rvector &rv1, const ivector &rv2)
00974 #if(CXSC_INDEX_CHECK)
00975         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00976 #else
00977         throw()
00978 #endif
00979         { return _vvminus<rvector,ivector,ivector>(rv1,rv2); }
00980         INLINE ivector operator -(const rvector &rv, const ivector_slice &sl)
00981 #if(CXSC_INDEX_CHECK)
00982         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00983 #else
00984         throw()
00985 #endif
00986         { return _vvsminus<rvector,ivector_slice,ivector>(rv,sl); }
00987         INLINE ivector operator -(const rvector_slice &sl, const ivector &rv)
00988 #if(CXSC_INDEX_CHECK)
00989         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00990 #else
00991         throw()
00992 #endif
00993         { return _vsvminus<rvector_slice,ivector,ivector>(sl,rv); }
00994         INLINE ivector operator -(const rvector_slice &sl1, const ivector_slice &sl2)
00995 #if(CXSC_INDEX_CHECK)
00996         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
00997 #else
00998         throw()
00999 #endif
01000         { return _vsvsminus<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
01001 
01002         INLINE ivector operator -(const ivector &rv1, const rvector &rv2)
01003 #if(CXSC_INDEX_CHECK)
01004         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01005 #else
01006         throw()
01007 #endif
01008         { return _vvminus<ivector,rvector,ivector>(rv1,rv2); }
01009         INLINE ivector operator -(const ivector &rv, const rvector_slice &sl)
01010 #if(CXSC_INDEX_CHECK)
01011         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01012 #else
01013         throw()
01014 #endif
01015         { return _vvsminus<ivector,rvector_slice,ivector>(rv,sl); }
01016         INLINE ivector operator -(const ivector_slice &sl, const rvector &rv)
01017 #if(CXSC_INDEX_CHECK)
01018         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01019 #else
01020         throw()
01021 #endif
01022         { return _vsvminus<ivector_slice,rvector,ivector>(sl,rv); }
01023         INLINE ivector operator -(const ivector_slice &sl1, const rvector_slice &sl2)
01024 #if(CXSC_INDEX_CHECK)
01025         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01026 #else
01027         throw()
01028 #endif
01029         { return _vsvsminus<ivector_slice,rvector_slice,ivector>(sl1,sl2); }
01030 
01031         INLINE ivector & operator -=(ivector &rv1, const rvector &rv2)
01032 #if(CXSC_INDEX_CHECK)
01033         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01034 #else
01035         throw()
01036 #endif
01037         { return _vvminusassign(rv1,rv2); }
01038         INLINE ivector &operator -=(ivector &rv, const rvector_slice &sl)
01039 #if(CXSC_INDEX_CHECK)
01040         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01041 #else
01042         throw()
01043 #endif
01044         { return _vvsminusassign(rv,sl); }
01045         INLINE ivector_slice &ivector_slice::operator -=(const rvector &rv)
01046 #if(CXSC_INDEX_CHECK)
01047         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01048 #else
01049         throw()
01050 #endif
01051         { return _vsvminusassign(*this,rv); }
01052         INLINE ivector_slice &ivector_slice::operator -=(const rvector_slice &sl2)
01053 #if(CXSC_INDEX_CHECK)
01054         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01055 #else
01056         throw()
01057 #endif
01058         { return _vsvsminusassign(*this,sl2); }
01059 
01060         INLINE ivector operator |(const rvector &rv1, const rvector &rv2)
01061 #if(CXSC_INDEX_CHECK)
01062         throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
01063 #else
01064         throw()
01065 #endif
01066         { return _vvconv<rvector,rvector,ivector>(rv1,rv2); }
01067         INLINE ivector operator |(const rvector &rv, const rvector_slice &sl)
01068 #if(CXSC_INDEX_CHECK)
01069         throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
01070 #else
01071         throw()
01072 #endif
01073         { return _vvsconv<rvector,rvector_slice,ivector>(rv,sl); }
01074         INLINE ivector operator |(const rvector_slice &sl, const rvector &rv)
01075 #if(CXSC_INDEX_CHECK)
01076         throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
01077 #else
01078         throw()
01079 #endif
01080         { return _vvsconv<rvector,rvector_slice,ivector>(rv,sl); }
01081         INLINE ivector operator |(const rvector_slice &sl1, const rvector_slice &sl2)
01082 #if(CXSC_INDEX_CHECK)
01083         throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
01084 #else
01085         throw()
01086 #endif
01087         { return _vsvsconv<rvector_slice,rvector_slice,ivector>(sl1,sl2); }
01088         INLINE ivector operator |(const rvector &rv1, const ivector &rv2)
01089 #if(CXSC_INDEX_CHECK)
01090         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01091 #else
01092         throw()
01093 #endif
01094         { return _vvconv<rvector,ivector,ivector>(rv1,rv2); }
01095         INLINE ivector operator |(const rvector &rv, const ivector_slice &sl)
01096 #if(CXSC_INDEX_CHECK)
01097         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01098 #else
01099         throw()
01100 #endif
01101         { return _vvsconv<rvector,ivector_slice,ivector>(rv,sl); }
01102         INLINE ivector operator |(const rvector_slice &sl, const ivector &rv)
01103 #if(CXSC_INDEX_CHECK)
01104         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01105 #else
01106         throw()
01107 #endif
01108         { return _vvsconv<ivector,rvector_slice,ivector>(rv,sl); }
01109         INLINE ivector operator |(const rvector_slice &sl1, const ivector_slice &sl2)
01110 #if(CXSC_INDEX_CHECK)
01111         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01112 #else
01113         throw()
01114 #endif
01115         { return _vsvsconv<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
01116 
01117         INLINE ivector operator |(const ivector &rv1, const rvector &rv2)
01118 #if(CXSC_INDEX_CHECK)
01119         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01120 #else
01121         throw()
01122 #endif
01123         { return _vvconv<rvector,ivector,ivector>(rv2,rv1); }
01124         INLINE ivector operator |(const ivector &rv, const rvector_slice &sl)
01125 #if(CXSC_INDEX_CHECK)
01126         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01127 #else
01128         throw()
01129 #endif
01130         { return _vvsconv<ivector,rvector_slice,ivector>(rv,sl); }
01131         INLINE ivector operator |(const ivector_slice &sl, const rvector &rv)
01132 #if(CXSC_INDEX_CHECK)
01133         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01134 #else
01135         throw()
01136 #endif
01137         { return _vvsconv<rvector,ivector_slice,ivector>(rv,sl); }
01138         INLINE ivector operator |(const ivector_slice &sl1, const rvector_slice &sl2)
01139 #if(CXSC_INDEX_CHECK)
01140         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01141 #else
01142         throw()
01143 #endif
01144         { return _vsvsconv<rvector_slice,ivector_slice,ivector>(sl2,sl1); }
01145 
01146         INLINE ivector & operator |=(ivector &rv1, const rvector &rv2)
01147 #if(CXSC_INDEX_CHECK)
01148         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01149 #else
01150         throw()
01151 #endif
01152         { return _vvconvassign(rv1,rv2); }
01153         INLINE ivector &operator |=(ivector &rv, const rvector_slice &sl)
01154 #if(CXSC_INDEX_CHECK)
01155         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01156 #else
01157         throw()
01158 #endif
01159         { return _vvsconvassign(rv,sl); }
01160         INLINE ivector_slice &ivector_slice::operator |=(const rvector &rv)
01161 #if(CXSC_INDEX_CHECK)
01162         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01163 #else
01164         throw()
01165 #endif
01166         { return _vsvconvassign(*this,rv); }
01167         INLINE ivector_slice &ivector_slice::operator |=(const rvector_slice &sl2)
01168 #if(CXSC_INDEX_CHECK)
01169         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01170 #else
01171         throw()
01172 #endif
01173         { return _vsvsconvassign(*this,sl2); }
01174 
01175         INLINE ivector operator &(const rvector &rv1, const ivector &rv2)
01176 #if(CXSC_INDEX_CHECK)
01177         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01178 #else
01179         throw()
01180 #endif
01181         { return _vvsect<rvector,ivector,ivector>(rv1,rv2); }
01182         INLINE ivector operator &(const rvector &rv, const ivector_slice &sl)
01183 #if(CXSC_INDEX_CHECK)
01184         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01185 #else
01186         throw()
01187 #endif
01188         { return _vvssect<rvector,ivector_slice,ivector>(rv,sl); }
01189         INLINE ivector operator &(const rvector_slice &sl, const ivector &rv)
01190 #if(CXSC_INDEX_CHECK)
01191         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01192 #else
01193         throw()
01194 #endif
01195         { return _vvssect<ivector,rvector_slice,ivector>(rv,sl); }
01196         INLINE ivector operator &(const rvector_slice &sl1, const ivector_slice &sl2)
01197 #if(CXSC_INDEX_CHECK)
01198         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01199 #else
01200         throw()
01201 #endif
01202         { return _vsvssect<rvector_slice,ivector_slice,ivector>(sl1,sl2); }
01203 
01204         INLINE ivector operator &(const ivector &rv1, const rvector &rv2)
01205 #if(CXSC_INDEX_CHECK)
01206         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01207 #else
01208         throw()
01209 #endif
01210         { return _vvsect<rvector,ivector,ivector>(rv2,rv1); }
01211         INLINE ivector operator &(const ivector &rv, const rvector_slice &sl)
01212 #if(CXSC_INDEX_CHECK)
01213         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01214 #else
01215         throw()
01216 #endif
01217         { return _vvssect<ivector,rvector_slice,ivector>(rv,sl); }
01218         INLINE ivector operator &(const ivector_slice &sl, const rvector &rv)
01219 #if(CXSC_INDEX_CHECK)
01220         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01221 #else
01222         throw()
01223 #endif
01224         { return _vvssect<rvector,ivector_slice,ivector>(rv,sl); }
01225         INLINE ivector operator &(const ivector_slice &sl1, const rvector_slice &sl2)
01226 #if(CXSC_INDEX_CHECK)
01227         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01228 #else
01229         throw()
01230 #endif
01231         { return _vsvssect<rvector_slice,ivector_slice,ivector>(sl2,sl1); }
01232 
01233         INLINE ivector & operator &=(ivector &rv1, const rvector &rv2)
01234 #if(CXSC_INDEX_CHECK)
01235         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01236 #else
01237         throw()
01238 #endif
01239         { return _vvsectassign(rv1,rv2); }
01240         INLINE ivector &operator &=(ivector &rv, const rvector_slice &sl)
01241 #if(CXSC_INDEX_CHECK)
01242         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01243 #else
01244         throw()
01245 #endif
01246         { return _vvssectassign(rv,sl); }
01247         INLINE ivector_slice &ivector_slice::operator &=(const rvector &rv)
01248 #if(CXSC_INDEX_CHECK)
01249         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01250 #else
01251         throw()
01252 #endif
01253         { return _vsvsectassign(*this,rv); }
01254         INLINE ivector_slice &ivector_slice::operator &=(const rvector_slice &sl2)
01255 #if(CXSC_INDEX_CHECK)
01256         throw(ERROR__OP_WITH_WRONG_DIM<ivector>)
01257 #else
01258         throw()
01259 #endif
01260         { return _vsvssectassign(*this,sl2); }
01261 
01262 
01264         INLINE ivector ivector::operator()(const intvector& p) {
01265           ivector x(*this);
01266           for(int i=0 ; i<VecLen(x) ; i++)
01267               x[i+Lb(x)] = (*this)[p[i+Lb(p)]+Lb(*this)];
01268           return x;
01269         }
01270 
01271 } // namespace cxsc
01272 
01273 #endif // _CXSC_IVECTOR_INL_INCLUDED