C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
civecimat.inl
1 /*
2 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
3 **
4 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
5 ** Universitaet Karlsruhe, Germany
6 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
7 ** Universitaet Wuppertal, Germany
8 **
9 ** This library is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU Library General Public
11 ** License as published by the Free Software Foundation; either
12 ** version 2 of the License, or (at your option) any later version.
13 **
14 ** This library is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** Library General Public License for more details.
18 **
19 ** You should have received a copy of the GNU Library General Public
20 ** License along with this library; if not, write to the Free
21 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 
24 /* CVS $Id: civecimat.inl,v 1.24 2014/01/30 17:23:44 cxsc Exp $ */
25 
26 // Here are definitions for civector x imatrix-Functions
27 #ifndef _CXSC_CIVECIMAT_INL_INCLUDED
28 #define _CXSC_CIVECIMAT_INL_INCLUDED
29 
30 namespace cxsc {
31 
32  INLINE civector::civector(const imatrix &sl)
33 #if(CXSC_INDEX_CHECK)
34 
35 #else
36  noexcept
37 #endif
38  { _vmconstr<civector,imatrix,cinterval>(*this,sl); }
40 #if(CXSC_INDEX_CHECK)
41 
42 #else
43  noexcept
44 #endif
45  { _vmsconstr<civector,imatrix_slice,cinterval>(*this,sl); }
46  INLINE civector::civector(const imatrix_subv &v) noexcept:l(v.lb),u(v.ub),size(v.size)
47  {
48  dat=new cinterval[size];
49  for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
50  dat[i]=v.dat[j];
51  }
52  INLINE civector _civector(const imatrix &sl)
53 #if(CXSC_INDEX_CHECK)
54 
55 #else
56  noexcept
57 #endif
58  { return civector(sl); }
59  INLINE civector _civector(const imatrix_slice &sl)
60 #if(CXSC_INDEX_CHECK)
61 
62 #else
63  noexcept
64 #endif
65  { return civector(sl); }
66 
67 
68  INLINE void SetIm(civector &iv,const imatrix_subv &rv)
69 #if(CXSC_INDEX_CHECK)
70 
71 #else
72  noexcept
73 #endif
74  { _vmvsetim(iv,rv); }
75  INLINE void SetRe(civector &iv,const imatrix_subv &rv)
76 #if(CXSC_INDEX_CHECK)
77 
78 #else
79  noexcept
80 #endif
81  { _vmvsetre(iv,rv); }
82  INLINE void SetIm(civector_slice &iv,const imatrix_subv &rv)
83 #if(CXSC_INDEX_CHECK)
84 
85 #else
86  noexcept
87 #endif
88  { _vsvsetim(iv,ivector(rv)); }
89  INLINE void SetRe(civector_slice &iv,const imatrix_subv &rv)
90 #if(CXSC_INDEX_CHECK)
91 
92 #else
93  noexcept
94 #endif
95  { _vsvsetre(iv,ivector(rv)); }
96 
97  INLINE civector &civector::operator =(const imatrix_subv &mv) noexcept { return _vmvassign<civector,imatrix_subv,cinterval>(*this,mv); }
98  INLINE civector_slice &civector_slice::operator =(const imatrix_subv &mv) noexcept { return _vsvassign(*this,ivector(mv)); }
100 #if(CXSC_INDEX_CHECK)
101 
102 #else
103  noexcept
104 #endif
105  { return _vmassign<civector,imatrix,cinterval>(*this,m); }
107 #if(CXSC_INDEX_CHECK)
108 
109 #else
110  noexcept
111 #endif
112  { return _vmassign<civector,imatrix,cinterval>(*this,imatrix(m)); }
114 #if(CXSC_INDEX_CHECK)
115 
116 #else
117  noexcept
118 #endif
119  { return _vsvassign(*this,ivector(m)); }
121 #if(CXSC_INDEX_CHECK)
122 
123 #else
124  noexcept
125 #endif
126  { return _vsvassign(*this,civector(imatrix(m))); }
127 
128  INLINE civector operator *(const imatrix &m,const civector &v)
129 #if(CXSC_INDEX_CHECK)
130 
131 #else
132  noexcept
133 #endif
134  { return _mvcimult<imatrix,civector,civector>(m,v); }
135  INLINE civector operator *(const imatrix_slice &ms,const civector &v)
136 #if(CXSC_INDEX_CHECK)
137 
138 #else
139  noexcept
140 #endif
141  { return _msvcimult<imatrix_slice,civector,civector>(ms,v); }
142  INLINE civector operator *(const civector &v,const imatrix &m)
143 #if(CXSC_INDEX_CHECK)
144 
145 #else
146  noexcept
147 #endif
148  { return _vmcimult<civector,imatrix,civector>(v,m); }
149  INLINE civector operator *(const civector &v,const imatrix_slice &ms)
150 #if(CXSC_INDEX_CHECK)
151 
152 #else
153  noexcept
154 #endif
155  { return _vmscimult<civector,imatrix_slice,civector>(v,ms); }
156  INLINE civector &operator *=(civector &v,const imatrix &m)
157 #if(CXSC_INDEX_CHECK)
158 
159 #else
160  noexcept
161 #endif
162  { return _vmcimultassign<civector,imatrix,cinterval>(v,m); }
163  INLINE civector &operator *=(civector &v,const imatrix_slice &ms)
164 #if(CXSC_INDEX_CHECK)
165 
166 #else
167  noexcept
168 #endif
169  { return _vmscimultassign<civector,imatrix_slice,cinterval>(v,ms); }
170 
171  INLINE civector operator *(const civector_slice &v,const imatrix &m)
172 #if(CXSC_INDEX_CHECK)
173 
174 #else
175  noexcept
176 #endif
177  { return _vmcimult<civector,imatrix,civector>(civector(v),m); }
179 #if(CXSC_INDEX_CHECK)
180 
181 #else
182  noexcept
183 #endif
184  { return _vsmcimultassign<civector_slice,imatrix,cinterval>(*this,m); }
185 
186  INLINE civector operator *(const cvector &v,const imatrix &m)
187 #if(CXSC_INDEX_CHECK)
188 
189 #else
190  noexcept
191 #endif
192  { return _vmcimult<cvector,imatrix,civector>(v,m); }
193  INLINE civector operator *(const cvector &v,const imatrix_slice &ms)
194 #if(CXSC_INDEX_CHECK)
195 
196 #else
197  noexcept
198 #endif
199  { return _vmscimult<cvector,imatrix_slice,civector>(v,ms); }
200  INLINE civector operator *(const cvector_slice &v,const imatrix &m)
201 #if(CXSC_INDEX_CHECK)
202 
203 #else
204  noexcept
205 #endif
206  { return _vmcimult<civector,imatrix,civector>(civector(v),m); }
207  INLINE civector operator *(const imatrix &m,const cvector &v)
208 #if(CXSC_INDEX_CHECK)
209 
210 #else
211  noexcept
212 #endif
213  { return _mvcimult<imatrix,cvector,civector>(m,v); }
214  INLINE civector operator *(const imatrix_slice &ms,const cvector &v)
215 #if(CXSC_INDEX_CHECK)
216 
217 #else
218  noexcept
219 #endif
220  { return _msvcimult<imatrix_slice,cvector,civector>(ms,v); }
221 
222 } // namespace cxsc
223 
224 #endif
225 
The Scalar Type cinterval.
Definition: cinterval.hpp:55
The Data Type civector_slice.
Definition: civector.hpp:1015
civector_slice & operator*=(const cinterval &r) noexcept
Implementation of multiplication and allocation operation.
Definition: civector.inl:720
civector_slice & operator=(const scivector_slice &sl)
Implementation of standard assigning operator.
Definition: scivector.hpp:4688
The Data Type civector.
Definition: civector.hpp:57
civector & operator=(const civector &rv) noexcept
Implementation of standard assigning operator.
Definition: civector.inl:339
civector() noexcept
Constructor of class civector.
Definition: civector.inl:31
The Data Type cvector.
Definition: cvector.hpp:58
The Data Type imatrix_slice.
Definition: imatrix.hpp:1442
The Data Type imatrix_subv.
Definition: imatrix.hpp:56
The Data Type imatrix.
Definition: imatrix.hpp:660
The Data Type ivector.
Definition: ivector.hpp:55
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition: cimatrix.inl:731