C-XSC - A C++ Class Library for Extended Scientific Computing 2.5.4
civeccmat.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: civeccmat.inl,v 1.24 2014/01/30 17:23:44 cxsc Exp $ */
25
26// Here are definitions for civector x cmatrix-Functions
27#ifndef _CXSC_CIVECCMAT_INL_INCLUDED
28#define _CXSC_CIVECCMAT_INL_INCLUDED
29
30namespace cxsc {
31
32 INLINE civector::civector(const cmatrix &sl)
33#if(CXSC_INDEX_CHECK)
34
35#else
36 noexcept
37#endif
38 { _vmconstr<civector,cmatrix,cinterval>(*this,sl); }
40#if(CXSC_INDEX_CHECK)
41
42#else
43 noexcept
44#endif
45 { _vmsconstr<civector,cmatrix_slice,cinterval>(*this,sl); }
46 INLINE civector::civector(const cmatrix_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 cmatrix &sl)
53#if(CXSC_INDEX_CHECK)
54
55#else
56 noexcept
57#endif
58 { return civector(sl); }
59 INLINE civector _civector(const cmatrix_slice &sl)
60#if(CXSC_INDEX_CHECK)
61
62#else
63 noexcept
64#endif
65 { return civector(sl); }
66
67 INLINE void SetInf(civector &iv,const cmatrix_subv &rv)
68#if(CXSC_INDEX_CHECK)
69
70#else
71 noexcept
72#endif
73 { _vmvsetinf(iv,rv); }
74 INLINE void SetSup(civector &iv,const cmatrix_subv &rv)
75#if(CXSC_INDEX_CHECK)
76
77#else
78 noexcept
79#endif
80 { _vmvsetsup(iv,rv); }
81 INLINE void SetInf(civector_slice &iv,const cmatrix_subv &rv)
82#if(CXSC_INDEX_CHECK)
83
84#else
85 noexcept
86#endif
87 { _vsvsetinf(iv,cvector(rv)); }
88 INLINE void SetSup(civector_slice &iv,const cmatrix_subv &rv)
89#if(CXSC_INDEX_CHECK)
90
91#else
92 noexcept
93#endif
94 { _vsvsetsup(iv,cvector(rv)); }
95
96 INLINE void UncheckedSetInf(civector &iv,const cmatrix_subv &rv)
97#if(CXSC_INDEX_CHECK)
98
99#else
100 noexcept
101#endif
102 { _vmvusetinf(iv,rv); }
103 INLINE void UncheckedSetSup(civector &iv,const cmatrix_subv &rv)
104#if(CXSC_INDEX_CHECK)
105
106#else
107 noexcept
108#endif
109 { _vmvusetsup(iv,rv); }
110 INLINE void UncheckedSetInf(civector_slice &iv,const cmatrix_subv &rv)
111#if(CXSC_INDEX_CHECK)
112
113#else
114 noexcept
115#endif
116 { _vsvusetinf(iv,cvector(rv)); }
117 INLINE void UncheckedSetSup(civector_slice &iv,const cmatrix_subv &rv)
118#if(CXSC_INDEX_CHECK)
119
120#else
121 noexcept
122#endif
123 { _vsvusetsup(iv,cvector(rv)); }
124
125 INLINE civector &civector::operator =(const cmatrix_subv &mv) noexcept { return _vmvassign<civector,cmatrix_subv,cinterval>(*this,mv); }
126 INLINE civector_slice &civector_slice::operator =(const cmatrix_subv &mv) noexcept { return _vsvassign(*this,cvector(mv)); }
128#if(CXSC_INDEX_CHECK)
129
130#else
131 noexcept
132#endif
133 { return _vmassign<civector,cmatrix,cinterval>(*this,m); }
135#if(CXSC_INDEX_CHECK)
136
137#else
138 noexcept
139#endif
140 { return _vmassign<civector,cmatrix,cinterval>(*this,cmatrix(m)); }
142#if(CXSC_INDEX_CHECK)
143
144#else
145 noexcept
146#endif
147 { return _vsvassign(*this,cvector(m)); }
149#if(CXSC_INDEX_CHECK)
150
151#else
152 noexcept
153#endif
154 { return _vsvassign(*this,civector(cmatrix(m))); }
155
156 INLINE civector operator *(const cmatrix &m,const civector &v)
157#if(CXSC_INDEX_CHECK)
158
159#else
160 noexcept
161#endif
162 { return _mvcimult<cmatrix,civector,civector>(m,v); }
163 INLINE civector operator *(const cmatrix_slice &ms,const civector &v)
164#if(CXSC_INDEX_CHECK)
165
166#else
167 noexcept
168#endif
169 { return _msvcimult<cmatrix_slice,civector,civector>(ms,v); }
170 INLINE civector operator *(const civector &v,const cmatrix &m)
171#if(CXSC_INDEX_CHECK)
172
173#else
174 noexcept
175#endif
176 { return _vmcimult<civector,cmatrix,civector>(v,m); }
177 INLINE civector operator *(const civector &v,const cmatrix_slice &ms)
178#if(CXSC_INDEX_CHECK)
179
180#else
181 noexcept
182#endif
183 { return _vmscimult<civector,cmatrix_slice,civector>(v,ms); }
184 INLINE civector &operator *=(civector &v,const cmatrix &m)
185#if(CXSC_INDEX_CHECK)
186
187#else
188 noexcept
189#endif
190 { return _vmcimultassign<civector,cmatrix,cinterval>(v,m); }
191 INLINE civector &operator *=(civector &v,const cmatrix_slice &ms)
192#if(CXSC_INDEX_CHECK)
193
194#else
195 noexcept
196#endif
197 { return _vmscimultassign<civector,cmatrix_slice,cinterval>(v,ms); }
198
199 INLINE civector operator *(const civector_slice &v,const cmatrix &m)
200#if(CXSC_INDEX_CHECK)
201
202#else
203 noexcept
204#endif
205 { return _vmcimult<civector,cmatrix,civector>(civector(v),m); }
207#if(CXSC_INDEX_CHECK)
208
209#else
210 noexcept
211#endif
212 { return _vsmcimultassign<civector_slice,cmatrix,cinterval>(*this,m); }
213
214 INLINE civector operator *(const ivector &v,const cmatrix &m)
215#if(CXSC_INDEX_CHECK)
216
217#else
218 noexcept
219#endif
220 { return _vmcimult<ivector,cmatrix,civector>(v,m); }
221 INLINE civector operator *(const ivector &v,const cmatrix_slice &ms)
222#if(CXSC_INDEX_CHECK)
223
224#else
225 noexcept
226#endif
227 { return _vmscimult<ivector,cmatrix_slice,civector>(v,ms); }
228 INLINE civector operator *(const ivector_slice &v,const cmatrix &m)
229#if(CXSC_INDEX_CHECK)
230
231#else
232 noexcept
233#endif
234 { return _vmcimult<civector,cmatrix,civector>(civector(v),m); }
235 INLINE civector operator *(const cmatrix &m,const ivector &v)
236#if(CXSC_INDEX_CHECK)
237
238#else
239 noexcept
240#endif
241 { return _mvcimult<cmatrix,ivector,civector>(m,v); }
242 INLINE civector operator *(const cmatrix_slice &ms,const ivector &v)
243#if(CXSC_INDEX_CHECK)
244
245#else
246 noexcept
247#endif
248 { return _msvcimult<cmatrix_slice,ivector,civector>(ms,v); }
249
250} // namespace cxsc
251
252#endif
253
The Scalar Type cinterval.
Definition cinterval.hpp:55
The Data Type civector_slice.
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.
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 cmatrix_slice.
Definition cmatrix.hpp:1203
The Data Type cmatrix_subv.
Definition cmatrix.hpp:54
The Data Type cmatrix.
Definition cmatrix.hpp:514
The Data Type cvector.
Definition cvector.hpp:58
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.
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition cimatrix.inl:731