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_LIVECIMAT_INL_INCLUDED
00028 #define _CXSC_LIVECIMAT_INL_INCLUDED
00029
00030 namespace cxsc {
00031
00032 INLINE l_ivector::l_ivector(const imatrix &sl)
00033 #if(CXSC_INDEX_CHECK)
00034 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00035 #else
00036 throw()
00037 #endif
00038 { _vmconstr<l_ivector,imatrix,l_interval>(*this,sl); }
00039 INLINE l_ivector::l_ivector(const imatrix_slice &sl)
00040 #if(CXSC_INDEX_CHECK)
00041 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00042 #else
00043 throw()
00044 #endif
00045 { _vmsconstr<l_ivector,imatrix_slice,l_interval>(*this,sl); }
00046 INLINE l_ivector::l_ivector(const imatrix_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 imatrix &sl)
00058 #if(CXSC_INDEX_CHECK)
00059 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00060 #else
00061 throw()
00062 #endif
00063 { return l_ivector(sl); }
00069 INLINE l_ivector _l_ivector(const imatrix_slice &sl)
00070 #if(CXSC_INDEX_CHECK)
00071 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00072 #else
00073 throw()
00074 #endif
00075 { return l_ivector(sl); }
00076
00077 INLINE void accumulate(idotprecision &dp, const imatrix_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,imatrix_subv>(dp,rv2,rv1); }
00084 INLINE void accumulate(idotprecision &dp, const l_ivector & rv1, const imatrix_subv &rv2)
00085 #if(CXSC_INDEX_CHECK)
00086 throw(OP_WITH_WRONG_DIM)
00087 #else
00088 throw()
00089 #endif
00090 { _vmvaccu<idotprecision,l_ivector,imatrix_subv>(dp,rv1,rv2); }
00091
00092 INLINE void accumulate(idotprecision &dp, const imatrix_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,imatrix_subv>(dp,l_ivector(rv2),rv1); }
00099 INLINE void accumulate(idotprecision &dp, const l_ivector_slice & rv1, const imatrix_subv &rv2)
00100 #if(CXSC_INDEX_CHECK)
00101 throw(OP_WITH_WRONG_DIM)
00102 #else
00103 throw()
00104 #endif
00105 { _vmvaccu<idotprecision,l_ivector,imatrix_subv>(dp,l_ivector(rv1),rv2); }
00106
00107 INLINE l_ivector &l_ivector::operator =(const imatrix_subv &mv) throw() { return _vmvassign<l_ivector,imatrix_subv,l_interval>(*this,mv); }
00108 INLINE l_ivector_slice &l_ivector_slice::operator =(const imatrix_subv &mv) throw() { return _vsvassign(*this,ivector(mv)); }
00109 INLINE l_ivector &l_ivector::operator =(const imatrix &m)
00110 #if(CXSC_INDEX_CHECK)
00111 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00112 #else
00113 throw()
00114 #endif
00115 { return _vmassign<l_ivector,imatrix,l_interval>(*this,m); }
00116 INLINE l_ivector &l_ivector::operator =(const imatrix_slice &m)
00117 #if(CXSC_INDEX_CHECK)
00118 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00119 #else
00120 throw()
00121 #endif
00122 { return _vmassign<l_ivector,imatrix,l_interval>(*this,imatrix(m)); }
00123 INLINE l_ivector_slice &l_ivector_slice::operator =(const imatrix &m)
00124 #if(CXSC_INDEX_CHECK)
00125 throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00126 #else
00127 throw()
00128 #endif
00129 { return _vsvassign(*this,ivector(m)); }
00130 INLINE l_ivector_slice & l_ivector_slice::operator =(const imatrix_slice &m)
00131 #if(CXSC_INDEX_CHECK)
00132 throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00133 #else
00134 throw()
00135 #endif
00136 { return _vsvassign(*this,l_ivector(imatrix(m))); }
00137
00138 INLINE l_ivector operator *(const imatrix &m,const l_ivector &v)
00139 #if(CXSC_INDEX_CHECK)
00140 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00141 #else
00142 throw()
00143 #endif
00144 { return _mvlimult<imatrix,l_ivector,l_ivector>(m,v); }
00145 INLINE l_ivector operator *(const imatrix_slice &ms,const l_ivector &v)
00146 #if(CXSC_INDEX_CHECK)
00147 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00148 #else
00149 throw()
00150 #endif
00151 { return _msvlimult<imatrix_slice,l_ivector,l_ivector>(ms,v); }
00152 INLINE l_ivector operator *(const l_ivector &v,const imatrix &m)
00153 #if(CXSC_INDEX_CHECK)
00154 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00155 #else
00156 throw()
00157 #endif
00158 { return _vmlimult<l_ivector,imatrix,l_ivector>(v,m); }
00159 INLINE l_ivector operator *(const l_ivector &v,const imatrix_slice &ms)
00160 #if(CXSC_INDEX_CHECK)
00161 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00162 #else
00163 throw()
00164 #endif
00165 { return _vmslimult<l_ivector,imatrix_slice,l_ivector>(v,ms); }
00166 INLINE l_ivector &operator *=(l_ivector &v,const imatrix &m)
00167 #if(CXSC_INDEX_CHECK)
00168 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00169 #else
00170 throw()
00171 #endif
00172 { return _vmlimultassign<l_ivector,imatrix,l_interval>(v,m); }
00173 INLINE l_ivector &operator *=(l_ivector &v,const imatrix_slice &ms)
00174 #if(CXSC_INDEX_CHECK)
00175 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00176 #else
00177 throw()
00178 #endif
00179 { return _vmslimultassign<l_ivector,imatrix_slice,l_interval>(v,ms); }
00180
00181 INLINE l_ivector operator *(const l_ivector_slice &v,const imatrix &m)
00182 #if(CXSC_INDEX_CHECK)
00183 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00184 #else
00185 throw()
00186 #endif
00187 { return _vmlimult<l_ivector,imatrix,l_ivector>(l_ivector(v),m); }
00188 INLINE l_ivector_slice &l_ivector_slice::operator *=(const imatrix &m)
00189 #if(CXSC_INDEX_CHECK)
00190 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00191 #else
00192 throw()
00193 #endif
00194 { return _vsmlimultassign<l_ivector_slice,imatrix,l_interval>(*this,m); }
00195
00196 INLINE l_ivector operator *(const l_rvector &v,const imatrix &m)
00197 #if(CXSC_INDEX_CHECK)
00198 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00199 #else
00200 throw()
00201 #endif
00202 { return _vmlimult<l_rvector,imatrix,l_ivector>(v,m); }
00203 INLINE l_ivector operator *(const l_rvector &v,const imatrix_slice &ms)
00204 #if(CXSC_INDEX_CHECK)
00205 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00206 #else
00207 throw()
00208 #endif
00209 { return _vmslimult<l_rvector,imatrix_slice,l_ivector>(v,ms); }
00210 INLINE l_ivector operator *(const l_rvector_slice &v,const imatrix &m)
00211 #if(CXSC_INDEX_CHECK)
00212 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00213 #else
00214 throw()
00215 #endif
00216 { return _vmlimult<l_ivector,imatrix,l_ivector>(l_ivector(v),m); }
00217 INLINE l_ivector operator *(const imatrix &m,const l_rvector &v)
00218 #if(CXSC_INDEX_CHECK)
00219 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00220 #else
00221 throw()
00222 #endif
00223 { return _mvlimult<imatrix,l_rvector,l_ivector>(m,v); }
00224 INLINE l_ivector operator *(const imatrix_slice &ms,const l_rvector &v)
00225 #if(CXSC_INDEX_CHECK)
00226 throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
00227 #else
00228 throw()
00229 #endif
00230 { return _msvlimult<imatrix_slice,l_rvector,l_ivector>(ms,v); }
00231
00232 }
00233
00234 #endif
00235