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_CIVECRMAT_INL_INCLUDED
00028 #define _CXSC_CIVECRMAT_INL_INCLUDED
00029
00030 namespace cxsc {
00031
00032 INLINE civector::civector(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<civector,rmatrix,cinterval>(*this,sl); }
00039 INLINE civector::civector(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<civector,rmatrix_slice,cinterval>(*this,sl); }
00046 INLINE civector::civector(const rmatrix_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 rmatrix &sl)
00053 #if(CXSC_INDEX_CHECK)
00054 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00055 #else
00056 throw()
00057 #endif
00058 { return civector(sl); }
00059 INLINE civector _civector(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 civector(sl); }
00066
00067 INLINE civector &civector::operator =(const rmatrix_subv &mv) throw() { return _vmvassign<civector,rmatrix_subv,cinterval>(*this,mv); }
00068 INLINE civector_slice &civector_slice::operator =(const rmatrix_subv &mv) throw() { return _vsvassign(*this,rvector(mv)); }
00069 INLINE civector &civector::operator =(const rmatrix &m)
00070 #if(CXSC_INDEX_CHECK)
00071 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00072 #else
00073 throw()
00074 #endif
00075 { return _vmassign<civector,rmatrix,cinterval>(*this,m); }
00076 INLINE civector &civector::operator =(const rmatrix_slice &m)
00077 #if(CXSC_INDEX_CHECK)
00078 throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00079 #else
00080 throw()
00081 #endif
00082 { return _vmassign<civector,rmatrix,cinterval>(*this,rmatrix(m)); }
00083 INLINE civector_slice &civector_slice::operator =(const rmatrix &m)
00084 #if(CXSC_INDEX_CHECK)
00085 throw(ERROR__OP_WITH_WRONG_DIM<rvector>,ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00086 #else
00087 throw()
00088 #endif
00089 { return _vsvassign(*this,rvector(m)); }
00090 INLINE civector_slice & civector_slice::operator =(const rmatrix_slice &m)
00091 #if(CXSC_INDEX_CHECK)
00092 throw(ERROR__OP_WITH_WRONG_DIM<rvector>,ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
00093 #else
00094 throw()
00095 #endif
00096 { return _vsvassign(*this,civector(rmatrix(m))); }
00097
00098 INLINE civector operator *(const rmatrix &m,const civector &v)
00099 #if(CXSC_INDEX_CHECK)
00100 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00101 #else
00102 throw()
00103 #endif
00104 { return _mvcimult<rmatrix,civector,civector>(m,v); }
00105 INLINE civector operator *(const rmatrix_slice &ms,const civector &v)
00106 #if(CXSC_INDEX_CHECK)
00107 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00108 #else
00109 throw()
00110 #endif
00111 { return _msvcimult<rmatrix_slice,civector,civector>(ms,v); }
00112 INLINE civector operator *(const civector &v,const rmatrix &m)
00113 #if(CXSC_INDEX_CHECK)
00114 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00115 #else
00116 throw()
00117 #endif
00118 { return _vmcimult<civector,rmatrix,civector>(v,m); }
00119 INLINE civector operator *(const civector &v,const rmatrix_slice &ms)
00120 #if(CXSC_INDEX_CHECK)
00121 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00122 #else
00123 throw()
00124 #endif
00125 { return _vmscimult<civector,rmatrix_slice,civector>(v,ms); }
00126 INLINE civector &operator *=(civector &v,const rmatrix &m)
00127 #if(CXSC_INDEX_CHECK)
00128 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00129 #else
00130 throw()
00131 #endif
00132 { return _vmcimultassign<civector,rmatrix,cinterval>(v,m); }
00133 INLINE civector &operator *=(civector &v,const rmatrix_slice &ms)
00134 #if(CXSC_INDEX_CHECK)
00135 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00136 #else
00137 throw()
00138 #endif
00139 { return _vmscimultassign<civector,rmatrix_slice,cinterval>(v,ms); }
00140
00141 INLINE civector operator *(const civector_slice &v,const rmatrix &m)
00142 #if(CXSC_INDEX_CHECK)
00143 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00144 #else
00145 throw()
00146 #endif
00147 { return _vmcimult<civector,rmatrix,civector>(civector(v),m); }
00148 INLINE civector_slice &civector_slice::operator *=(const rmatrix &m)
00149 #if(CXSC_INDEX_CHECK)
00150 throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
00151 #else
00152 throw()
00153 #endif
00154 { return _vsmcimultassign<civector_slice,rmatrix,cinterval>(*this,m); }
00155
00156 }
00157
00158 #endif
00159