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_CVECRMAT_INL_INCLUDED
00028 #define _CXSC_CVECRMAT_INL_INCLUDED
00029
00030 namespace cxsc {
00031
00032 INLINE cvector::cvector(const rmatrix &sl)
00033 #if(CXSC_INDEX_CHECK)
00034 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00035 #else
00036 throw()
00037 #endif
00038 { _vmconstr<cvector,rmatrix,complex>(*this,sl); }
00039 INLINE cvector::cvector(const rmatrix_slice &sl)
00040 #if(CXSC_INDEX_CHECK)
00041 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00042 #else
00043 throw()
00044 #endif
00045 { _vmsconstr<cvector,rmatrix_slice,complex>(*this,sl); }
00046 INLINE cvector::cvector(const rmatrix_subv &v) throw():l(v.lb),u(v.ub),size(v.size)
00047 {
00048 dat=new complex[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 cvector _cvector(const rmatrix &sl)
00053 #if(CXSC_INDEX_CHECK)
00054 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00055 #else
00056 throw()
00057 #endif
00058 { return cvector(sl); }
00059 INLINE cvector _cvector(const rmatrix_slice &sl)
00060 #if(CXSC_INDEX_CHECK)
00061 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00062 #else
00063 throw()
00064 #endif
00065 { return cvector(sl); }
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 INLINE cvector &cvector::operator =(const rmatrix_subv &mv) throw() { return _vmvassign<cvector,rmatrix_subv,complex>(*this,mv); }
00126 INLINE cvector_slice &cvector_slice::operator =(const rmatrix_subv &mv) throw() { return _vsvassign(*this,rvector(mv)); }
00127 INLINE cvector &cvector::operator =(const rmatrix &m)
00128 #if(CXSC_INDEX_CHECK)
00129 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00130 #else
00131 throw()
00132 #endif
00133 { return _vmassign<cvector,rmatrix,complex>(*this,m); }
00134 INLINE cvector &cvector::operator =(const rmatrix_slice &m)
00135 #if(CXSC_INDEX_CHECK)
00136 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00137 #else
00138 throw()
00139 #endif
00140 { return _vmassign<cvector,rmatrix,complex>(*this,rmatrix(m)); }
00141 INLINE cvector_slice &cvector_slice::operator =(const rmatrix &m)
00142 #if(CXSC_INDEX_CHECK)
00143 throw(ERROR__OP_WITH_WRONG_DIM<rvector>,ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00144 #else
00145 throw()
00146 #endif
00147 { return _vsvassign(*this,rvector(m)); }
00148 INLINE cvector_slice & cvector_slice::operator =(const rmatrix_slice &m)
00149 #if(CXSC_INDEX_CHECK)
00150 throw(ERROR__OP_WITH_WRONG_DIM<rvector>,ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00151 #else
00152 throw()
00153 #endif
00154 { return _vsvassign(*this,cvector(rmatrix(m))); }
00155
00156 INLINE cvector operator *(const rmatrix &m,const cvector &v)
00157 #if(CXSC_INDEX_CHECK)
00158 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00159 #else
00160 throw()
00161 #endif
00162 { return _mvcmult<rmatrix,cvector,cvector>(m,v); }
00163 INLINE cvector operator *(const rmatrix_slice &ms,const cvector &v)
00164 #if(CXSC_INDEX_CHECK)
00165 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00166 #else
00167 throw()
00168 #endif
00169 { return _msvcmult<rmatrix_slice,cvector,cvector>(ms,v); }
00170 INLINE cvector operator *(const cvector &v,const rmatrix &m)
00171 #if(CXSC_INDEX_CHECK)
00172 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00173 #else
00174 throw()
00175 #endif
00176 { return _vmcmult<cvector,rmatrix,cvector>(v,m); }
00177 INLINE cvector operator *(const cvector &v,const rmatrix_slice &ms)
00178 #if(CXSC_INDEX_CHECK)
00179 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00180 #else
00181 throw()
00182 #endif
00183 { return _vmscmult<cvector,rmatrix_slice,cvector>(v,ms); }
00184 INLINE cvector &operator *=(cvector &v,const rmatrix &m)
00185 #if(CXSC_INDEX_CHECK)
00186 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00187 #else
00188 throw()
00189 #endif
00190 { return _vmcmultassign<cvector,rmatrix,complex>(v,m); }
00191 INLINE cvector &operator *=(cvector &v,const rmatrix_slice &ms)
00192 #if(CXSC_INDEX_CHECK)
00193 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00194 #else
00195 throw()
00196 #endif
00197 { return _vmscmultassign<cvector,rmatrix_slice,complex>(v,ms); }
00198
00199 INLINE cvector operator *(const cvector_slice &v,const rmatrix &m)
00200 #if(CXSC_INDEX_CHECK)
00201 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00202 #else
00203 throw()
00204 #endif
00205 { return _vmcmult<cvector,rmatrix,cvector>(cvector(v),m); }
00206 INLINE cvector_slice &cvector_slice::operator *=(const rmatrix &m)
00207 #if(CXSC_INDEX_CHECK)
00208 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00209 #else
00210 throw()
00211 #endif
00212 { return _vsmcmultassign<cvector_slice,rmatrix,complex>(*this,m); }
00213
00214 }
00215
00216 #endif
00217