C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
liveclrmat.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: liveclrmat.inl,v 1.25 2014/01/30 17:23:47 cxsc Exp $ */
25 
26 // Here are definitions for l_ivector x l_rmatrix-Functions
27 #ifndef _CXSC_LIVECLRMAT_INL_INCLUDED
28 #define _CXSC_LIVECLRMAT_INL_INCLUDED
29 
30 namespace cxsc {
31 
32  INLINE l_ivector::l_ivector(const l_rmatrix &sl)
33 #if(CXSC_INDEX_CHECK)
34 
35 #else
36  noexcept
37 #endif
38  { _vmconstr<l_ivector,l_rmatrix,l_interval>(*this,sl); }
40 #if(CXSC_INDEX_CHECK)
41 
42 #else
43  noexcept
44 #endif
45  { _vmsconstr<l_ivector,l_rmatrix_slice,l_interval>(*this,sl); }
46  INLINE l_ivector::l_ivector(const l_rmatrix_subv &v) noexcept:l(v.lb),u(v.ub),size(v.size)
47  {
48  dat=new l_interval[size];
49  for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
50  dat[i]=v.dat[j];
51  }
57  INLINE l_ivector _l_ivector(const l_rmatrix &sl)
58 #if(CXSC_INDEX_CHECK)
59 
60 #else
61  noexcept
62 #endif
63  { return l_ivector(sl); }
70 #if(CXSC_INDEX_CHECK)
71 
72 #else
73  noexcept
74 #endif
75  { return l_ivector(sl); }
76 
77  INLINE void accumulate(idotprecision &dp, const l_rmatrix_subv & rv1, const l_ivector &rv2)
78 #if(CXSC_INDEX_CHECK)
79 
80 #else
81  noexcept
82 #endif
83  { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,rv2,rv1); }
84  INLINE void accumulate(idotprecision &dp, const l_ivector & rv1, const l_rmatrix_subv &rv2)
85 #if(CXSC_INDEX_CHECK)
86 
87 #else
88  noexcept
89 #endif
90  { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,rv1,rv2); }
91 
92  INLINE void accumulate(idotprecision &dp, const l_rmatrix_subv & rv1, const l_ivector_slice &rv2)
93 #if(CXSC_INDEX_CHECK)
94 
95 #else
96  noexcept
97 #endif
98  { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,l_ivector(rv2),rv1); }
99  INLINE void accumulate(idotprecision &dp, const l_ivector_slice & rv1, const l_rmatrix_subv &rv2)
100 #if(CXSC_INDEX_CHECK)
101 
102 #else
103  noexcept
104 #endif
105  { _vmvaccu<idotprecision,l_ivector,l_rmatrix_subv>(dp,l_ivector(rv1),rv2); }
106 
107  INLINE void SetInf(l_ivector &iv,const l_rmatrix_subv &rv)
108 #if(CXSC_INDEX_CHECK)
109 
110 #else
111  noexcept
112 #endif
113  { _vmvsetinf(iv,rv); }
114  INLINE void SetSup(l_ivector &iv,const l_rmatrix_subv &rv)
115 #if(CXSC_INDEX_CHECK)
116 
117 #else
118  noexcept
119 #endif
120  { _vmvsetsup(iv,rv); }
121  INLINE void SetInf(l_ivector_slice &iv,const l_rmatrix_subv &rv)
122 #if(CXSC_INDEX_CHECK)
123 
124 #else
125  noexcept
126 #endif
127  { _vsvsetinf(iv,l_rvector(rv)); }
128  INLINE void SetSup(l_ivector_slice &iv,const l_rmatrix_subv &rv)
129 #if(CXSC_INDEX_CHECK)
130 
131 #else
132  noexcept
133 #endif
134  { _vsvsetsup(iv,l_rvector(rv)); }
135 
136  INLINE void UncheckedSetInf(l_ivector &iv,const l_rmatrix_subv &rv)
137 #if(CXSC_INDEX_CHECK)
138 
139 #else
140  noexcept
141 #endif
142  { _vmvusetinf(iv,rv); }
143  INLINE void UncheckedSetSup(l_ivector &iv,const l_rmatrix_subv &rv)
144 #if(CXSC_INDEX_CHECK)
145 
146 #else
147  noexcept
148 #endif
149  { _vmvusetsup(iv,rv); }
150  INLINE void UncheckedSetInf(l_ivector_slice &iv,const l_rmatrix_subv &rv)
151 #if(CXSC_INDEX_CHECK)
152 
153 #else
154  noexcept
155 #endif
156  { _vsvusetinf(iv,l_rvector(rv)); }
157  INLINE void UncheckedSetSup(l_ivector_slice &iv,const l_rmatrix_subv &rv)
158 #if(CXSC_INDEX_CHECK)
159 
160 #else
161  noexcept
162 #endif
163  { _vsvusetsup(iv,l_rvector(rv)); }
164 
165  INLINE l_ivector &l_ivector::operator =(const l_rmatrix_subv &mv) noexcept { return _vmvassign<l_ivector,l_rmatrix_subv,l_interval>(*this,mv); }
166  INLINE l_ivector_slice &l_ivector_slice::operator =(const l_rmatrix_subv &mv) noexcept { return _vsvassign(*this,l_rvector(mv)); }
168 #if(CXSC_INDEX_CHECK)
169 
170 #else
171  noexcept
172 #endif
173  { return _vmassign<l_ivector,l_rmatrix,l_interval>(*this,m); }
175 #if(CXSC_INDEX_CHECK)
176 
177 #else
178  noexcept
179 #endif
180  { return _vmassign<l_ivector,l_rmatrix,l_interval>(*this,l_rmatrix(m)); }
182 #if(CXSC_INDEX_CHECK)
183 
184 #else
185  noexcept
186 #endif
187  { return _vsvassign(*this,l_rvector(m)); }
189 #if(CXSC_INDEX_CHECK)
190 
191 #else
192  noexcept
193 #endif
194  { return _vsvassign(*this,l_ivector(l_rmatrix(m))); }
195 
196  INLINE l_ivector operator *(const l_rmatrix &m,const l_ivector &v)
197 #if(CXSC_INDEX_CHECK)
198 
199 #else
200  noexcept
201 #endif
202  { return _mvlimult<l_rmatrix,l_ivector,l_ivector>(m,v); }
203  INLINE l_ivector operator *(const l_rmatrix_slice &ms,const l_ivector &v)
204 #if(CXSC_INDEX_CHECK)
205 
206 #else
207  noexcept
208 #endif
209  { return _msvlimult<l_rmatrix_slice,l_ivector,l_ivector>(ms,v); }
210  INLINE l_ivector operator *(const l_ivector &v,const l_rmatrix &m)
211 #if(CXSC_INDEX_CHECK)
212 
213 #else
214  noexcept
215 #endif
216  { return _vmlimult<l_ivector,l_rmatrix,l_ivector>(v,m); }
217  INLINE l_ivector operator *(const l_ivector &v,const l_rmatrix_slice &ms)
218 #if(CXSC_INDEX_CHECK)
219 
220 #else
221  noexcept
222 #endif
223  { return _vmslimult<l_ivector,l_rmatrix_slice,l_ivector>(v,ms); }
225 #if(CXSC_INDEX_CHECK)
226 
227 #else
228  noexcept
229 #endif
230  { return _vmlimultassign<l_ivector,l_rmatrix,l_interval>(v,m); }
232 #if(CXSC_INDEX_CHECK)
233 
234 #else
235  noexcept
236 #endif
237  { return _vmslimultassign<l_ivector,l_rmatrix_slice,l_interval>(v,ms); }
238 
239  INLINE l_ivector operator *(const l_ivector_slice &v,const l_rmatrix &m)
240 #if(CXSC_INDEX_CHECK)
241 
242 #else
243  noexcept
244 #endif
245  { return _vmlimult<l_ivector,l_rmatrix,l_ivector>(l_ivector(v),m); }
247 #if(CXSC_INDEX_CHECK)
248 
249 #else
250  noexcept
251 #endif
252  { return _vsmlimultassign<l_ivector_slice,l_rmatrix,l_interval>(*this,m); }
253 
254  INLINE l_ivector operator *(const ivector &v,const l_rmatrix &m)
255 #if(CXSC_INDEX_CHECK)
256 
257 #else
258  noexcept
259 #endif
260  { return _vmlimult<ivector,l_rmatrix,l_ivector>(v,m); }
261  INLINE l_ivector operator *(const ivector &v,const l_rmatrix_slice &ms)
262 #if(CXSC_INDEX_CHECK)
263 
264 #else
265  noexcept
266 #endif
267  { return _vmslimult<ivector,l_rmatrix_slice,l_ivector>(v,ms); }
268  INLINE l_ivector operator *(const ivector_slice &v,const l_rmatrix &m)
269 #if(CXSC_INDEX_CHECK)
270 
271 #else
272  noexcept
273 #endif
274  { return _vmlimult<l_ivector,l_rmatrix,l_ivector>(l_ivector(v),m); }
275  INLINE l_ivector operator *(const l_rmatrix &m,const ivector &v)
276 #if(CXSC_INDEX_CHECK)
277 
278 #else
279  noexcept
280 #endif
281  { return _mvlimult<l_rmatrix,ivector,l_ivector>(m,v); }
282  INLINE l_ivector operator *(const l_rmatrix_slice &ms,const ivector &v)
283 #if(CXSC_INDEX_CHECK)
284 
285 #else
286  noexcept
287 #endif
288  { return _msvlimult<l_rmatrix_slice,ivector,l_ivector>(ms,v); }
289 
290 } // namespace cxsc
291 
292 #endif
293 
The Data Type idotprecision.
Definition: idot.hpp:48
The Data Type ivector_slice.
Definition: ivector.hpp:963
The Data Type ivector.
Definition: ivector.hpp:55
The Multiple-Precision Data Type l_interval.
Definition: l_interval.hpp:72
The Multiple-Precision Data Type l_ivector_slice.
Definition: l_ivector.hpp:871
l_ivector_slice & operator=(const l_ivector_slice &sl) noexcept
Implementation of standard assigning operator.
Definition: l_ivector.inl:314
l_ivector_slice & operator*=(const l_interval &r) noexcept
Implementation of multiplication and allocation operation.
Definition: l_ivector.inl:497
The Multiple-Precision Data Type l_ivector.
Definition: l_ivector.hpp:55
l_ivector() noexcept
Constructor of class l_ivector.
Definition: l_ivector.inl:31
l_ivector & operator=(const l_ivector &rv) noexcept
Implementation of standard assigning operator.
Definition: l_ivector.inl:311
The Multiple-Precision Data Type l_rmatrix_slice.
Definition: l_rmatrix.hpp:1000
The Multiple-Precision Data Type l_rmatrix_subv.
Definition: l_rmatrix.hpp:47
The Multiple-Precision Data Type l_rmatrix.
Definition: l_rmatrix.hpp:416
The Multiple-Precision Data Type l_rvector.
Definition: l_rvector.hpp:54
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
l_ivector _l_ivector(const l_interval &r) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: l_ivector.inl:252
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