00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _CXSC_LIVECLRMAT_INL_INCLUDED
00028 #define _CXSC_LIVECLRMAT_INL_INCLUDED
00029
00030 namespace cxsc {
00031
00032 INLINE l_ivector::l_ivector(const l_rmatrix &sl)
00033 #if(CXSC_INDEX_CHECK)
00034 throw(ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00035 #else
00036 throw()
00037 #endif
00038 { _vmconstr<l_ivector,l_rmatrix,l_interval>(*this,sl); }
00039 INLINE l_ivector::l_ivector(const l_rmatrix_slice &sl)
00040 #if(CXSC_INDEX_CHECK)
00041 throw(ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00042 #else
00043 throw()
00044 #endif
00045 { _vmsconstr<l_ivector,l_rmatrix_slice,l_interval>(*this,sl); }
00046 INLINE l_ivector::l_ivector(const l_rmatrix_subv &v) throw():l(v.lb),u(v.ub),size(v.size)
00047 {
00048 dat=new l_interval[size];
00049 for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
00050 dat[i]=v.dat[j];
00051 }
00057 INLINE l_ivector _l_ivector(const l_rmatrix &sl)
00058 #if(CXSC_INDEX_CHECK)
00059 throw(ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00060 #else
00061 throw()
00062 #endif
00063 { return l_ivector(sl); }
00069 INLINE l_ivector _l_ivector(const l_rmatrix_slice &sl)
00070 #if(CXSC_INDEX_CHECK)
00071 throw(ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00072 #else
00073 throw()
00074 #endif
00075 { return l_ivector(sl); }
00076
00077 INLINE void accumulate(idotprecision &dp, const l_rmatrix_subv & rv1, const l_ivector &rv2)
00078 #if(CXSC_INDEX_CHECK)
00079 throw(OP_WITH_WRONG_DIM)
00080 #else
00081 throw()
00082 #endif
00083 { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,rv2,rv1); }
00084 INLINE void accumulate(idotprecision &dp, const l_ivector & rv1, const l_rmatrix_subv &rv2)
00085 #if(CXSC_INDEX_CHECK)
00086 throw(OP_WITH_WRONG_DIM)
00087 #else
00088 throw()
00089 #endif
00090 { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,rv1,rv2); }
00091
00092 INLINE void accumulate(idotprecision &dp, const l_rmatrix_subv & rv1, const l_ivector_slice &rv2)
00093 #if(CXSC_INDEX_CHECK)
00094 throw(OP_WITH_WRONG_DIM)
00095 #else
00096 throw()
00097 #endif
00098 { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,l_ivector(rv2),rv1); }
00099 INLINE void accumulate(idotprecision &dp, const l_ivector_slice & rv1, const l_rmatrix_subv &rv2)
00100 #if(CXSC_INDEX_CHECK)
00101 throw(OP_WITH_WRONG_DIM)
00102 #else
00103 throw()
00104 #endif
00105 { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,l_ivector(rv1),rv2); }
00106
00107 INLINE void SetInf(l_ivector &iv,const l_rmatrix_subv &rv)
00108 #if(CXSC_INDEX_CHECK)
00109 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00110 #else
00111 throw()
00112 #endif
00113 { _vmvsetinf(iv,rv); }
00114 INLINE void SetSup(l_ivector &iv,const l_rmatrix_subv &rv)
00115 #if(CXSC_INDEX_CHECK)
00116 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00117 #else
00118 throw()
00119 #endif
00120 { _vmvsetsup(iv,rv); }
00121 INLINE void SetInf(l_ivector_slice &iv,const l_rmatrix_subv &rv)
00122 #if(CXSC_INDEX_CHECK)
00123 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00124 #else
00125 throw()
00126 #endif
00127 { _vsvsetinf(iv,l_rvector(rv)); }
00128 INLINE void SetSup(l_ivector_slice &iv,const l_rmatrix_subv &rv)
00129 #if(CXSC_INDEX_CHECK)
00130 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00131 #else
00132 throw()
00133 #endif
00134 { _vsvsetsup(iv,l_rvector(rv)); }
00135
00136 INLINE void UncheckedSetInf(l_ivector &iv,const l_rmatrix_subv &rv)
00137 #if(CXSC_INDEX_CHECK)
00138 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00139 #else
00140 throw()
00141 #endif
00142 { _vmvusetinf(iv,rv); }
00143 INLINE void UncheckedSetSup(l_ivector &iv,const l_rmatrix_subv &rv)
00144 #if(CXSC_INDEX_CHECK)
00145 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00146 #else
00147 throw()
00148 #endif
00149 { _vmvusetsup(iv,rv); }
00150 INLINE void UncheckedSetInf(l_ivector_slice &iv,const l_rmatrix_subv &rv)
00151 #if(CXSC_INDEX_CHECK)
00152 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00153 #else
00154 throw()
00155 #endif
00156 { _vsvusetinf(iv,l_rvector(rv)); }
00157 INLINE void UncheckedSetSup(l_ivector_slice &iv,const l_rmatrix_subv &rv)
00158 #if(CXSC_INDEX_CHECK)
00159 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00160 #else
00161 throw()
00162 #endif
00163 { _vsvusetsup(iv,l_rvector(rv)); }
00164
00165 INLINE l_ivector &l_ivector::operator =(const l_rmatrix_subv &mv) throw() { return _vmvassign<l_ivector,l_rmatrix_subv,l_interval>(*this,mv); }
00166 INLINE l_ivector_slice &l_ivector_slice::operator =(const l_rmatrix_subv &mv) throw() { return _vsvassign(*this,l_rvector(mv)); }
00167 INLINE l_ivector &l_ivector::operator =(const l_rmatrix &m)
00168 #if(CXSC_INDEX_CHECK)
00169 throw(ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00170 #else
00171 throw()
00172 #endif
00173 { return _vmassign<l_ivector,l_rmatrix,l_interval>(*this,m); }
00174 INLINE l_ivector &l_ivector::operator =(const l_rmatrix_slice &m)
00175 #if(CXSC_INDEX_CHECK)
00176 throw(ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00177 #else
00178 throw()
00179 #endif
00180 { return _vmassign<l_ivector,l_rmatrix,l_interval>(*this,l_rmatrix(m)); }
00181 INLINE l_ivector_slice &l_ivector_slice::operator =(const l_rmatrix &m)
00182 #if(CXSC_INDEX_CHECK)
00183 throw(ERROR__OP_WITH_WRONG_DIM<l_rvector>,ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00184 #else
00185 throw()
00186 #endif
00187 { return _vsvassign(*this,l_rvector(m)); }
00188 INLINE l_ivector_slice & l_ivector_slice::operator =(const l_rmatrix_slice &m)
00189 #if(CXSC_INDEX_CHECK)
00190 throw(ERROR__OP_WITH_WRONG_DIM<l_rvector>,ERROR_LRMATRIX_TYPE_CAST_OF_THICK_OBJ)
00191 #else
00192 throw()
00193 #endif
00194 { return _vsvassign(*this,l_ivector(l_rmatrix(m))); }
00195
00196 INLINE l_ivector operator *(const l_rmatrix &m,const l_ivector &v)
00197 #if(CXSC_INDEX_CHECK)
00198 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00199 #else
00200 throw()
00201 #endif
00202 { return _mvlimult<l_rmatrix,l_ivector,l_ivector>(m,v); }
00203 INLINE l_ivector operator *(const l_rmatrix_slice &ms,const l_ivector &v)
00204 #if(CXSC_INDEX_CHECK)
00205 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00206 #else
00207 throw()
00208 #endif
00209 { return _msvlimult<l_rmatrix_slice,l_ivector,l_ivector>(ms,v); }
00210 INLINE l_ivector operator *(const l_ivector &v,const l_rmatrix &m)
00211 #if(CXSC_INDEX_CHECK)
00212 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00213 #else
00214 throw()
00215 #endif
00216 { return _vmlimult<l_ivector,l_rmatrix,l_ivector>(v,m); }
00217 INLINE l_ivector operator *(const l_ivector &v,const l_rmatrix_slice &ms)
00218 #if(CXSC_INDEX_CHECK)
00219 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00220 #else
00221 throw()
00222 #endif
00223 { return _vmslimult<l_ivector,l_rmatrix_slice,l_ivector>(v,ms); }
00224 INLINE l_ivector &operator *=(l_ivector &v,const l_rmatrix &m)
00225 #if(CXSC_INDEX_CHECK)
00226 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00227 #else
00228 throw()
00229 #endif
00230 { return _vmlimultassign<l_ivector,l_rmatrix,l_interval>(v,m); }
00231 INLINE l_ivector &operator *=(l_ivector &v,const l_rmatrix_slice &ms)
00232 #if(CXSC_INDEX_CHECK)
00233 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00234 #else
00235 throw()
00236 #endif
00237 { return _vmslimultassign<l_ivector,l_rmatrix_slice,l_interval>(v,ms); }
00238
00239 INLINE l_ivector operator *(const l_ivector_slice &v,const l_rmatrix &m)
00240 #if(CXSC_INDEX_CHECK)
00241 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00242 #else
00243 throw()
00244 #endif
00245 { return _vmlimult<l_ivector,l_rmatrix,l_ivector>(l_ivector(v),m); }
00246 INLINE l_ivector_slice &l_ivector_slice::operator *=(const l_rmatrix &m)
00247 #if(CXSC_INDEX_CHECK)
00248 throw(ERROR_LRMATRIX_OP_WITH_WRONG_DIM)
00249 #else
00250 throw()
00251 #endif
00252 { return _vsmlimultassign<l_ivector_slice,l_rmatrix,l_interval>(*this,m); }
00253
00254 INLINE l_ivector operator *(const ivector &v,const l_rmatrix &m)
00255 #if(CXSC_INDEX_CHECK)
00256 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00257 #else
00258 throw()
00259 #endif
00260 { return _vmlimult<ivector,l_rmatrix,l_ivector>(v,m); }
00261 INLINE l_ivector operator *(const ivector &v,const l_rmatrix_slice &ms)
00262 #if(CXSC_INDEX_CHECK)
00263 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00264 #else
00265 throw()
00266 #endif
00267 { return _vmslimult<ivector,l_rmatrix_slice,l_ivector>(v,ms); }
00268 INLINE l_ivector operator *(const ivector_slice &v,const l_rmatrix &m)
00269 #if(CXSC_INDEX_CHECK)
00270 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00271 #else
00272 throw()
00273 #endif
00274 { return _vmlimult<l_ivector,l_rmatrix,l_ivector>(l_ivector(v),m); }
00275 INLINE l_ivector operator *(const l_rmatrix &m,const ivector &v)
00276 #if(CXSC_INDEX_CHECK)
00277 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00278 #else
00279 throw()
00280 #endif
00281 { return _mvlimult<l_rmatrix,ivector,l_ivector>(m,v); }
00282 INLINE l_ivector operator *(const l_rmatrix_slice &ms,const ivector &v)
00283 #if(CXSC_INDEX_CHECK)
00284 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00285 #else
00286 throw()
00287 #endif
00288 { return _msvlimult<l_rmatrix_slice,ivector,l_ivector>(ms,v); }
00289
00290 }
00291
00292 #endif
00293