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_CIVECIMAT_INL_INCLUDED
00028 #define _CXSC_CIVECIMAT_INL_INCLUDED
00029
00030 namespace cxsc {
00031
00032 INLINE civector::civector(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<civector,imatrix,cinterval>(*this,sl); }
00039 INLINE civector::civector(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<civector,imatrix_slice,cinterval>(*this,sl); }
00046 INLINE civector::civector(const imatrix_subv &v) throw():l(v.lb),u(v.ub),size(v.size)
00047 {
00048 dat=new cinterval[size];
00049 for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
00050 dat[i]=v.dat[j];
00051 }
00052 INLINE civector _civector(const imatrix &sl)
00053 #if(CXSC_INDEX_CHECK)
00054 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00055 #else
00056 throw()
00057 #endif
00058 { return civector(sl); }
00059 INLINE civector _civector(const imatrix_slice &sl)
00060 #if(CXSC_INDEX_CHECK)
00061 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00062 #else
00063 throw()
00064 #endif
00065 { return civector(sl); }
00066
00067
00068 INLINE void SetIm(civector &iv,const imatrix_subv &rv)
00069 #if(CXSC_INDEX_CHECK)
00070 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00071 #else
00072 throw()
00073 #endif
00074 { _vmvsetim(iv,rv); }
00075 INLINE void SetRe(civector &iv,const imatrix_subv &rv)
00076 #if(CXSC_INDEX_CHECK)
00077 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00078 #else
00079 throw()
00080 #endif
00081 { _vmvsetre(iv,rv); }
00082 INLINE void SetIm(civector_slice &iv,const imatrix_subv &rv)
00083 #if(CXSC_INDEX_CHECK)
00084 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00085 #else
00086 throw()
00087 #endif
00088 { _vsvsetim(iv,ivector(rv)); }
00089 INLINE void SetRe(civector_slice &iv,const imatrix_subv &rv)
00090 #if(CXSC_INDEX_CHECK)
00091 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00092 #else
00093 throw()
00094 #endif
00095 { _vsvsetre(iv,ivector(rv)); }
00096
00097 INLINE civector &civector::operator =(const imatrix_subv &mv) throw() { return _vmvassign<civector,imatrix_subv,cinterval>(*this,mv); }
00098 INLINE civector_slice &civector_slice::operator =(const imatrix_subv &mv) throw() { return _vsvassign(*this,ivector(mv)); }
00099 INLINE civector &civector::operator =(const imatrix &m)
00100 #if(CXSC_INDEX_CHECK)
00101 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00102 #else
00103 throw()
00104 #endif
00105 { return _vmassign<civector,imatrix,cinterval>(*this,m); }
00106 INLINE civector &civector::operator =(const imatrix_slice &m)
00107 #if(CXSC_INDEX_CHECK)
00108 throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00109 #else
00110 throw()
00111 #endif
00112 { return _vmassign<civector,imatrix,cinterval>(*this,imatrix(m)); }
00113 INLINE civector_slice &civector_slice::operator =(const imatrix &m)
00114 #if(CXSC_INDEX_CHECK)
00115 throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00116 #else
00117 throw()
00118 #endif
00119 { return _vsvassign(*this,ivector(m)); }
00120 INLINE civector_slice & civector_slice::operator =(const imatrix_slice &m)
00121 #if(CXSC_INDEX_CHECK)
00122 throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
00123 #else
00124 throw()
00125 #endif
00126 { return _vsvassign(*this,civector(imatrix(m))); }
00127
00128 INLINE civector operator *(const imatrix &m,const civector &v)
00129 #if(CXSC_INDEX_CHECK)
00130 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00131 #else
00132 throw()
00133 #endif
00134 { return _mvcimult<imatrix,civector,civector>(m,v); }
00135 INLINE civector operator *(const imatrix_slice &ms,const civector &v)
00136 #if(CXSC_INDEX_CHECK)
00137 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00138 #else
00139 throw()
00140 #endif
00141 { return _msvcimult<imatrix_slice,civector,civector>(ms,v); }
00142 INLINE civector operator *(const civector &v,const imatrix &m)
00143 #if(CXSC_INDEX_CHECK)
00144 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00145 #else
00146 throw()
00147 #endif
00148 { return _vmcimult<civector,imatrix,civector>(v,m); }
00149 INLINE civector operator *(const civector &v,const imatrix_slice &ms)
00150 #if(CXSC_INDEX_CHECK)
00151 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00152 #else
00153 throw()
00154 #endif
00155 { return _vmscimult<civector,imatrix_slice,civector>(v,ms); }
00156 INLINE civector &operator *=(civector &v,const imatrix &m)
00157 #if(CXSC_INDEX_CHECK)
00158 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00159 #else
00160 throw()
00161 #endif
00162 { return _vmcimultassign<civector,imatrix,cinterval>(v,m); }
00163 INLINE civector &operator *=(civector &v,const imatrix_slice &ms)
00164 #if(CXSC_INDEX_CHECK)
00165 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00166 #else
00167 throw()
00168 #endif
00169 { return _vmscimultassign<civector,imatrix_slice,cinterval>(v,ms); }
00170
00171 INLINE civector operator *(const civector_slice &v,const imatrix &m)
00172 #if(CXSC_INDEX_CHECK)
00173 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00174 #else
00175 throw()
00176 #endif
00177 { return _vmcimult<civector,imatrix,civector>(civector(v),m); }
00178 INLINE civector_slice &civector_slice::operator *=(const imatrix &m)
00179 #if(CXSC_INDEX_CHECK)
00180 throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
00181 #else
00182 throw()
00183 #endif
00184 { return _vsmcimultassign<civector_slice,imatrix,cinterval>(*this,m); }
00185
00186 INLINE civector operator *(const cvector &v,const imatrix &m)
00187 #if(CXSC_INDEX_CHECK)
00188 throw(ERROR_CIMATRIX_OP_WITH_WRONG_DIM)
00189 #else
00190 throw()
00191 #endif
00192 { return _vmcimult<cvector,imatrix,civector>(v,m); }
00193 INLINE civector operator *(const cvector &v,const imatrix_slice &ms)
00194 #if(CXSC_INDEX_CHECK)
00195 throw(ERROR_CIMATRIX_OP_WITH_WRONG_DIM)
00196 #else
00197 throw()
00198 #endif
00199 { return _vmscimult<cvector,imatrix_slice,civector>(v,ms); }
00200 INLINE civector operator *(const cvector_slice &v,const imatrix &m)
00201 #if(CXSC_INDEX_CHECK)
00202 throw(ERROR_CIMATRIX_OP_WITH_WRONG_DIM)
00203 #else
00204 throw()
00205 #endif
00206 { return _vmcimult<civector,imatrix,civector>(civector(v),m); }
00207 INLINE civector operator *(const imatrix &m,const cvector &v)
00208 #if(CXSC_INDEX_CHECK)
00209 throw(ERROR_CIMATRIX_OP_WITH_WRONG_DIM)
00210 #else
00211 throw()
00212 #endif
00213 { return _mvcimult<imatrix,cvector,civector>(m,v); }
00214 INLINE civector operator *(const imatrix_slice &ms,const cvector &v)
00215 #if(CXSC_INDEX_CHECK)
00216 throw(ERROR_CIMATRIX_OP_WITH_WRONG_DIM)
00217 #else
00218 throw()
00219 #endif
00220 { return _msvcimult<imatrix_slice,cvector,civector>(ms,v); }
00221
00222 }
00223
00224 #endif
00225